Boot pin is connected to 142 and Reset is connected to 143. Then i have done the following commands for flashing.
amba_debug -g 142 -d 0x1
sleep 0.4
amba_debug -g 143 -d 0x0
sleep 0.3
amba_debug -g 143 -d 0x1
sleep 0.3
amba_debug -g 142 -d 0x0
/usr/bin/stm32flash /dev/ttyS3 -w /lib/firmware/mcu_fw/AKTU_DCPC_MCU_FW_V1_0.bin -b 115200
sleep 0.4
amba_debug -g 2 -d 0x0
sleep 1
amba_debug -g 2 -d 0x1
sleep 1
amba_debug -g 1 -d 0x0
after this iam getting the following error:
stm32flash 0.5
http://stm32flash.sourceforge.net/
Using Parser : Raw BINARY
Interface serial_posix: 115200 8E1
Failed to init device
please help me to resolve this issue
Anonymous
"Failed to init device" can be because it is not in bootloader mode, or it has detected some activity on another bootloader channel than the serial port that you are connecting with.
Hi, Thanks for the response. Now iam able to connect with the device. When iam trying to flash the device iam getting the following result.
stm32flash /dev/ttyS1 -w /lib/firmware/mcu_fw/test1_l010rb.elf -b 115200
stm32flash 0.7
http://stm32flash.sourceforge.net/
Using Parser : Raw BINARY
Size : 668104
Interface serial_posix: 115200 8E1
Version : 0x31
Option 1 : 0x00
Option 2 : 0x00
Device ID : 0x0447 (STM32L01xxx/02xxx)
RAM : Up to 2KiB (0b reserved by bootloader)
Flash : Up to 16KiB (size first sector: 32x128)
Option RAM : 32b
System RAM : 4KiB
Write to memory
Erasing memory
Wrote address 0x08004000 (2.45%) Done.
Kindly confirm this message shows the flashinh has been done successfully or not? if yes, the microcontroller is not booting after flashing even after making the boot pin low.
Great that you could connect. You must not flash an ".elf" file, but a raw binary file.
You can use the -v option to verify the flashing at the same time. You can also use -r to read back from flash afterwards (while still in the bootloader, before resetting), and compare with the original file.