cancel
Showing results for 
Search instead for 
Did you mean: 

PROBLEM IN "STM32h743" "DMA" "UART" in "IAP" MODE

mika.1
Associate II

HELLO EVERYONE

I run my micro in IAP Mode then load other program to him with uart1 . in this program I start UART with DMA and toggle one Pin . when the circuit start working , everything work well and pin is toggle but the UART DMA send out zero.

VECT_TAB_OFFSET 0x08060000UL 

RAM 0x24000000

thanks for your attention and help

8 REPLIES 8
TDK
Guru

Why do you think it should be nonzero? Are you populating data and managing cache correctly?

If you feel a post has answered your question, please click "Accept as Solution".
mika.1
Associate II

when i load program into stm normaly(without iap) the toggle and uart dma work correctly

i used HAL_UART_Transmit_DMA and send 4 byte data {0x01,0x02,0x03,0x04}

in normal stm programing the HAL_UART_Transmit_DMA work correctly and send {0x01,0x02,0x03,0x04} but in iap method programing , HAL_UART_Transmit_DMA ,send 4 byte zero {0x0 ,0x0,0x0,0x0}

mika.1
Associate II

any help?

mika.1
Associate II

when i load program into stm normaly(without iap) the toggle and uart dma work correctly

i used HAL_UART_Transmit_DMA and send 4 byte data {0x01,0x02,0x03,0x04}

in normal stm programing the HAL_UART_Transmit_DMA work correctly and send {0x01,0x02,0x03,0x04} but in iap method programing , HAL_UART_Transmit_DMA ,send 4 byte zero {0x0 ,0x0,0x0,0x0}

TDK
Guru

Please don't mark the post as answered if it's not solved.

The chip doesn't know the method that firmware was loaded onto it. It should not behave differently if you load it via "normal stm programming" or via the bootloader. Use STM32CubeProgrammer to ensure the FLASH contents are the same under both the working and non-working scenarios. Ensure data cache is handled appropriately, or disabled.

If you feel a post has answered your question, please click "Accept as Solution".
mika.1
Associate II

i disable the D-Cache for ensure about that and check the flash content with STM32CubeProgrammer and see true hex value in the 0x8000000 and 0x8060000.

if i use HAL_UART_Transmit , everything is true and {0x01,0x02,0x03,0x04} ,but when I use DMA mode, the send data are {0x0 ,0x0,0x0,0x0}

>>in normal stm programing the HAL_UART_Transmit_DMA work correctly and send..

Ok, but how does the mode the Target's in have ANYTHING to do with how the Host transmits data?

Scratch your head really hard 0n that.

Do you change the memory address of the DMA buffer?

Is it in non-cached memory?

Is it in memory accessible to the DMA unit?

Any errors or status thrown?

Configuring the DMA and Interrupts the same?

How is the Host configured differently when the Target is in IAP mode? 9-bit USART (8-bit Data + Even Parity?)

DMA should perhaps be in 16-bit words?

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

FFS you post no actual compilable, readable or testable code snippet.

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