This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Help on creating bios for C5515

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,

  • Hi Robert,

    You are right to want to use a timer to trigger the ADC Start.  The clk.tcf example within the DSP/BIOS install uses a timer to wake a task after Task_sleep(); please take a look, it can help with the initial setup.  The Hwi/Swi modules are capable of receiving arguments (1 for HWI's, 2 for SWI's) passed to the function as a parameters; you can use this to increment your 512 counter.  Since you are new to DSP/BIOS, below are some resources which might help you get started.  

    DSP/BIOS User's Guide (<BIOS install dir>\docs\spru423i.pdf):

    • Hardware Interrupts (Section 4.2)
    • Software Interrupts (Section 4.3)

    DSP/BIOS API Reference Guide (<BIOS install dir>\docs\spru404q.pdf):

    • HWI Module(Section 2.10)
    • SWI Module(Section 2.26)
    • DSP/BIOS for 'C55x Devices with Three Timers (Appendix E)

    DSP/BIOS Examples: <BIOS install dir>\packages\ti\bios\examples\<platform>\

    Thanks,

    -- Emmanuel

  • Thank you very much. You give me very good advice to avoid pitfalls.

    Here I have a further question on BIOS 5 (for C5535). On spru423i.pdf, it mentions that BIOS_start is responsible for enabling the DSP/BIOS. I do not see bios_start() in the C55 bigclock example project. It only has:

    int main()

    LOG_printf(&trace, "bigTime started.");                                    

    }

     

    I use the task template generated a simplest task project. It has:

    Void main()

    {

    }

    For what reason, it has no bios_start?

     

    I do see BIOS example project having bios_start in the main function. Thanks,

  • OK. I find the answer:

     

    Like BIOS_init, BIOS_start is also generated by the

    configuration and is located in the programcfg.snn file