2021-08-01 11:23 AM
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
2021-08-01 11:30 AM
Why do you think it should be nonzero? Are you populating data and managing cache correctly?
2021-08-01 12:25 PM
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}
2021-08-02 07:27 AM
any help?
2021-08-02 07:28 AM
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}
2021-08-02 07:39 AM
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.
2021-08-02 11:59 AM
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}
2021-08-02 02:18 PM
>>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?
2021-08-02 02:20 PM
FFS you post no actual compilable, readable or testable code snippet.