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.

LAUNCHXL-CC2640R2: Unable to send short SPI messages

Part Number: LAUNCHXL-CC2640R2


Good Day. I have a customer who is working with LAUNCHXL-CC2640R2. Please see below his query for your reference. Thank you very much.

When using the SPI Master example with the LaunchXL I am unable to send a message shorter then 9 bytes. When I do I see no errors or exceptions, but no activity on the MOSI pin either. The CLK and CS pins work as expected, but not the MOSI pin.

This was tested by altering the MASTER_MSG to an 8 character message and set the SPI_MSG_LENGTH to 8 and observed the results. When those values are set to default they work fine.

This is observable in this isolated example, and I'm seeing similar behavior when testing with the custom hardware and software I plan to deploy soon. It's based on the BLE observer example, and  notably it stops at 14 bytes instead of 9.

Is this a known issue? If there are any changes I need to make or anything I need to check, let me know.

Best Regards,

Ray Vincent

  • Hi,

    The behavior described seems to be expected.

    Actually, by default the DMA is configured to transfer 10 bytes at the time. So, all the shorter transfers are disregarded.

    You can change this in the CC2640R2_LAUNCHXL.c file by modifying the table spiCC26XXDMAHWAttrs, especially the parameter ".minDmaTransferSize" for the SPI used.

    Additional details are available here.

    Best regards,