-
Notifications
You must be signed in to change notification settings - Fork 200
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
Program gets stuck on UART initialization when using SERCOM0 on PA08 and PA09 #710
Comments
If the My first instinct would be that the clock is not enabled for that peripheral, but given that it works with other configurations, that might not be the issue here. It's possible there is a bug in the HAL or the PAC that isn't enabling the correct clock, or that the reset state of the chip you're using is different from what the HAL or PAC are expecting. Have you also ruled out whether a HardFault is occurring? If a HardFault occurs due to a misconfiguration, it might not panic but instead just hang. |
@turbinenreiter: I've read through your example, and you're not enabling the right clock here: - let clock = &clocks.sercom1_core(&gclk0).unwrap();
+ let clock = &clocks.sercom2_core(&gclk0).unwrap(); As an aside, the |
Reopened, I figured I'd give people a chance to read this before closing for good. |
I am working on a custom board on which I plan to use PA08 and PA09 as UART.
According to the datasheet, PA08 and PA09 are available as SERCOM0/IoSet1/AlternateD and SERCOM2/IoSet3/AlternateD.
However, the program hangs on setting up UART. According to my debugger, it gets stuck on this line:
I tested UART on PA00 and PA01 and got it working there, which gives me some confidence that I am configuring things correctly.
I also got UART working on PA08 and PA09 using the MPLAB IDE and tools, which gives me confidence that the hardware works or that the vendor IDE has a workaround.
I created a repo with a minimal example showing the issue:
https://github.com/turbinenreiter/atsame53-rs/blob/master/src/main.rs#L40
uart1 is the problematic one, and uart2 is the "control group" that works. Uncommenting the uart1 initialization "enables" the problem.
The text was updated successfully, but these errors were encountered: