Skip to content
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

Seemingly RP235x hardware glitch setting "USE_LPOSC" in the AON timer #3796

Closed
mschnell1 opened this issue Jan 22, 2025 · 4 comments
Closed

Comments

@mschnell1
Copy link

When the (POWMAN) AON timer is configured to use the XOSC, and then the USE_LPOSC is set in the TIMER register (with the timer stopped) , the state is not changed. The USING_XOSC bit still is set.
(Supposedly) Resetting the chip by starting a new debug session does not change the state and results in USING_XOSC still set and not being able to be reset by USE_LPOSC .
Only after power off-on, the AON timer can be set to use the LPOSC.
(As you normally will not change that state on the fly I suppose this is not really an issue...)
Did anybody experience the same ?

@mschnell1
Copy link
Author

It's even worse !

With my initialization code I can configure the AON TIMER to show USING_LPOSC set and can confirm that indeed the low power oscillator is used (as with same the timer runs some 3 promille slower than when it is driven by XOSC and slightly varies with temperature).

But this only works when starting in the debugger by cargo run or cargo run --release.
When just powering up the device, the USING_LPOSC bit is not set.

Any help ?

@mschnell1
Copy link
Author

mschnell1 commented Jan 27, 2025

More testing:
With the RP2350 chip (on a Pico 2 PCB) under test I find:
I did software (using the current Embassy distribution without nightly ) using TMER0 as system timer and simply configuring the POWMAN AON timer to run on LPOSC and checking it's count value.
Starting the system with power on, sometimes it finds the using_lposc bit in the TIMER register set, and sometimes cleared.
Nonetheless the counter seems to always use the LPOSC, hence the software should run anyway. But the bit stays clear until power down.

BTW, as said, when first configuring the counter to use XOSC and then setting it to use LPOSC, the bit never is set. re-starting the debug session does not end that situation, power on usually does. (I don't have access to the RUN pin.)

Should that be reported to the RASPI group ?

@mschnell1
Copy link
Author

mschnell1 commented Jan 27, 2025

I might try to impose a delay before doing the configuration of the AON Timer ....

@mschnell1
Copy link
Author

With the final version of my software this is not an issue any more either irrelevant or indeed not happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant