-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
[Bug] Recent DMA change ed4814f6239097dde5eecf2b4fbd58661db84dda stm32h7/serial: Do not wait on TXDMA semaphore breaks a lot of things. #22399
Comments
I have have also seen where gps driver on ports that have TXDMA will not work. (v6xrt) |
I am seeing the same thing on the ARKV6X. |
I think the TXDMA semaphore change is wrong and should be reverted the way it was. The issue #22302 tried to fix was not a problem in the NuttX kernel.
My proposed solution is that mavlink open the uart using |
Can someone point me to a commit where things are still sane? Edit: looks like main is ok again? |
But then should the implementation not be:
|
Edit: Maybe we don't even need EAGAIN but I'm afraid we lose data if we don't. Need some more investigation. |
I need to review the sequence for the Transmit. |
I have a nuttx branch with The stm32h7 fix: PX4/NuttX@c696d5e The console requiring a second key press is fixed. serial_test runs at 3Mbps and with PX4/PX4-GPSDrivers#143 the imxrt can use TX DMA again. @niklaut can you pull in the stm32h7 and test the original issue with mavlink? |
As @dakejahl mentioned, this issue is also heavly affecting the uxrce_dds_client. @davids5 , I tested your nuttx branch and it definitively improves but it does not remove entirely the issue as the RTT is now around 6ms. |
@beniaminopozzan am I following that if you just revert the H7 commit that created the problem you get some timing that 1.5ms. With that commit it goes to to 20 and then with px4_firmware_nuttx-10.3.0%2B-serial-fixes-testing it is 6ms? |
@davids5 , that's correct!
|
@beniaminopozzan can you describe the setup (wiring and commands) so I can reproduce the issue? |
@davids5 Of course Raspberry Pi 4 Setup
PX4 setup
Hardware connectionsThe CUAV Testing procedure
Altenative setupPotentially, you can use any usb to serial adapter so that the raspberry is not neeeded. However I always found the quite unreliable. |
@beniaminopozzan You're right, there are differences in timing even on an unconnected TELEM1: PX4/NuttX#285 (comment). |
This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: https://discuss.px4.io/t/gps2-on-cube-orange-mini-mapping-possibly-incorrect/35512/6 |
@davids5 any news on this? |
Looks like the two commits still haven't fixed this. Run it long enough and TX gets stuck. |
I thought removing O_NONBLOCK from the dds client driver fixed it but it just looks like the whole driver locks up when the serial port freezes. With O_NONBLOCK, the driver thinks its sending data but nothing gets received by the agent. RX into the client is still fully working. Without O_NONBLOCK, the entire driver locks up. |
How many threads is it? Maye you can walk me through that you have learned from uxrce_dds_client/uxrce_dds_client.cpp. |
@AlexKlimaj can you scope TX, RX and the RTS, CTS lines at the point of failure and post it here? |
I'm testing using mavlink now instead of DDS. Running into the same disconnection problem. It will run for a while, then lock up. |
I can scope next week but I just tested current main with telem 2 on mavlink and it barely runs for 10 minutes without disconnecting. Main with the dma commits reverted has been running for 4 hours |
@beniaminopozzan The serial DMA issue was fixed with #22667. Please test current master. If this is still and issue please reopen this or post a new issues with what you are seeing. |
Describe the bug
With stm32h7/serial: Do not wait on TXDMA semaphore in, the console will not complete transmitting the complete output until a character is input on console.
gps status
< hit a key >
To Reproduce
see above
Expected behavior
not extra input needed
Screenshot / Media
No response
Flight Log
NA
Software Version
main with nuttx that has ed4814f6239097dde5eecf2b4fbd58661db84dda
Flight controller
all H7 with TX DMA
Vehicle type
None
How are the different components wired up (including port information)
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: