shalongbasi wrote on Monday, May 04, 2015:
I am totally new to Freertos and now writing codes on PIC32MX795F512 running on 80MHz.
In my code, A timer triggers an interrupt every 10us and timer ISR writes a dummy data to SPI to read an ADC chip. SPI Rx interrupt is then triggered after data ready and write the ADC data to a Queue. Another task will receive the data from the Queue.
With the help of the oscilloscope, I found that SPI writing is finished in 1.6us, and Que writing is started after 2us after SPI writing finish. Que writing takes about 1.8us.
All these added together costs about 5.6us. I having another signal toggling to monitor the begin and end of queue reading, but it is not a stable waveform, looks like switching to Queue Receiving task and reading the queque cannot be finished in the rest 4.4us.
Anyone have the idea about how long normally tasking switching takes under 80MHz PIC32? I want to estimate if it is feasible to finish my application with Freertos. After this, I need to add another 4 channel SPI readings at 10K speed. Maybe it is not a good idea to use Freertos with my application. thanks.