-
Notifications
You must be signed in to change notification settings - Fork 17.2k
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
ChibiOS: enable UART FIFO on H7 and G4 by default #17959
Conversation
Heads up @bugobliterator - the "ChibiOS" label was applied to this issue. |
this ensures options are set before the first begin() call
Does this bypass the ring-buffer and writes directly to the UART hardware FIFO? |
no, ring buffer is still there. The big advantage is for receive with no DMA, where we become much less sensitive to interrupt latency and so can receive high baudrates with no loss of bytes without using DMA |
Two experienced beta testers (Yuri and Kenny) have offered to test this over the next week or so. See discussion here. |
I started testing today and noticed no real improvement so far. Autopilot-in-the-middle communication between moving base and rover has never been very reliable for me (Cube Orange, SERIAL3 and SERIAL4). I'm open to any suggestions for parameter changes beyond those described in the discussion that Randy linked. I can provide logs for any tested configuration. |
I'd like the log for both GPS ports set to 768 options for no DMA, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been tested by Yuri the rover user so I'm approving, thanks!
This enables the hardware FIFO on UARTs on G4 and H7 by default. It can be disabled using a SERIALn_OPTIONS bit.
Enabling the fifo makes it possible to do very high baudrates without DMA. Testing on a CubeOrange shows no byte loss at 2MBit/s between telem1 and telem2 without DMA and with the FIFO enabled.
This makes moving baseline dual GPS yaw more reliable on H7 as it removes DMA issues for the RTCM data on H7 based boards. Testing with two F9P u-blox modules shows reliable yaw with DMA disabled on both ports. Disabling DMA actually helps as it stops contention with other devices on the same DMA channels, lowering latency for the RTCM data.
Setting SERIALn_OPTIONS to 768 disables DMA in both directions, which works very well for GPS yaw