cancel
Showing results for 
Search instead for 
Did you mean: 

firmware relocation fail due to DMA enable

MHo.15
Associate III

Hi,

   I have a firmware runing on STM32F405RGT6 whith is reloacted at 0x800C000 and is called by a bootloader. The problem is if I enable UART DMA, the program will be interrupted by non stopping DMA interrupt immediately. However, there is no stream data in the UART port.  The same code work well if it run without a bootloader, ie start 0x8000000.

   This is weird , it seems the UART DMA HAL driver is not relocation compatible. Could anyone know me why or provide some possible cause ? Thanks.

  Martin 

1 ACCEPTED SOLUTION
4 REPLIES 4

Check interrupts are enabled.

Check that SCB->VTOR points at the new firmware base. Code typically in SystemInit 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hi Piranha,

   I replace the bootloader  code in this thread to my bootloader. The problem is still the same. Thanks for providing this clue. I think it is a good starting point, I need to clean something more before jumping to the applicantiong.  What could that be ?

Martin

The problem fixed. The cause is I enabled the UART DMA in the bootloader ( because it is modified from APP ). It works well once I do not enable UART DMA in the bootloarder.