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.

TMS320F280037C: DMA and pull CLB FIFO connection

Part Number: TMS320F280037C
Other Parts Discussed in Thread: SYSCONFIG

Hello,

I am currently developping a communication protocol for a LED driver. I would like to know how it is possible to connect through sysconfig the DMA destination addres to the CLB push fifo so I can extend the effective depth. Also, I would like to know if there are any examples where the DMA is configured to send a value from a variable in the code to a peripheral register.

Thanks in advance,

David

  • Hi David,

    Unfortunately, the CLB module does not have DMA access. For modules that do have DMA access, you can do the following in Sysconfig:

    To use the "Manual" option you can input the address directly as the destination address (ex. 0x6B38).

    To use "Variable/Function Name" they can define a pointer somewhere in your C code (ex. const void *scitdAddr = (const void *)(myLIN0_BASE + LIN_O_SCITD);) then use the pointer name as the destination address (scitdAddr).

    Best Regards,

    Delaney

  • Hello Delaney,

    Thank you for your explanation. Therefore, it should be possible to interconnect the DMA to CLB with this approach rather than direct peripheral interconnection? I am asking this because I read the following from the TRM:

    Regards,

    David

  • Hi David,

    My mistake, you are correct. The DMA module unfortunately doesn't have access to the CLB module. Therefore, the DMA would not be able to set the CLB PUSH or PULL FIFO registers as its destination address. For future reference, you can check the Functional Block Diagram in the device datasheet to see which modules the DMA can access.

    Also, note that the "Linked to Peripheral" option should not be chosen in any case. This is the automatically selected option when another module adds in an embedded DMA module, this shouldn't be user selected.

    Best Regards,

    Delaney

  • Hi Delaney,

    No problem, thanks for your clarification. Is there any other way to fill the PULL fifo without the use of interupts?

    Regards,

    David

  • Hi David,

    The CLA has access to the CLB module so you could set up the CLB to trigger a task on the CLA that continuously writes to the pull FIFO. 

    Another option would be to use the SPI RX buffer to export data, as is detailed in the below section of the TRM.

    I will loop in the CLB expert to comment on my suggestions as well.

    Best Regards,

    Delaney

  • Hi David,

    I have discussed with the CLB expert, and they have a few questions before they can offer recommendations:

    • Can you explain more about your application and the reason for wanting to avoid using interrupts with the pull FIFO?
    • What do you mean by "to extend the effective depth" in your original post? Are you referring to extending the effective depth of a FIFO from a different peripheral?

    Best Regards,

    Delaney

  • Hello Delaney,

    Can you explain more about your application and the reason for wanting to avoid using interrupts with the pull FIFO?

    Sure, let me explain further our application. The CLB is used to control a LED strip of 21 LEDs based on a pwm protocol. Each logic value corresponds to a different duty cycle. The PWM freq is around 800kHz. As you know, the PULL FIFO is of 4 words-depth, therefore, I can control 4 LEDs maximum as the LEDs consume up to 32 bits to understand a command. The update task in scheduler to update the LED strip has a paeriodicity of 1ms.

    The reason why we want to know if there are other option is because if I use interrupts, they would need to be very well syncronised with the rest of the more important interrupt so they never trigger when reloading the CLB. This would provoce a delay in the data line and it may reach the minimum reset time the LEDs need to undestand that a new command is comming. In addition, we are quite short on CPU time right now. We would like to relief a little the CPU by leaving this king of management to another peripheral or simlar.

    What do you mean by "to extend the effective depth" in your original post? Are you referring to extending the effective depth of a FIFO from a different peripheral?

    By effective depth I mean that if there is any way to put all the LED data into a FIFO or similar where the CLB or another peripheral could consume directly from it so it is not needed to recharge the CLB PULL FIFO. Ideally, the DMA would be a perfect candidate as it moves data from one direction to another and therefore effectively increasing the FIFO depth.

    Best Regards,

    David

  • Hi David,

    I believe the most straightforward way to do this without changing your CLB implementation significantly would be to have the CLB trigger the CLA to write to the PULL FIFO like Delaney mentioned. Is this feasible in your application, or is the CLA already performing tasks that may interrupt the stream of data going to the PULL FIFO?

    Thank you,

    Luke

  • Hello Luke,

    For now, we are not using the CLA and I think this could be a proper solution. Thank you for your recomendations Delaney and Luke.

    Regards,

    David