Hi everyone.
Could you explain me next problem.
I try to use "Single buffer" mode for DMA
15.5.3 Single buffer
This generally applies to memory to memory moves, and peripheral DMA that occurs only
occasionally and is set up for each transfer. For this kind of operation, only the initial
channel descriptor shown in Table 305 is needed.
This case is identified by the Reload bit in the XFERCFG register = 0. When the DMA
channel receives a DMA request or trigger (depending on how it is configured), it performs
one or more transfers as configured, then stops. Once the channel descriptor is
exhausted, additional DMA requests or triggers will have no effect until the channel
configuration is updated by software.
So in this case I don not set reload bit in XFERCFGn register but after XFERCOUNT got = 0x3FF DMA still continue to send data to I2S.
Thank you, Serhii.
Hi jeremyzhou.
Thank you for your reply. Yes, you are right the DMA wouldn't stop even if the description exhaust. I have done a test with handling of an interrupt flag that indicate the completion of DMA transferring.
void DMA0_DriverIRQHandler(void)
{
if (I2S_DMA->COMMON[0].INTA & (1U << I2S_DMA_TX_CHANNEL)) // Channel uses INTA flag
{
I2S_DMA->COMMON[0].INTA |= (1U << I2S_DMA_TX_CHANNEL); // Clear INTA flag
}
}
But DMA still continue to send data to I2S.
Could you explain a little bit when you are talking about it seems impossible ?
Have a great day, Serhii.
Hi Sergey Lozhechka,
Thanks for your reply.
It seems a bit weird, I also have no idea with this phenomenon now.
So I was wondering if you can share a compile-able single buffer demo and share it with me.
In addition, this demo had better do a memory-to-memory move, as it can make me debug easily.
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Sergey Lozhechka,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
In my opinion, it seems impossible.
According to your description, the DMA wouldn't stop even if the description exhaust, is it right?
Whether you try to set an interrupt flag to indicate the completion of DMA transferring.
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------