Other Parts Discussed in Thread: HALCOGEN
Tool/software: Code Composer Studio
I am in the process of porting the http://www.ti.com/lit/an/spna121a/spna121a.pdf
The code from the example project posted is quite different from the example provided with what looks like a different register structure and will not compile.
/* - Populate dma control packets structure */
g_dmaCTRLPKT.CHCTRL = 0; /* channel control */
g_dmaCTRLPKT.ELCNT = 1; /* element count */
g_dmaCTRLPKT.ELDOFFSET = 0; /* element destination offset */
g_dmaCTRLPKT.ELSOFFSET = 0; /* element source offset */
g_dmaCTRLPKT.FRDOFFSET = 0; /* frame destination offset */
g_dmaCTRLPKT.FRSOFFSET = 0; /* frame source offset */
g_dmaCTRLPKT.PORTASGN = 4; /* port b */
g_dmaCTRLPKT.RDSIZE = ACCESS_8_BIT; /* read size */
g_dmaCTRLPKT.WRSIZE = ACCESS_8_BIT; /* write size */
g_dmaCTRLPKT.TTYPE = FRAME_TRANSFER ; /* transfer type */
g_dmaCTRLPKT.ADDMODERD = ADDR_INC1; /* address mode read */
g_dmaCTRLPKT.ADDMODEWR = ADDR_FIXED; /* address mode write */
g_dmaCTRLPKT.AUTOINIT = AUTOINIT_OFF; /* autoinit */
The instructions in the provided example also state the following VIM configuration:
* - Enable GIO(optional), SCI2, drivers
*
* Vim Channel 0-31
* - Enable VIM channel 13 (LIN1 High) Interrupt (Optional)
*
* Vim Channel 32-63
* - Enable VIM channel 40 (DMA BTCA) Interrupt
I do not have background to understand what registers are intended to be used for the TMS570LC4357 platform.
Could you post the HL_sys_main.c that is intended to be used for the TMS570LC4357 DMA example?
Much thanks