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.
Hi,
Currently, I am working on a project using F28379d launchpad for motor drive control.
I am using ePWM modules to generate PWM signals. MATLAB/Simulink is what I'm using to program. For use in future calculations, I would like to record my PWM signal. As stated in this (https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1168314/tms320f28379d-list-of-registers-and-memory-addresses-to-be-used-for-memory-copy-block ), I have attempted to copy the TBCTR register and reconstruct the PWM signal. Nevertheless, the memory copy block is not providing me with the correct value for TBCTR. I am using a PWM period of 10kHz/1e-4 seconds. Can the switching states be read from the GPIO data registers? My aim is to access my switching states (PWM signals) for further processing.
Any assistance with this would be greatly appreciated.
Thanks
Hi Hamdihun,
You've checked that the .dat file is correct, I assume. What is your target value, and what is the incorrect value that is being loaded for TBCTR? Do all other settings seem to be copied in correctly?
Also yes, you should be able to read switching states of PWM signals using the GPIO data registers. I will double check this to be 100% sure (will update back here by end of Monday).
Best Regards,
Allison
Hi Allison,
Thank you for the reply.
My target value is a symmetrical triangular shape (I am using up-down count mode), what I am getting is shown in the figure below.
ch4 (green) is TBCTR and ch 8 (orange) actual PWM output.
The memory copy block setting is shown below:
Hi Hamdihun,
I confirmed that the you can use the GPIO DATA registers to read the state of the pin, regardless of what peripheral is driving it, so yes you can use the GPIO data registers for EPWM switching states.
The memory copy issue seems to be a Mathworks-specific issue, so please take a look at MathWorks FAQ at this link below:
If you have further questions, the best way to get support on MathWorks products is to contact MathWorks live tech support.
You can also search for answers or post a question on MATLAB Answers C2000 forum. Additionally, there is info on MathWorks support C2000 in Documentation and Examples.
I will close the thread from here as the software is supported by the MathWorks team on their forum.
Best Regards,
Allison