cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to init device while flashing over UART STM32U031

jessec
Visitor

I am trying to use stm32flash to program my board over UART. I understand that the board needs to be in boot mode in order for this to be accomplished, so using the STM32CubeProgrammer I have tried setting the resisters appropriately.

BOOT_lOCK: set to unchecked for booting based on option bit configuration

NBOOT_SEL: set to checked to use the NBOOT0 option bit instead of the BOOT0 pin

nBOOT1: Checked for when BOOT0 is 0 to boot from system memory

nBOOT0: unchecked to set to 0

Based on what I've read in AN2606, I should be following pattern 15 which should match what I have above, though there is no nBoot0_SW as is described in the documentation but I assume that is just NBOOT_SEL?

I also have my st device flashed over JTAG with a program that initializes LPUART1 instead of regular UART1, not sure if this causes issues with flashing over UART. My uart configuration is 8 bit, no parity and 1 stop bit.

I then connect my devices uart pins to a pi that has stm32flash installed on it as well as a binary to flash. I try to program the device using /dev/serial0, setting my baud rate appropriately and selecting serial mode 8n1 to match my uart settings. After this the output I get is 'Failed to init device'

Is there something else I am missing to do? 

0 REPLIES 0