Question
How to change NDTR after enabling DMA stream?
I can want to change NDTR after enabling DMA stream. but I can't. This is the part of code
...
LL_DMA_EnableStream(DMA1, LL_DMA_STREAM_5);
// works fine now
// but I want to change the data length only
LL_DMA_SetDataLength(DMA1, LL_DMA_STREAM_5, 11); // this doesn't work
LL_DMA_DisableStream(DMA1, LL_DMA_STREAM_5);
LL_DMA_SetDataLength(DMA1, LL_DMA_STREAM_5, 12); // this works
LL_DMA_EnableStream(DMA1, LL_DMA_STREAM_5); // but this doesn't work !!I checked the result in SFRs of debugger.