cancel
Showing results for 
Search instead for 
Did you mean: 

I'm trying to program a stm32l031k6 MCU using the UART interface and cube programmer.

Fabry
Associate

BOOT0 is high and the chip is reset. Using the following command:

./STM32_Programmer_CLI -c port=/dev/ttyUSB0 -vb 3 -ob displ

i'm getting the following result:

     -------------------------------------------------------------------

                       STM32CubeProgrammer v2.1.0                 

     -------------------------------------------------------------------

 

Serial Port /dev/ttyUSB0 is successfully opened.

Port configuration: parity = even, baudrate = 115200, data-bit = 8,

                    stop-bit = 1,0, flow-control = off

No Init bits value is : 0

 

Sending init command:

byte 0x7F sent successfully to target

Wait ends after 1 loop, dataready = 1, delay = 1

Received response from target: 0x00

byte 0x7F sent successfully to target

Received response from target: 0x00

Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again...

My USB to serial interface shows data going both ways (so apparently the MCU somehow reacts to the connection attempt) but I can't get to activate the device. I tried many uart settings but no luck so far.

2 REPLIES 2

Is design viable? Can you connect to it via ST-LINK/SWD? What voltage do you see on NRST?

Do you have any other pin activity that the device would perceive as an alternate connection? See AN2606 for pins it looks for signals on.

One can use RealTerm in hex mode to test if the device is responsive. Use 9600 8E1, and send the 0x7F immediately after reset, you get one-shot, and check for response.

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

I tried with a diffrent USB serial adapter and it's working now, the ftdi cable I was using was expecting 5V level I reckon.

Thanks and sorry for wasting your time.