SEND and receive messages PERIODICALLY with the SPI

Hello,

I’m trying to do a periodically communication with the SPI bus.

I want send four differents message every 100 ms, with the condition that if i have finished to send a message, i will have to wait 5ms for send the next message. Receive message i have implemented with interruptions, but send message i don’t have idea. I think that adl_tmrSubscribe funtion is not the solution, because i couldn’t control the 5 ms between messages sended. :blush:

Have someone any idea? :question: Exist another function better for me? :question:

Thank you

Hi,

TCU timer can be used. Check the post [url]https://forum.sierrawireless.com/t/ms-counter/5539/6] for some details.

Thank you paruthiv,

I have one doubt,

theoretically, with this code, I will write in the SPI bus every 5ms. Is this assumption correctly:?: ( look MyTCUHandler function )

Thank you

I’ve tested the code and my assumption is correct :smiley:

with the code that I posted before, i’m writing every 5ms :astonished:

Well done :slight_smile: