cancel
Showing results for 
Search instead for 
Did you mean: 

How I can program STM32U5 via USART from Embedded Linux?

ASavi.3
Associate II

Hi,

I've used stm32flash on my processor with embedded Linux to program STM32U5 via USART. When I enter a command ./stm32flash /dev/ttymxc0 (usart interface connected to the STM32U5). I got a message "Failed to init device".

On the stm32flash site I found that stm32flash is missing support for STM32U575/U585 and that it is necessary to fill data about stm32u5 in dev_table.c file. In struct devices I need to fill: SRAM address range, FLASH address range, PPS (pages per sector), PSize (page size), Option byte address range, System memory address range and flags. I can't find any range for option byte address and how to fill flags field. Can you help me? How can I fill it? I tried to enter data without option byte address range and flags, but again message is "Failed to init device".

Is there any other program for serial programming stm32u5 from embedded linux? Has anyone managed to program stm32u5 via uart using stm32flash from embedded linux?

P. S. I read AN2606 and tried all combinations of bootloader activation pattern 12.

Thank you in advance,

Best regards,

Ana Savic

2 REPLIES 2
CMYL
ST Employee

Hi Ana,

To be sure that the issue is not some missing files in Linux, did you tried the same with windows ?

I will check from my side also if someone already ran the use case in windows.

Best regards,

Younes

CMYL
ST Employee

can you refer to ~STM32Cube_FW_U5_V1.0.0\Projects\B-U585I-IOT02A\Applications\OpenBootloader

project, may be it can help

Younes