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.

C5535 SPI does not support DMA

Other Parts Discussed in Thread: CODECOMPOSER

Hi Folks,

We would like to use the C5535 for a battery powered, I/O heavy  application.  There is an external ADC with SPI interface.  We do 4 byte reads at  312,500 reads per second. SPI clock is 10MHz. transferring data to the DSP at 1,250,000 bytes/sec.  After some simple nibble/byte packing and buffering, we write blocks of data to microSD flash at 937,500 bytes/sec. 

We need to sustain these rates for at least 1 hour.

We just discovered that the C5535 DMA controller does not support the SPI interface. Surprise!

Any suggestions?

Mike

  • Hi,

     

    Does ADC support I2S? C5535 DMA supports I2S.

    Regards,

    Hyun

  • Hi,

    There are a few ADC with I2S, but that interface is usually limited to speeds much less than we need

    The Project - essentially a high speed, battery powered, data logger for analog inputs

    Mode 1 - Continuously digitize two12 bit analog inputs at 625,000 S/S each, or the pair with a dual simulataneous ADC at 312,500 S/S. There is an external signal that tells us when to convert.  Assemble a packet of of N ADC reads plus some other junk.  Write packet to MMC/SD FLASH. Repeat forever, until flash full, or stopped via switch.

    Mode 2 - Plug into Host, dump FLASH via USB.

    Mode 3 - Idle.

    The C5535 was very attractive as it had native interfaces and libraries for SPI, eMMC/SD, USB and very low power.  However, we are concerned about servicing the SPI IRQ every 3 microseconds. Are we being overly cautious?

    The C5509 is looks to be suitable in that the three McBSP interfaces are supported by DMA. The McBSP interfaces can be configured to operate in SPI mode using the StopClock capability.  So, we can connect the SPI ADC to one of the McBSP. The other McBSP can be configured for MMC/SD FLASH. Thus, we should be able to achieve DMA on read from ADC and DMA on write to FLASH. As I read  SPRU587e, the DMA controller can be synchronized to external, as well as internal events. The concept is to trigger the DMA via one of it's external IRQ ( which comes from the source generating the analog signal) which then performs an ADC read and a write to RAM. After N samples are read, we would move that data elsewhere (or move the pointer), add the packer header and misc junk, then start a DMA write to FLASH.  Both DMA loops run continuously. Make sense?

     

    Mike

    260 402 9627

    medobbs99@gmail.com

     

     

     

     

     

  • Mike,

     

    I think C5535 is capable of doing your job. What do you expect CPU running speed of C5535? If C5535 runs at 50 MHz, you can do 150 operations in 3 microseconds.

    Considering overhead, you may end up 100 operations in real time. If you use simple data transfer, it can be doable.

    Regards,

    Hyun

  • Hi Hyuan,

    Thank you for the quick reply.  My embedded staff person is really concerned about the time it takes for the IRQ to perform the context switch.  I am a hardware guy so I may be asking silly questions. 

    Can you direct me to the appropriate data sheets, ref guides, app notes, etc, where I can get enough info to add up the time for the list of operations (within the ISR) and any and all overhead to perform the context switch. 

    Also, is there a say to run a simulation in CodeComposer without any hardware

    The embedded person suggested that if I had an ADC (12 bit, 1-2MS/Sec, with a short FIFO they would be more comfortable with the C5535. Another alternative may be a SPI/SPI FIFO, if they exist. Any suggestions on either?

    I need to resolve the C5535 versus C5509A debate in the next few days.


    Thank you for your help!

    Mike

  • Hi Mike,

     

    I used term overhead for context switch or other not directly related your code. C compiler adds those.

    Yes, there is a simulator available for C5535. Targetconfiguration: select Texas Instruments Simulator at Connection box and then select C55xx Rev3.0 CPU Function Simulator in the Device box.

    You also can measure cycles of your code. Alternatively, you can count assembly code after you compiled your c code. 

    You can create ping ping buffer for SPI data capture. 

    I hope it helped.

    Regards,

    Hyun

  • Hi Hyun,

    We are going to try it on the C5535 and see what kind of throughput we can achieve,  I did find an ADC with SPI and 4 or 16 sample deep FIFO. That will provide a little breathing room if we were to miss the IRQ from the ADC.  The ADC is not quite smart enough to take advantage of the frame mode on the SPI port. Oh well. 

    Meanwhile, I will start a layout for a C5509A based system just in case.

    DMA Users Guides - I have found one specific to the C5509A family, and another specific C5515 family, but not the newer C553x family.  Is there a new DMA reference or users guide?

     

    Thanks again,

     

    Mike

  • Hi Mike,

     

    C553x family is drop down version of C5515 family so that DMA is same as C5515 DMA.

    Regards,

    Hyun