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.
I would like to use eCAP to capture the on-time of one PWM ouput, and then trigger DMA to move the captured value to EPWM1 CMPA. There are below several questions that needed to be confirmed.
1. CAP1-CAP4 are 32-bit registers, but CMPA is 16 bit register. Can I use DMA to move CAP1 value to CMPA directly with 16 bit DMA mode? Or with 32bit mode. Assuming the actual captured value is still within 16 bit range.
2. In this case, it seems that we can not enable HRPWM and HRCAP, right? Since CMPAHR only occupies upper 8 bit [15:8] of the register, CMPAHR can not directly take the value result from DMA, if no software control is implemented.
Thank you for the help.
Hi Aki Li,
Your understanding is right. You can use the DMA in 16bit mode of operation for the CMPA transfer, but will need some software conditioning before the transfer is made to the CMPAHR register.
Please click on "verify answer" if this response resolves your query.
Thanks & Regards
Pramod