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.
Tool/software: TI C/C++ Compiler
Hi
I trying to prepare a simple example with the SCI-LIN interface that transmits data via DMA. I found various examples for similar processors but it seems I miss something important. The SCI LIN interface seems to be set up properly, I can send and receive data. But as soon as I switch to DMA mode no data is transmitted. I set up the basic project via HalCoGen.
What I cannot figure out is:
I use the following procedure:
// Global data U8 hello[] = "*** Hello World ***\r"; // Within Main function dmaReqAssign(DMA_CH0, 27); //is 27 correct ??? g_dmaCTRL ctrl = { .CHCTRL = 0, .SADD = (uint32) hello, /* source address */ .DADD = ((uint32) &(scilinREG->TD)) + 3, /* initial dest. address, big endian */ .RDSIZE = ACCESS_8_BIT,/* readsize*/ .WRSIZE = ACCESS_8_BIT,/* writesize*/ .ELCNT = 1, /* element count */ .FRCNT = 20, /* frame count*/ .PORTASGN = 4, .TTYPE = FRAME_TRANSFER, .ADDMODERD = ADDR_INC1, /* address mode read */ .ADDMODEWR = ADDR_FIXED, /* address mode write */ .AUTOINIT = AUTOINIT_OFF }; /* - setting dma controlpacketsfor transmi t*/ dmaSetCtrlPacket(DMA_CH0, ctrl); /* - setting the dma channelto triggeron h/w request */ dmaSetChEnable(DMA_CH0, DMA_HW); dmaEnable(); while ((dmaREG->GCTRL & DMA_GCTRL_BUSBUSY) != 0U) { } /* Wait */ /* EnableTX DMA */ scilinREG->SETINT |= (1 << 16);
Thanks for any help.
Best regards, Valentin
Hello,
DMA Request lines for SCI/LIN is as follows:
LIN receive <-- DMAREQ[28]
LIN transmit --> DMAREQ[29]
You can refer to Table 6-28. DMA Request Line Connection of device datasheet ( ).
At 100MHz Peripheral Clock, 3.125 Mbits/s is the Max Baud Rate achievable.
Baud rate can be calculated according to formulas from section 26.2.3 in device TRM ( )
Best regards,
Miro
Thanks a lot Miro! I was not aware that the information is split into two documents. I checked only the Technical Reference Manual. It seems to work now.
Thanks again, Valentin