SPI transmission at regular intervals
Moderators: RoccoMarco, lbednarz, tfAteba
SPI transmission at regular intervals
What's the most efficient way to start an SPI transmission at regular intervals, say 10000 3x8bit transactions per second at 1Mbit? Are virtualTimers suitable for this, or are better solutions available?
Re: SPI transmission at regular intervals
How accurate do you need the timing to be? ie do they need to be perfectly evenly spread out, or is it just the average rate that matters?
At 10Khz you'd have to increase the system tick rate, in which case you would probably be better off using a GPT which uses a hardware timer. you could have a GPT triggering a callback at 10kHz which then calls spiStartSend() without much hassle.
At 10Khz you'd have to increase the system tick rate, in which case you would probably be better off using a GPT which uses a hardware timer. you could have a GPT triggering a callback at 10kHz which then calls spiStartSend() without much hassle.
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: SPI transmission at regular intervals
I agree, the GPT driver looks like a better option in this use case.
Giovanni
Giovanni