Hi experts,
I am approaching to 66AK2G12x Multicore SoC and in my application I need to use the EDMA module for programming CMPA and CMPB registers without involving the DSP.
Specifically, I want to copy data from the DSP internal memory L2 SRAM to CMPA, CMPB registers, every time ePWM_0 generates an interrupt.
QUESTION 1
My idea is to implement the following procedure:
A) The module ePWM_0 generates the interrupt ePWM_INT_0 (that is the event 32); event 32 is served by DMA channel 32.
B)
B1) DMA channel 32 points to Param Set 0.
B2) Param set 0 is served: the content of address 80'0000h is copied in CMPA register
B3) At the end of transfer, param set 0 is chained to DMA channel 33.
C)
C1) DMA channel 33 points to Param Set 1.
C2) Param set 1 is served: the content of address 80'0002h is copied in CMPB register
C3) At the end of the transfer, param set 1 is chained to DMA channel 34
D)
D1) DMA channel 34 points to Param Set 2.
D2) Param set 2 is served: the content of address 80'0004h is copied in CMPA register
D3) At the end of the transfer, param set 2 is not chained.
E) At the next ePWM_INT_0 the steps B-C-D are repeated because, differently from Linking, the Param set retained during the chaining.
Is my understanding correct? Can this procedure work?
QUESTION 2
Each DMA channel points to a specific Param set in accordance with the content of the register DCHMAP.
Is it possible to write the register DCHMAP by means of EDMA MODULE?
For example:
1) The content of L2 SRAM 80'0000h contains the address of Param set 1
2) The module ePWM_0 generates the interrupt ePWM_INT_0 that is served by DMA channel 32.
3) DMA channel 32 points to Param Set 0.
4) Param set 0 is served: the content of address 80'0000h is copied in DCHMAP_33
5) At the end of transfer, DMA channel 33 points to Param set 1
Thanks for your support.
Best Regards,
Benito