Hi Zhonghai, I agree with Tom that you can use a timer to generate an timeout interrupt at your desire sampling rate. In the interrupt ISR, you can do your SSIDataGet(). I don't have the precise timing information as to when the ISR is entered after a timer is timeout. But for M4 processor, the interrupt latency is generally very short, in about a few cycles. Since you are sending/receiving SPI data in the ISR, I don't think you need to poll for the SSIBusy flag. Why don't you give it a try and let me know what happens. I want to also give you a heads up that I will be OOO for a week. Please expect delay in my future response.
↧