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.

TMS320F28388D: Some issues with C28x academy DMA Lab

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE, TMDSHSECDOCK, TMDSCNCD28388D, SYSCONFIG

Tool/software:

Hello support team,

I have installed C2000Ware 6.00.00.00 and CCS 20.2.0 on my windows laptop. I use the TMDSCNCD28388D version MCU063B-003 and TMDSHSECDOCK controlCARD Docking Station rev F boards for my testing.

I followed instructions to configure the GPIO, EPWM, ADC, DMA and CPUTIMER and copied all the source code to my main file. However, after the build and run the code. The AdcBufRaw has all the zero values. And the LED on the controlCARD board stay lighting in red not blinking as expected. looks like the DMA is not working.

Could anyone help me on the DMA lab? If needed, I can share my main file and .syscfg file.

Thank you very much for your time and support.

Looking forward to your response.

Best regards,

Lin

  • Could anyone in this group help me on that?

    Thanks,

    Lin

  • The issues are still there. Could anyone check it?

  • Hi Lin,

    Have you tried running the solution project provided in C2000ware? This can be imported from the path: [C2000ware install]/training/device/f2838x/advance_topics/lab_dma/.

    If you are able to get this code working on your setup, you can compare this project to the code you have put together. 

    Best Regards,

    Delaney

  • Hi Delaney,

    Thanks for your response.

    Oh, I haven't tried that way. I will do it and get back to you once I have done that.

    Best regards,

    Lin

  • Hi Lin,

    Sounds good, let me know.

    Best Regards,

    Delaney

  • Hi Delaney,

    The solution project of DMA works well.

    I will compare my .c with lab_main.c and my .syscfg with lab_dma_controlcard.syscfg files to see what I can find the difference.

    In addition to those two files, what else should I compare with?

    Best regards,

    Lin

  • Hi Delaney,

    I may find the difference that is the dma1.enableTriggers          = true;  Once I enable it, the DMA lab code is also working.

    Another issue or question about the DMA Lab or Solution code is the sampling rate of the ADC.

    In the code the ADC is triggered by the EPWM2 's signal which period or frequency is controlled by the Time Base Period. The original value of it is 1999 to create a sampling rate of 50 kHz. To increase it to 1 MHz, I changed the Time Base Period from 1999 to 99. After that the sampling rate is increased as expected. However, when I view the Graph of AdcBuf data, it's not a 25% duty cycle PWM waveform as before. I can't find a good reason for that

    Could you help me to double check that? How can we get the 25% PWM signal?

    Thanks for your time and support.

    Best regards,

    Lin

  • Hi Delaney,

    Have you got a chance to check my recent messages? Could you give me an update?

    Thanks,

    Lin

  • Hi Lin,

    Sorry for the late reply. Glad to hear you were able to get the lab working. And yes, the only files you should need to look at are the lab_main.c and the sysconfig file as long as you followed the lab instructions and started from the empty project in the training folder.

    It may be that the ADC is triggering the DMA channel too quickly now for it to transfer the full data properly. Can you check the values of the flags in the CONTROL register for the DMA channel with Continous refresh on? Which bits are set?

    Best Regards,

    Delaney

  • Hi Delaney,

    Thanks for your reply.

    I'm not sure how to check the control register for the DMA channel. Should I do it within the CCS in debug mode? More instructions are appreciated.

    Best regards,

    Lin

  • Hi Lin,

    Yes, you can check this in the Register View of CCS while the debugger is connected. See documentation here. Also, make sure the "Continuous Refresh" button is toggled on so that the register values update in real time. Let me know if you have any more questions. 

    Best Regards,

    Delaney