Hello all,
I want to configure SPI to run on callback mode but I have an issue sometimes the transfer failed
so I need any example code or documentation to configure it in right way
this is my configuration.
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.
Hello all,
I want to configure SPI to run on callback mode but I have an issue sometimes the transfer failed
so I need any example code or documentation to configure it in right way
this is my configuration.
Hello Rehab,
We don't have any available example code, but the documentation to cover it is provided with Section 5.11 of the TI-RTOS User's Guide: https://www.ti.com/lit/pdf/spruhd4
Best Regards,
Ralph Jacobi
Hello, first thanks for your replying I saw this documentation and configure SPI regarding to what I read on it
but my issue when using callback mode during the first transfer I think there is another request transfer so it is failed and abort the software
I am working on bit rate 2MHz I couldn't fix this issue so help me please
Hello Rehab,
I think there is another request transfer so it is failed and abort the software
Can you elaborate on this further?
I don't have any background with callback mode for SPI so my knowledge to help on this may be limited at times, but the more details you can provide regarding what is occurring in your system, the better I will be able to offer guidance.
Best Regards,
Ralph Jacobi
Hello Jacobi,
for more details I am using SPI to drive TLC led driver
first I set the GS buffer and DC buffer in initial values and send these buffers to SPI and I want to use Callback mode for CPU load but I have an issue the buffer and set callback during task running the callback fired with new transfer request so I think there is something error so could you help me?
Hello Rehab,
I can't really tell if that's an error with the configuration or just an application issue. While I can sometimes help debug basic applications, this is pretty specific so it's hard for me to help with that. If you have a specific concern with that the TI-RTOS configuration is incorrect or the MCU is not operating correctly, I can try and help with that, but I don't really know what to advise with this 'new transfer request' issue.
Best Regards,
Ralph Jacobi
Hello Ralph,
I think the problem is when SPI did the first request the another request happen so the SPI_tansfer function return false or some thing like this I am not sure but when I use Blocking mode everything is ok and the data send correctly but there is CPU load found
so could you propose solution to be sure that the all data transfer before sending another request
Hello Rehab,
Then you'd need to debug what is driving the second request - have you scoped the SPI lines yet to see the communication between the devices? That can often reveal a lot.
There may be a way to use something like a mutex to guard that the SPI is not accessed until the data is transferred.
Best Regards,
Ralph Jacobi