This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC1352R: sscanf not working for long input string

Part Number: CC1352R


Hello,

Currently I am trying to use sscanf() to parse a string of a little under 1000 bytes.

The code is as follows:

uint32_t socket = 0;
uint32_t length = 0;
char     result[2048];

// Scan for the socket number (0 - 6) and message
if (sscanf(input, "+TEXT: %1u,%4u,\"%1023[^\"]", &socket, &length, result) != 3)
{
etc...

However, this does not work. The system hangs. When I reduce the 1023 bytes for the result string to 267 bytes, it works.
What might cause this? Inspecting the system with the ROV does not show a stack overflow.

Thanks for any insight!