2017-10-06 02:31 AM
Hi guys,
i tryed to use the CRC Modul with DMA Access but it doesn't work.
My first step is to configure the DMA Channel.
DMA.TCD[3].SSIZE = 2 /** 4 Bytes **/
DMA.TCD
[3]
.DSIZE = 4DMA.TCD
[3]
.SOFF = 4DMA.TCD
[3]
.DOFF = 0DMA.TCD
[3]
.DADDR = (uint32_t) &CRC.INP.RDMA.TCD
[3]
.NBYTES = 4DMA.TCD
[3]
.DREQ = 1I try to send Data in the following way.
DMA.TCD
[3]
.SADDR = (uint32_t)&source; DMA.TCD[3]
.BITER = amount; DMA.TCD[3]
.CITER = amount;DMA.ERQL.B.ERQ3 = 1;
I'm using the SPC57 with the Hightec Compiler / IDE. Could anyone tell me where my error is ?
Solved! Go to Solution.
2017-10-30 01:44 AM
Hi Erwan,
sorry for my late answer, i was on vacation.
The µC is the SPC570S40.
I think i found the Problem. I have to set the configuration of Nbytes before i start the transmit.
My new Transmit function is:
void HAL_Dma_TransmitCrc(uint32_t *source, uint16_t amount){ DMA.TCD[HAL_DMA_CHANNEL_CRC].SADDR = (uint32_t)source; DMA.TCD[HAL_DMA_CHANNEL_CRC].BITER = amount; DMA.TCD[HAL_DMA_CHANNEL_CRC].CITER = amount; DMA.TCD[HAL_DMA_CHANNEL_CRC].NBYTES = amount; DMA.TCD[HAL_DMA_CHANNEL_CRC].START = 1;}That work's fine.
2017-10-06 07:03 AM
Hello David ,
Could you confirm your microcontroller used ?
Did you start your DMA request ?
Best regards
Erwan
2017-10-30 01:44 AM
Hi Erwan,
sorry for my late answer, i was on vacation.
The µC is the SPC570S40.
I think i found the Problem. I have to set the configuration of Nbytes before i start the transmit.
My new Transmit function is:
void HAL_Dma_TransmitCrc(uint32_t *source, uint16_t amount){ DMA.TCD[HAL_DMA_CHANNEL_CRC].SADDR = (uint32_t)source; DMA.TCD[HAL_DMA_CHANNEL_CRC].BITER = amount; DMA.TCD[HAL_DMA_CHANNEL_CRC].CITER = amount; DMA.TCD[HAL_DMA_CHANNEL_CRC].NBYTES = amount; DMA.TCD[HAL_DMA_CHANNEL_CRC].START = 1;}That work's fine.