Hi,
I am new to BIOS. I want to work on a 10-bit SAR ADC project with C5515. I have gone through the CSL_SAR_DmaExample project. Now I would create a BIOS project with a little more function. With continuous SAR ADC samples, I plan to do 512 point FFT (ignoring windowing function etc. now).
I am new to C5515 too. I do not find that its ADC and/or DMA has RAM buffer yet. Thus, The DMA could transfer one ADC word each time. For 512 samples, I can use a counter inside DMA ISR for that. There are two 512 sample RAM blocks: ping and pong RAM. They are used in ping-pong mode (There is a ping-pong flag for DMA ISR and FFT task to work exclusively): one block is used for sample buffering while the other is for FFT. The 512 counter is used by the DMA interrupt routine (ISR). When the counter reaches 512, DMA ISR sets a Boolean flag and DMA transfers ADC sample to another pong RAM block. A task checks the 512 sample flag. When it is '1', it can use the ping or pong RAM for FFT while SAR ADC works on another RAM block.
The sampling process should be driven by a timer event (I assume it is 1 mS for one SAR ADC sample). II find the SAR ADC conversion is time consuming. It looks like the SAR ADC start should be put in a task. On the other hand, we hope that the ADC start moment is better not varying too much around the expected 1 mS (We do not get much jitters/wanders). Thus, it is better to put the SAR ADC in a SWI?
The DMA ISR should call a SWI which manages the 512 counter? Is it necessary to make a SWI do the counter? Are there other processing involved in DMA ISR?
What priority is assigned to the 512 counter SWI,, and the SAR ADC SWI? I have no idea about that. They have the same period. The SAR ADC start needs more time than the 512 counter, I know.
This is my first BIOS project. I haven't begun yet. I work very slowly at every step now. If you see some incorrect above, please point it out for me. If you have other advice on this project, I will appreciate it very much. Excuse me, I am not sure this post should be post here or C5000 forum. Thanks,