2022-12-14 08:02 AM
Hello everyone,
I work on a project with STM32L072CBT6.
I want to use a DMA RX on LPUART1, after reading differents ressources i have setup my LPUART and my DMA.
I want to receive an interrupt from my DMA when transmit IDLE (end of transmit).
My problem is the following, when i download my firmware and check my debug, no interrupt are flaged. When i power down/up my card, my interrupt work only once.
I have try differents things but i have obtain no result.
I would like to know if you have advice that can help me about this problem ?
Thanks for your help,
Best regards,
MLam
DMA Configuration
LPUART1 Configuration
NVIC Configuration
Solved! Go to Solution.
2022-12-16 03:24 AM
The solution was to memset to 0 the buffer that i give to the DMA. I memset in the interrupt function just before recall HAL_UARTEx_ReceiveToIdle_DMA
2022-12-14 08:49 AM
Hey,
After new tests, i found that the problem come from my iprintf.
When i made my test, my debug message in my fonction erase in my terminal the iprintf which come from my interrupt.
To conclude the DMA works but the debug information are not correct.
To find this i have test my code alone in a new project. This code works so i put the project in attached document if this can help someone.
2022-12-16 01:20 AM
Hey,
In the same orientation, i would like to clear my buffer. So i try to make a memset of the buffer that i give to my DMA.
I have try to clear the before withtout a stop and i have try with a stop. But nothing works and he keep information into the buffer.
Do you have advice that can help me to clear this buffer ?
Best regards,
2022-12-16 03:24 AM
The solution was to memset to 0 the buffer that i give to the DMA. I memset in the interrupt function just before recall HAL_UARTEx_ReceiveToIdle_DMA