Dec 06, 2017
06:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 06, 2017
06:43 AM
When is the DMA transfer complete Interrupt set?
I am using the DMA to Transfer data from Memory to a USICin SPI mode. In the DMA Interrupt set to "Transfer complete" I remove the slave select signal. What I see is that the last Byte is not transferred correcly (only one clock pulse instead of 8).
It looks like the Interrupt is coming when the source transfers are complete and not when the destination transfers are complete. Is this true?
I am using the DMA to Transfer data from Memory to a USICin SPI mode. In the DMA Interrupt set to "Transfer complete" I remove the slave select signal. What I see is that the last Byte is not transferred correcly (only one clock pulse instead of 8).
It looks like the Interrupt is coming when the source transfers are complete and not when the destination transfers are complete. Is this true?
- Tags:
- IFX
2 Replies
Dec 14, 2017
10:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 14, 2017
10:15 AM
Hi,
Which USIC event are you using to trigger the DMA? In SPI mode you should be using the receive events. This one will tells you when the slave has received the last byte and you can safely deaasert the chip select.
Regards,
Jesus
Which USIC event are you using to trigger the DMA? In SPI mode you should be using the receive events. This one will tells you when the slave has received the last byte and you can safely deaasert the chip select.
Regards,
Jesus
Dec 15, 2017
12:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 15, 2017
12:12 AM
As the USIC is in SPI master mode, I am using the transmit interrupt. I have found the best solution is to use the USIC TX FIFO and trigger the DMA on the TXFIFO_EVENT_CONF_STANDARD. This way the DMA can send bursts of data.
I solved the slave select problem by using the XMC_SPI_CH_DisableFEM() function. This way the slave select is automaticcaly removed when there is no more data in the FIFO.
This combination is working great.
I solved the slave select problem by using the XMC_SPI_CH_DisableFEM() function. This way the slave select is automaticcaly removed when there is no more data in the FIFO.
This combination is working great.