1503 views|0 replies

3836

Posts

19

Resources
The OP
 

EDMA3.0 Application of DM648 [Copy link]

I debugged DM648 some time ago and I have some notes to share with you. Although there are not many people who use DM648, it is difficult to find information about 64+, so I sorted out the relevant notes and posted them, hoping to provide some convenience for friends who are working on 64+. The following function describes the process from EDMA configuration to startup (complete register-level operation, which is more conducive to understanding the operation process of EDMA3.0). EDMA_init() { /* Step 1: Initialize EDMA registers*/ QUEPRI=0x10; //queue priority setting, 0, 2, 3 are level 0, 1 is level 1 QWMTHRA =(16<<8u)|(16 & 0xFF); //queue overlength error setting, 0, 1 are both 16, 2, 3 are 0 EMCR = 0xFFFFFFFF; //Clear all EDMA event loss flags CCERRCLR = 0xFFFFFFFF; //Clear all EDMA3CC errors //Take VP2 brightness event trigger as an example /* Step 2: Programming DMA Channel (and Param set) */ DCHMAP32=0x80<<5; //Corresponding to EVENT32 and the 128th PARAM DMAQNUM4=0x0; //Corresponding EVENT32 item to QUEUE0 channel //Set the 128th PARAM value, and set the reload table to 129th item OPT128 = 0x00105301; // TCINTEN is set,A sync,TCC=5,64bit FIFO SRC128 = YSRCA2; A_B_CNT128 = ((frameCount << 16u) | (elementCount & 0xFFFFu)); // ACNT = 1536, BCNT = 2 DST128 = (unsigned int )line_buffer2; SRC_DST_BIDX128 = (elementCount << 16u) | (0u); // SRC_BIDX = 0, DST_BIDX = 1536 //After a complete EDMA move, use the 129th PARAM table to load the 128th table LINK_BCNTRLD128 = (frameCount << 16u) | 0x1020u; // LINK = 129, BCNTRLD = 1 SRC_DST_CIDX128 = (elementCount << 16u) | (0u); CCNT128 = 1; //The 129th PARAM table is a backup table, used to reload to the 128th PARAM table OPT129 = 0x00105301; // TCINTEN is set,A sync,TCC=5,64bit FIFO SRC129 = YSRCA2; A_B_CNT129 = ((frameCount << 16u) | (elementCount & 0xFFFFu)); // ACNT = 1536, BCNT = 2 DST129 = (unsigned int )line_buffer2; SRC_DST_BIDX129 = (elementCount << 16u) | (0u); // SRC_BIDX = 0, DST_BIDX = 1536 //Load the 129-item PARAM table into the 128th item table, still pointing to the 129th PARAM table LINK_BCNTRLD129 = (frameCount << 16u) | 0x1020u; // LINK = 129, BCNTRLD = 1 SRC_DST_CIDX129 = (elementCount << 16u) | (0u); CCNT129 = 1; /* Step 3: Triggering the Transfer and Waiting for Transfer Completion */ EESRH = 0x1; //enable event VP2EVTYA channel , number 32 // ESRH = 0x1; //Can be used to manually trigger EDMA events during debugging and observe the working status of the EDMA module }


This post is from DSP and ARM Processors
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list