FX3 SPI Communication

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ShPe_4630301
Level 2
Level 2
First like given

Hello there,

I'm using the FX3 Dev Board and I'd like to configure a Slave device over the SPI Interface. Simultaneously, the UART Interface is being used for Debug purposes. Following is a sample of the code:

CyU3PDebugPrint (2, "Address of Data: %X \r\n", &data);

CyU3PDebugPrint (2, "Data: %X\r\n", data);

CyU3PReturnStatus_t status =  CyU3PSpiTransferWords (&data,1,response,1);

CyU3PDebugPrint (2, "SPI MOSI Transmission status: %X\r\n", status);

so far, it's working well and data can be exchanged between SPI Master and Slave.

but once the CyU3PDebugPrint() calls are commented out(UART Block of FX3 is still configured and pins are still connected correctly.), the data can not be transferred to the slave any more. does anyone know why?

0 Likes
1 Solution

Hello,

Please try adding the API CyU3PThreadSleep(1000); before calling CyU3PSpiTransferWords() and let me know if you are seeing any difference.

If this does not help, please probe the SPI lines for the following cases and share it with me:

1. The debugprint API used.

2. The debugprint API is commented off and without using CyU3PThreadSleep(1000);.

3. The debugprint API is commented off and CyU3PThreadSleep(1000); is used.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna

View solution in original post

0 Likes
11 Replies