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

[Sponsored by CubePilot] stm32h7: Reset USART clock selection #23498

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

julianoes
Copy link
Contributor

@julianoes julianoes commented Aug 6, 2024

This resets the USARTs' clock source selection to the default, in case it has been changed by the bootloader.

This is required if booting from the ArduPilot bootloader which happens to reset the clock selection to PLL.

Without this fix, UARTs (including the console) is garbled, so presumably at an invalid baudrate. I suspect this will solve a lot of frustration where serials "just don't work".

I have added defines for Pixhawk 6C and 6X, as well as CubePilot Orange and Orange+. I assume we need to add this to a bunch more boards.

Depends on PX4/NuttX#319.

Needs backporting to v1.14 and v1.15!

@julianoes julianoes added the v1.15 label Aug 6, 2024
@julianoes julianoes requested review from dagar and davids5 August 6, 2024 02:23
Copy link
Member

@davids5 davids5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged PX4/NuttX#319 - Please repoint.

This resets the USARTs' clock source selection to the default, in case
it has been changed by the bootloader.

This is required if booting from the ArduPilot bootloader which happens
to reset the clock selection to PLL.

Without this fix, UARTs (including the console) is garbled, so
presumably at an invalid baudrate.
@julianoes julianoes force-pushed the pr-fix-usart-clock branch from 653d0b9 to d3f34af Compare August 6, 2024 20:15
@julianoes
Copy link
Contributor Author

Ignoring failing SITL tests.

@julianoes
Copy link
Contributor Author

@dagar any other boards that we need to include here?

@dagar
Copy link
Member

dagar commented Aug 7, 2024

@dagar any other boards that we need to include here?

Anything that potentially ships with the ardupilot bootloader? mRo, etc

@dagar dagar merged commit 2d99ae1 into main Aug 7, 2024
92 of 95 checks passed
@dagar dagar deleted the pr-fix-usart-clock branch August 7, 2024 15:41
@DronecodeBot
Copy link

This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-sync-q-a-aug-7-2024/40078/1

@mrpollo
Copy link
Contributor

mrpollo commented Aug 7, 2024

Hey @TOTON95 I think you should implement this fix for all mro/3dr boards since you ship with the Ardupilot bootloader, can you please review if you need it?

@TOTON95
Copy link
Contributor

TOTON95 commented Aug 7, 2024

Hey @TOTON95 I think you should implement this fix for all mro/3dr boards since you ship with the Ardupilot bootloader, can you please review if you need it?

@mrpollo Hey, actually I was checking this specific register with @lgarciaos a few days ago, since we've been having some problems with GPS setup. IMG-20240803-WA0001.jpg

Going to check on our boards if this solves the issue. Thanks for sharing. 🙌

julianoes added a commit that referenced this pull request Aug 7, 2024
This resets the USARTs' clock source selection to the default, in case
it has been changed by the bootloader.

This is required if booting from the ArduPilot bootloader which happens
to reset the clock selection to PLL.

Without this fix, UARTs (including the console) is garbled, so
presumably at an invalid baudrate.
julianoes added a commit that referenced this pull request Aug 8, 2024
This resets the USARTs' clock source selection to the default, in case
it has been changed by the bootloader.

This is required if booting from the ArduPilot bootloader which happens
to reset the clock selection to PLL.

Without this fix, UARTs (including the console) is garbled, so
presumably at an invalid baudrate.
@DronecodeBot
Copy link

This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/pixhawk-6x-rev8-bugs/40095/2

Claudio-Chies pushed a commit that referenced this pull request Aug 15, 2024
This resets the USARTs' clock source selection to the default, in case
it has been changed by the bootloader.

This is required if booting from the ArduPilot bootloader which happens
to reset the clock selection to PLL.

Without this fix, UARTs (including the console) is garbled, so
presumably at an invalid baudrate.
vertiq-jordan pushed a commit to iq-motion-control/PX4-Autopilot that referenced this pull request Aug 21, 2024
This resets the USARTs' clock source selection to the default, in case
it has been changed by the bootloader.

This is required if booting from the ArduPilot bootloader which happens
to reset the clock selection to PLL.

Without this fix, UARTs (including the console) is garbled, so
presumably at an invalid baudrate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants