Hi,
I am strugging a little with the example_mibspiDma.c example included in HalCoGen. I had to modify it to MibSpi3 because I am using a custumized bord, SPI1 is in use. DMA-Transfer seems to work, but not for the first three words in an transaction. Hope someone can help, here the lines I modified:
dmaReqAssign(DMA_CH2, 14); // request line for MibSPI is 14
damSetCtrlPacket(DMA_CH2 ,g_dmaCTRLPKT); //dma control packet
dmaSetChEnable(DMA_CH2, DMA_HW);
mibspiDmaConfig(mibspiREG3,DMA_CH,0,1); // not too sure what this does, specially this part: mibspi->DMACTRL[channel] |= (((rxchannel<<4)|txchannel) << 16);
It's actually just the beginning of something bigger, here's, what I actually want to do
-Send large arrays of 8-Bit-data (each >1k)
- delay after each packet; I am guessing HW-Trigger, for example HET would be applicable
Example:
uint8 TxBuf[50[1000];
send TxBuf[0][0]->DELAY-10ms->send TxBuf[1][0]->DELAY_10ms ........send TxBuf[49][0]->DELAY_10ms->sendTxBuf[0][0] ....
But right now I am stuck on the simple DMA example.
Regards,
Juergen