DMA Freezes CPU STM32F401
I am using STM32F401, I had an application which communicates via USART1 by using DMA2. Both RX and TX DMAs are working fine. So I added a bootloader and moved application to 0x08008100. Bootloader is using same USART1 and DMA2. Now bootloader is working fine but I have problem with application.
All I changed in application is start address. Bootloader jumps to application, timer interrupt is working fine and toggles LED. When it receives or transmits a data via DMA it stops, LED is not toggling anymore. When debugging I tried these:
* SCB->VTOR is already set as 0x08008100. Timer interrupt is working fine.
* I changed application's start address back to 0x08000000 and its working fine.
* I removed USART and DMA code from bootloader so it only jumps to application. It didn't solve the problem (it lloks like not deinitialize-initialize issue).
* I added USART and DMA to bootloader back. In the application I didn't use DMA when sending data with USART, it could send without any problem. I tried this a few times, it stops when sending data with USART DMA but keeps working when sending without DMA.
* In the application, I added HAL_DMA_DeInit before HAL_DMA_Init, it stops before even trying to send message.
How can I solve this issue? Thank you.
