SPRAD24 august 2023 AM2631 , AM2632 , AM2632-Q1 , AM2634 , AM2634-Q1 , AM263P4 , AM263P4-Q1
EDMA is configured to transfer data every EPWM7 SOCA event. To specify more details on the transfer, the function in the following line 1 is defined to initialize the EDMA with the location of data, size of data, and the location of DAC value register. To update the details, the function in the following line 2 is defined to change content of EDMA input table and DAC excitation output.
RDCexc_start needs to be called before control loop running, and RDCexc_update can be called while control loop running. The purpose of RDCexc_update is to reduce misalignment between excitation phase and sample time. Excitation phase can be adjusted by shifting the pointer of the input table before calling RDCexc_update. Examples are given in the following lines for both functions.
One element of a table in global scope is connected to gRDCtable_ptr. The table contains points of multiple full sine wave cycles. The element is in middle of the table so that the pointer can be shifted either right or left for excitation phase adjustment during operation. There are 20 points within one cycle. So, the length of EDMA input table is 20. EDMA handle, XBAR information and DAC address are available in configuration files.