-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
__metal_driver_sifive_fe310_g000_lfrosc_get_rate_hz returns wrong clock #238
Comments
|
Ah ha, appears that freedom-devicetree-tools will attempt to add the base address to this register when generating the metal-bsp, but there is a discontinuity between the two--the DTS in freedom-e-sdk uses a named tuple for the aon node of name "mem", but the devicetree tools is looking for "control" and will default to a base address of 0 if it cannot find it. https://github.com/sifive/freedom-devicetree-tools/blob/master/metal_header/sifive_fe310_g000_lfrosc.c++#L93 I can see examples of both in the DTS--which is the preferred register name for block base addresses? My guess is "control" as this controls AON behavior (and mem seems to be used for things like ITIM/DTIM), which I guess would make half of this issue a freedom-e-sdk issue? |
On FE310 G002 (HiFive RevB), attempting to utilize get_rate_hz on lfrosc is returning 0, but should return 32768 for the external clock.
From tracing, this appears to be because the MUX flag is being read and tested for incorrectly, causing this driver to attempt to read from the internal clock source (which I think is unset, thus resulting in the return value of 0)
The problem appears to be twofold:
The text was updated successfully, but these errors were encountered: