Other Parts Discussed in Thread: CC3235SF
Tool/software:
-
Hello,
I’m currently developing on the CC3235SF using the SimpleLink SDK version 7.10.00.13, with a custom board.
I'm encountering an issue with UART2 receive behavior when usingUART2_Mode_CALLBACKandUART2_ReadReturnMode_PARTIAL.Problem Description
-
I’m receiving incomplete UART data during communication with a slave device over Modbus RTU protocol.
-
I have confirmed via oscilloscope that the Rx waveform is complete, but my firmware only receives partial data (e.g., only the first few bytes of a longer response).
-
The issue happens consistently when multiple frames are received consecutively.
System Setup
-
MCU: CC3235SF
-
SDK: simplelink_cc32xx_sdk_7_10_00_13
-
UART mode:
UART2_Mode_CALLBACK -
Baud rate: 115200
-
Read return mode:
UART2_ReadReturnMode_PARTIAL -
No flow control (Rx/Tx only)
-
Callback re-initiates read of full buffer (256 bytes)
Code Overview
In my callback:
-
The callback receives partial chunks of the Modbus RTU packet.
-
In the main thread, I check
rxBytesReceived > 0and copy the data. But often only 5–10 bytes are received when 20–30 were expected. -
I also tried using 1-byte reads in the callback, same result.
Things I Have Verified:
-
The UART RX signal is present and clean at the pin.
-
Callback is triggered.
-
Rx buffer isn’t full (256 bytes, Modbus packets are <64 bytes).
-
There’s no memory corruption or task starvation.
Questions:
-
Is there any known issue with
UART2_ReadReturnMode_PARTIALnot returning all available data? -
Is it correct to re-issue a full buffer read (256 bytes) in the callback each time?
-
Could data loss happen between reads, or should the UART driver handle queuing internally?
-
Do you have recommendations for reliably receiving complete Modbus RTU frames using
UART2_Mode_CALLBACK?
Thank you for your support
-