Part Number: CC3120MOD
Other Parts Discussed in Thread: CC3120, , UNIFLASH, CC31XXEMUBOOST
Chip number 0x31000000
FW 2.1.0.1
NwP 3.3.99.1
Phy 2.2.0.5
With a CC3120 module being used with an access point and a connection established to a server, calling sl_Recv with parameters addressing a small buffer and its size, ends up returning a larger number of bytes and the memory after the buffer has be overwritten (corrupted).
For example a buffer of 500 characters, passed with a length of 244 repeatably returns 1326 and the buffer and following memory have been overwritten (the corruption looks like real data)
Changing the code to have a larger buffer works around the issue (1500 characters, chosen for being MTU sized and larger than the observed received data length), allowing the code to continue and succeed multiple times. Obviously I want the code to be robust against longer data receipt.
I tested this on two motherboards, each has a CC3120 module having the versions listed above, it was repeatably the same on both.
Tracing through the code in a debugger, i didn't catch the moment that the read bytes and their length are written to memory. This is with a Cortex M K64F communicating over SPI to the CC3120MOD
Is this sl_Recv behaviour a known bug?