Alot closer! Thank you so much .rpv & fpiSTM, can't believe I let a comment fool me
The blink sketch is now compiling, but I'm receiving these errors when flashing the STM32L1 via FTDI to USART serial1 (PA10(rx) & PA9(tx)) with both the arduino ide, and STM32 Cube programmer:
Code: Select all
-------------------------------------------------------------------
STM32CubeProgrammer v2.2.1
-------------------------------------------------------------------
Serial Port COM10 is successfully opened.
Port configuration: parity = even, baudrate = 115200, data-bit = 8,
stop-bit = 1.0, flow-control = off
Activating device: OK
Chip ID: 0x429
BootLoader protocol version: 3.1
Device name : STM32L100x6xxA/STM32L100x8xxA/STM32L100xBxxA/STM32L15xx6xxA/STM32L15xx8xxA/STM32L15xxBxxA
Response received from device: NACK
Error: Number of bytes to be be read at address: 0x1FF8004C not acknowledged!
Flash size : 128 KBytes (default)
Device type : MCU
Device CPU : Cortex-M3
Error: RDP level is set to 1 (0xBB), try using Read UnProtect (-rdu) command in order to remove the Read Out Protection.
RUNNING Program ...
Address: : 0x8000000
Response received from device: NACK
Error: Problem encountred during the start operation
Error: Start operation failed
This MCU is fresh from the factory. Also it is 64KB Flash size, not 128KB as shown in the logs above...?
This is the Verbose output when just trying to connect to the device with STM cube programmer:
Code: Select all
19:03:02:388 : Serial Port COM10 is successfully opened.
19:03:02:389 : Port configuration: parity = even, baudrate = 9600, data-bit = 8, stop-bit = 1.0, flow-control = off
19:03:02:389 : No Init bits value is : 0
19:03:02:390 : Sending init command:
19:03:02:394 : byte 0x7F sent successfully to target
19:03:02:474 : Wait ends after 1 loop, dataready = 1, delay = 6
19:03:02:475 : Received response from target: 0x79
19:03:02:475 : Activating device: OK
19:03:02:475 : Sending GetID command and its XOR:
19:03:02:475 : byte 0x02 sent successfully to target
19:03:02:476 : byte 0xFD sent successfully to target
19:03:02:476 : Wait ends after 1 loop, dataready = 1, delay = 4
19:03:02:476 : Received response from target: 0x79
19:03:02:476 : Received response from target: 0x01042979
19:03:02:476 : Chip ID: 0x429
19:03:02:477 : Sending Get command and its XOR:
19:03:02:477 : byte 0x00 sent successfully to target
19:03:02:477 : byte 0xFF sent successfully to target
19:03:02:477 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:02:477 : Received response from target: 0x79
19:03:02:478 : Received response from target: 0x0b
19:03:02:478 : size of bytes in the response: 11
19:03:02:478 : Received response from target: 0x31000102112131446373829279
19:03:02:478 : Full received response: 0b31000102112131446373829279
19:03:02:478 : BootLoader protocol version: 3.1
19:03:02:478 : byte 0x11 sent successfully to target
19:03:02:479 : byte 0xEE sent successfully to target
19:03:02:481 : data sent successfully to target: 0x0800000008
19:03:02:505 : byte 0x00 sent successfully to target
19:03:02:506 : byte 0xFF sent successfully to target
19:03:02:511 : Sending GetID command and its XOR:
19:03:02:511 : byte 0x02 sent successfully to target
19:03:02:512 : byte 0xFD sent successfully to target
19:03:02:523 : Wait ends after 1 loop, dataready = 1, delay = 16
19:03:02:524 : Received response from target: 0x79
19:03:02:525 : Received response from target: 0x01042979
19:03:02:615 : byte 0x11 sent successfully to target
19:03:02:616 : byte 0xEE sent successfully to target
19:03:02:640 : data sent successfully to target: 0x0800000008
19:03:02:655 : byte 0x00 sent successfully to target
19:03:02:656 : byte 0xFF sent successfully to target
19:03:02:673 : Sending Read command and its XOR:
19:03:02:673 : byte 0x11 sent successfully to target
19:03:02:673 : byte 0xEE sent successfully to target
19:03:02:689 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:02:689 : Received response from target: 0x79
19:03:02:689 : Sending Read address and its checksum:
19:03:02:690 : data sent successfully to target: 0x1ff80000e7
19:03:02:741 : Wait ends after 1 loop, dataready = 1, delay = 16
19:03:02:742 : Received response from target: 0x79
19:03:02:742 : Sending number of bytes to be read - 1 and its checksum:
19:03:02:742 : data sent successfully to target: 0x03fc
19:03:02:742 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:02:743 : Received response from target: 0x79
19:03:02:743 : Received response from target: 0xaa0055ff
19:03:02:743 : Database: Config 0 is active.
19:03:02:743 : byte 0x11 sent successfully to target
19:03:02:743 : byte 0xEE sent successfully to target
19:03:02:744 : data sent successfully to target: 0x0800000008
19:03:02:769 : byte 0x00 sent successfully to target
19:03:02:770 : byte 0xFF sent successfully to target
19:03:02:770 : Sending Read command and its XOR:
19:03:02:770 : byte 0x11 sent successfully to target
19:03:02:770 : byte 0xEE sent successfully to target
19:03:02:783 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:02:783 : Received response from target: 0x79
19:03:02:784 : Sending Read address and its checksum:
19:03:02:784 : data sent successfully to target: 0x1ff8004cab
19:03:02:796 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:02:797 : Received response from target: 0x79
19:03:02:797 : Sending number of bytes to be read - 1 and its checksum:
19:03:02:797 : data sent successfully to target: 0x03fc
19:03:02:797 : Received response from target: 0x1f
19:03:02:797 : Response received from device: NACK
19:03:02:798 : Error: Number of bytes to be be read at address: 0x1FF8004C not acknowledged!
19:03:02:798 : failed to read the requested memory content
19:03:02:798 : Could not read flash size at address 0x1ff8004c
19:03:06:877 : Sending Read command and its XOR:
19:03:06:877 : byte 0x11 sent successfully to target
19:03:06:877 : bytesToWrite before send = 1
19:03:06:877 : bFlushRet = 1, bytesToWrite after flush() = 1
19:03:06:937 : waitForBytesWritten Error : The wait operation timed out.
19:03:06:938 : byte 0xEE sent successfully to target
19:03:06:938 : Wait ends after 1 loop, dataready = 1, delay = 7
19:03:06:938 : Received response from target: 0x79
19:03:06:938 : Sending Read address and its checksum:
19:03:06:938 : data sent successfully to target: 0x1ff8004cab
19:03:06:938 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:06:938 : Received response from target: 0x79
19:03:06:938 : Sending number of bytes to be read - 1 and its checksum:
19:03:06:939 : data sent successfully to target: 0x03fc
19:03:06:939 : Received response from target: 0x1f
19:03:06:939 : Response received from device: NACK
19:03:06:939 : Error: Number of bytes to be be read at address: 0x1FF8004C not acknowledged!
19:03:06:939 : failed to read the requested memory content
19:03:06:940 : Could not read flash size at address 0x1ff8004c
19:03:06:940 : Sending Read command and its XOR:
19:03:06:940 : byte 0x11 sent successfully to target
19:03:06:940 : bytesToWrite before send = 1
19:03:06:940 : bFlushRet = 1, bytesToWrite after flush() = 1
19:03:06:940 : waitForBytesWritten Error : The wait operation timed out.
19:03:06:940 : byte 0xEE sent successfully to target
19:03:06:941 : Wait ends after 1 loop, dataready = 1, delay = 9
19:03:06:941 : Received response from target: 0x79
19:03:06:941 : Sending Read address and its checksum:
19:03:06:941 : data sent successfully to target: 0x1ff8004cab
19:03:06:941 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:06:941 : Received response from target: 0x79
19:03:06:942 : Sending number of bytes to be read - 1 and its checksum:
19:03:06:942 : data sent successfully to target: 0x03fc
19:03:06:942 : Received response from target: 0x1f
19:03:06:942 : Response received from device: NACK
19:03:06:942 : Error: Number of bytes to be be read at address: 0x1FF8004C not acknowledged!
19:03:06:942 : failed to read the requested memory content
19:03:06:942 : Could not read flash size at address 0x1ff8004c
19:03:06:942 : Sending GetID command and its XOR:
19:03:06:942 : byte 0x02 sent successfully to target
19:03:06:943 : byte 0xFD sent successfully to target
19:03:06:943 : Wait ends after 1 loop, dataready = 1, delay = 14
19:03:06:943 : Received response from target: 0x1f
19:03:06:943 : Response received from device: NACK
19:03:06:943 : Error: GETID command not acknowledged!
19:03:06:943 : Reemission of GetID command
19:03:06:943 : Sending GetID command and its XOR:
19:03:06:943 : byte 0x02 sent successfully to target
19:03:06:944 : byte 0xFD sent successfully to target
19:03:06:944 : Received response from target: 0x79
19:03:06:944 : Received response from target: 0x01042979
19:03:06:944 : byte 0x11 sent successfully to target
19:03:06:944 : bytesToWrite before send = 1
19:03:06:945 : bFlushRet = 1, bytesToWrite after flush() = 1
19:03:06:945 : waitForBytesWritten Error : The wait operation timed out.
19:03:06:945 : byte 0xEE sent successfully to target
19:03:06:945 : data sent successfully to target: 0x0800000008
19:03:06:945 : byte 0x00 sent successfully to target
19:03:06:946 : byte 0xFF sent successfully to target
19:03:06:946 : UPLOADING OPTION BYTES DATA ...
19:03:06:946 : Bank : 0x00
19:03:06:946 : Address : 0x1ff80000
19:03:06:947 : Size : 24 Bytes
19:03:06:947 : Sending Read command and its XOR:
19:03:06:948 : byte 0x11 sent successfully to target
19:03:06:948 : byte 0xEE sent successfully to target
19:03:06:948 : Wait ends after 1 loop, dataready = 1, delay = 13
19:03:06:948 : Received response from target: 0x79
19:03:06:948 : Sending Read address and its checksum:
19:03:06:948 : data sent successfully to target: 0x1ff80000e7
19:03:06:948 : Wait ends after 1 loop, dataready = 1, delay = 16
19:03:06:949 : Received response from target: 0x79
19:03:06:949 : Sending number of bytes to be read - 1 and its checksum:
19:03:06:949 : data sent successfully to target: 0x17e8
19:03:06:949 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:06:949 : Received response from target: 0x79
19:03:06:949 : Received response from target: 0xaa0055fff80007ff0000ffff0000ffff0000ffff0000ffff
19:03:06:950 : UPLOADING OPTION BYTES DATA ...
19:03:06:950 : Bank : 0x00
19:03:06:950 : Address : 0x1ff80000
19:03:06:950 : Size : 24 Bytes
19:03:06:950 : Sending Read command and its XOR:
19:03:06:950 : byte 0x11 sent successfully to target
19:03:06:950 : byte 0xEE sent successfully to target
19:03:06:951 : Wait ends after 1 loop, dataready = 1, delay = 14
19:03:06:951 : Received response from target: 0x79
19:03:06:951 : Sending Read address and its checksum:
19:03:06:951 : data sent successfully to target: 0x1ff80000e7
19:03:06:951 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:06:952 : Received response from target: 0x79
19:03:06:952 : Sending number of bytes to be read - 1 and its checksum:
19:03:06:952 : data sent successfully to target: 0x17e8
19:03:06:952 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:06:952 : Received response from target: 0x79
19:03:06:952 : Received response from target: 0xaa0055fff80007ff0000ffff0000ffff0000ffff0000ffff
19:03:06:953 : Sending Read command and its XOR:
19:03:06:953 : byte 0x11 sent successfully to target
19:03:06:953 : bytesToWrite before send = 1
19:03:06:953 : bFlushRet = 1, bytesToWrite after flush() = 1
19:03:07:596 : waitForBytesWritten Error : The wait operation timed out.
19:03:07:727 : byte 0xEE sent successfully to target
19:03:07:740 : Wait ends after 1 loop, dataready = 1, delay = 11
19:03:07:741 : Received response from target: 0x79
19:03:07:741 : Sending Read address and its checksum:
19:03:07:742 : data sent successfully to target: 0x1ff8004cab
19:03:07:752 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:07:752 : Received response from target: 0x79
19:03:07:753 : Sending number of bytes to be read - 1 and its checksum:
19:03:07:754 : data sent successfully to target: 0x03fc
19:03:07:754 : Received response from target: 0x1f
19:03:07:755 : Response received from device: NACK
19:03:07:755 : Error: Number of bytes to be be read at address: 0x1FF8004C not acknowledged!
19:03:07:756 : failed to read the requested memory content
19:03:07:756 : Could not read flash size at address 0x1ff8004c
19:03:07:756 : Sending GetID command and its XOR:
19:03:07:758 : byte 0x02 sent successfully to target
19:03:07:761 : byte 0xFD sent successfully to target
19:03:07:769 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:07:769 : Received response from target: 0x1f
19:03:07:769 : Response received from device: NACK
19:03:07:769 : Error: GETID command not acknowledged!
19:03:07:769 : Reemission of GetID command
19:03:07:770 : Sending GetID command and its XOR:
19:03:07:770 : byte 0x02 sent successfully to target
19:03:07:770 : byte 0xFD sent successfully to target
19:03:07:770 : Received response from target: 0x79
19:03:07:770 : Received response from target: 0x01042979
19:03:07:773 : UPLOADING ...
19:03:07:774 : Size : 1024 Bytes
19:03:07:774 : Address : 0x8000000
19:03:07:774 : Read progress:
19:03:07:774 : Sending Read command and its XOR:
19:03:07:776 : byte 0x11 sent successfully to target
19:03:07:776 : bytesToWrite before send = 1
19:03:07:776 : bFlushRet = 1, bytesToWrite after flush() = 1
19:03:08:771 : waitForBytesWritten Error : The wait operation timed out.
19:03:08:896 : byte 0xEE sent successfully to target
19:03:08:904 : Wait ends after 1 loop, dataready = 1, delay = 8
19:03:08:904 : Received response from target: 0x79
19:03:08:905 : Sending Read address and its checksum:
19:03:08:905 : data sent successfully to target: 0x0800000008
19:03:08:920 : Wait ends after 1 loop, dataready = 1, delay = 16
19:03:08:920 : Received response from target: 0x79
19:03:08:921 : Sending number of bytes to be read - 1 and its checksum:
19:03:08:922 : data sent successfully to target: 0xff00
19:03:08:936 : Wait ends after 1 loop, dataready = 1, delay = 16
19:03:08:936 : Received response from target: 0x79
19:03:09:256 : Received response from target: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
19:03:09:257 : Sending Read command and its XOR:
19:03:09:258 : byte 0x11 sent successfully to target
19:03:09:266 : byte 0xEE sent successfully to target
19:03:09:275 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:09:276 : Received response from target: 0x79
19:03:09:277 : Sending Read address and its checksum:
19:03:09:283 : data sent successfully to target: 0x0800010009
19:03:09:290 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:09:291 : Received response from target: 0x79
19:03:09:291 : Sending number of bytes to be read - 1 and its checksum:
19:03:09:291 : data sent successfully to target: 0xff00
19:03:09:304 : Wait ends after 1 loop, dataready = 1, delay = 16
19:03:09:304 : Received response from target: 0x79
19:03:09:624 : Received response from target: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
19:03:09:626 : Sending Read command and its XOR:
19:03:09:628 : byte 0x11 sent successfully to target
19:03:09:629 : byte 0xEE sent successfully to target
19:03:09:643 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:09:644 : Received response from target: 0x79
19:03:09:644 : Sending Read address and its checksum:
19:03:09:645 : data sent successfully to target: 0x080002000a
19:03:09:664 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:09:665 : Received response from target: 0x79
19:03:09:665 : Sending number of bytes to be read - 1 and its checksum:
19:03:09:666 : data sent successfully to target: 0xff00
19:03:09:680 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:09:680 : Received response from target: 0x79
19:03:09:992 : Received response from target: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
19:03:09:993 : Sending Read command and its XOR:
19:03:09:996 : byte 0x11 sent successfully to target
19:03:09:997 : byte 0xEE sent successfully to target
19:03:10:013 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:10:014 : Received response from target: 0x79
19:03:10:014 : Sending Read address and its checksum:
19:03:10:015 : data sent successfully to target: 0x080003000b
19:03:10:028 : Wait ends after 1 loop, dataready = 1, delay = 14
19:03:10:037 : Received response from target: 0x79
19:03:10:038 : Sending number of bytes to be read - 1 and its checksum:
19:03:10:038 : data sent successfully to target: 0xff00
19:03:10:043 : Wait ends after 1 loop, dataready = 1, delay = 14
19:03:10:044 : Received response from target: 0x79
19:03:10:360 : Received response from target: 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
19:03:10:361 : Data read successfully
19:03:10:361 : Time elapsed during the read operation is: 00:00:02.590
19:03:10:429 : Sending Read command and its XOR:
19:03:10:429 : byte 0x11 sent successfully to target
19:03:10:429 : bytesToWrite before send = 1
19:03:10:430 : bFlushRet = 1, bytesToWrite after flush() = 1
19:03:11:365 : waitForBytesWritten Error : The wait operation timed out.
19:03:11:503 : byte 0xEE sent successfully to target
19:03:11:531 : Wait ends after 1 loop, dataready = 1, delay = 8
19:03:11:531 : Received response from target: 0x79
19:03:11:531 : Sending Read address and its checksum:
19:03:11:531 : data sent successfully to target: 0x1ff8004cab
19:03:11:536 : Wait ends after 1 loop, dataready = 1, delay = 15
19:03:11:536 : Received response from target: 0x79
19:03:11:536 : Sending number of bytes to be read - 1 and its checksum:
19:03:11:536 : data sent successfully to target: 0x03fc
19:03:11:538 : Received response from target: 0x1f
19:03:11:538 : Response received from device: NACK
19:03:11:538 : Error: Number of bytes to be be read at address: 0x1FF8004C not acknowledged!
19:03:11:538 : failed to read the requested memory content
19:03:11:538 : Could not read flash size at address 0x1ff8004c
19:03:11:538 : Sending GetID command and its XOR:
19:03:11:539 : byte 0x02 sent successfully to target
19:03:11:539 : byte 0xFD sent successfully to target
19:03:11:673 : Wait ends after 1 loop, dataready = 1, delay = 14
19:03:11:673 : Received response from target: 0x1f
19:03:11:674 : Response received from device: NACK
19:03:11:674 : Error: GETID command not acknowledged!
19:03:11:674 : Reemission of GetID command
19:03:11:674 : Sending GetID command and its XOR:
19:03:11:674 : byte 0x02 sent successfully to target
19:03:11:674 : byte 0xFD sent successfully to target
19:03:11:674 : Received response from target: 0x79
19:03:11:675 : Received response from target: 0x01042979
19:03:12:543 : Sending Read command and its XOR:
19:03:12:568 : byte 0x11 sent successfully to target
19:03:12:568 : byte 0xEE sent successfully to target
19:03:12:569 : Received response from target: 0x79
19:03:12:569 : Sending Read address and its checksum:
19:03:12:569 : data sent successfully to target: 0x1ff8004cab
19:03:12:569 : Received response from target: 0x01
19:03:12:570 : Error: Address not acknowledged: 0x1FF8004C
19:03:12:570 : failed to read the requested memory content
19:03:12:570 : Could not read flash size at address 0x1ff8004c
19:03:12:571 : Sending GetID command and its XOR:
19:03:12:571 : byte 0x02 sent successfully to target
19:03:12:571 : byte 0xFD sent successfully to target
19:03:12:572 : Received response from target: 0x04
19:03:12:572 : Error: GETID command not acknowledged!
19:03:12:572 : Reemission of GetID command
19:03:12:573 : Sending GetID command and its XOR:
19:03:12:573 : byte 0x02 sent successfully to target
19:03:12:573 : byte 0xFD sent successfully to target
19:03:12:573 : Received response from target: 0x29
19:03:12:574 : Error: GETID command not acknowledged!
19:03:12:574 : Reemission of GetID command
19:03:12:574 : Sending GetID command and its XOR:
19:03:12:575 : byte 0x02 sent successfully to target
19:03:12:575 : byte 0xFD sent successfully to target
19:03:12:575 : Received response from target: 0x79
19:03:12:578 : Received response from target: 0x79791f1f
19:03:12:579 : Sending GetID command and its XOR:
19:03:12:579 : byte 0x02 sent successfully to target
19:03:12:579 : byte 0xFD sent successfully to target
19:03:12:579 : Received response from target: 0x1f
19:03:12:580 : Response received from device: NACK
19:03:12:580 : Error: GETID command not acknowledged!
19:03:12:580 : Reemission of GetID command
19:03:12:580 : Sending GetID command and its XOR:
19:03:12:580 : byte 0x02 sent successfully to target
19:03:12:581 : byte 0xFD sent successfully to target
19:03:12:887 : Wait ends after 1 loop, dataready = 1, delay = 14
19:03:12:887 : Received response from target: 0x1f
19:03:12:887 : Response received from device: NACK
19:03:12:887 : Error: GETID command not acknowledged!
19:03:12:887 : Reemission of GetID command
19:03:12:887 : Sending GetID command and its XOR:
19:03:12:887 : byte 0x02 sent successfully to target
19:03:12:888 : byte 0xFD sent successfully to target
19:03:12:888 : Received response from target: 0x1f
19:03:12:888 : Response received from device: NACK
19:03:12:888 : Error: GETID command not acknowledged!
19:03:12:888 : Warning: Connection to device 0x429 is lost
19:03:13:363 : Disconnected from device.