E-port data integrity
CompletedI'm working with the PSDK on the M350 using the E-port development kit connected to a Jetson TX2, but I'm seeing lots of warnings which seem to be pointing to data integrity problems. Are these likely to be due to UART problems or issues with the USB device mode implementation?
[503.736][linker]-[Warn]-[DjiProtocol_v1Unpack:177) protocol frame crc8 error
[505.099][linker]-[Warn]-[DjiProtocol_v1Unpack:186) protocol frame crc16 error, exp:0x2431 cur:0x550E
[ WARN] [1688467512.731175456]: [505.898][linker]-[Warn]-[DjiProtocol_v1Unpack:186) protocol frame crc16 error, exp:0x11D7 cur:0x4507
[ WARN] [1688467512.760336949]: [505.928][linker]-[Warn]-[DjiProtocol_v1Unpack:186) protocol frame crc16 error, exp:0x0562 cur:0x5543
We used to see some of these on the M300 with the OSDK development board, but they were rare and didn't appear to affect flight. With the M350 they are almost continuous and the communication seems compromised as flight and gimbal control in the simulator show lag or dropouts. Any ideas on why there is a difference between the two?
-
The error message is UART data error, which is related to UART communication. Compared with M300, M350 E-PORT only has one UART(M300 has one UART and one USB ACM,M350 E-PORT USB is only used to transmit high-bandwidth data. Such as video streams or media files. You can try to increase the baud rate of the serial port as much as possible, which requires higher stability of the UART communication. -
Thank you for the information. The errors appeared to be primarily due to noise in the cabling. Adding a shielded cable removed almost all of the "v1Unpack" errors.
However, we are still seeing issues with the flight control. It appears as if there are problems getting the commands to the drone. We are using DjiFlightController_ExecuteJoystickAction for primary flight control and DjiGimbalManager_Rotate to control the gimbal simultaneously. We are seeing the two errors below relatively frequently, are these likely to be a cause?[754.393][linker]-[Warn]-[DjiCommand_SendAsyncHandle:875) Command async send retry: index = 0, retryTimes = 3, cmdSet = 2, cmdId = 17
[755.373][linker]-[Warn]-[DjiCommand_SendAsyncHandle:875) Command async send retry: index = 0, retryTimes = 3, cmdSet = 4, cmdId = 10 -
The error is that PSDK failed to send commands to the aircraft, and resent. Flight control and gimbal control can run simultaneously, but the more functions are used, the higher the UART bandwidth usage will be. And different functions are recommended to be processed in different threads. -
Moving each function into a separate thread has improved the flight control, but the gimbal commands still show the laggy behaviour. This is with a shielded cable and with the baudrate at the maximum of 1,000,000 bps.
The DjiGimbalManager_Rotate function is very varied in the time it takes to return, typically between 200 and 300ms, but sometimes more than 500ms. Is this expected? This is for the upwards gimbal connector if that makes a difference. On the M300, this same code showed returns within 30 to 40ms. Is there a reason for the large discrepancy? Does the function now wait for the rotation to complete?
Please sign in to leave a comment.
Comments
5 comments