Skip to main content
Rsrma.1
Associate III
December 29, 2021
Solved

GETID command not acknowledged

  • December 29, 2021
  • 3 replies
  • 4216 views

Hi everyone,

I'm writing my own bootloader for STM32f407VG, in the start address of flash memory. But getting problem GetID command is not acknowledged. I've attached a log also.

10:49:19:443 : RTS low
 10:49:19:443 : DTR low
 10:49:19:443 : Serial Port ttyUSB1 is successfully opened.
 10:49:19:444 : Port configuration: parity = none, baudrate = 9600, data-bit = 8, stop-bit = 1.0, flow-control = off
 10:49:19:444 : No Init bits value is : 0 
 10:49:19:444 : Sending init command: 
 10:49:19:444 : byte 0x7F sent successfully to target
 10:49:19:461 : Wait ends after 1 loop, dataready = 1, delay = 9
 10:49:19:461 : Received response from target: 0x79
 10:49:19:462 : Activating device: OK
 10:49:19:462 : Board : --
 10:49:19:462 : Sending GetID command and its XOR:
 10:49:19:463 : byte 0x02 sent successfully to target
 10:49:19:463 : byte 0xFD sent successfully to target
 10:49:19:475 : Wait ends after 1 loop, dataready = 1, delay = 6
 10:49:19:475 : Received response from target: 0x79
 10:49:19:483 : Received 4 data bytes from target : 0x01041379
 10:49:19:483 : Chip ID: 0x413 
 10:49:19:483 : Sending Get command and its XOR:
 10:49:19:483 : byte 0x00 sent successfully to target
 10:49:19:483 : byte 0xFF sent successfully to target
 10:49:19:498 : Wait ends after 1 loop, dataready = 1, delay = 16
 10:49:19:498 : Received response from target: 0x79
 10:49:19:498 : Received 1 data bytes from target : 0x0b
 10:49:19:498 : size of bytes in the response: 11
 10:49:19:514 : Received 13 data bytes from target
 10:49:19:514 : Full received response: 0b31000102112131446373829279
 10:49:19:514 : BootLoader protocol version: 3.1
 10:49:19:515 : byte 0x11 sent successfully to target
 10:49:19:515 : byte 0xEE sent successfully to target
 10:49:19:614 : data sent successfully to target: 0x0800000008
 10:49:19:628 : byte 0x00 sent successfully to target
 10:49:19:629 : byte 0xFF sent successfully to target
 10:49:19:642 : Device Read Unprotect requested
 10:49:19:642 : Received 1 data bytes from target : 0x00
 10:49:19:642 : Received 1 data bytes from target : 0x00
 10:49:19:642 : Received 1 data bytes from target : 0x91
 10:49:19:643 : Sending read unprotect command and its XOR:
 10:49:19:643 : byte 0x92 sent successfully to target
 10:49:19:643 : byte 0x6D sent successfully to target
 10:49:19:658 : Wait ends after 1 loop, dataready = 1, delay = 15
 10:49:19:659 : Received response from target: 0x79
 10:49:19:659 : Received response from target: 0x79
 10:49:19:665 : Sending init command: 
 10:49:19:665 : byte 0x7F sent successfully to target
 10:49:20:649 : Wait ends after 1 loop, dataready = 1, delay = 986
 10:49:20:650 : Received response from target: 0x79
 10:49:20:664 : Reconnection after RDU OK !
 10:49:20:664 : Checking access to flash after RDU !
 10:49:20:664 : byte 0x11 sent successfully to target
 10:49:20:664 : byte 0xEE sent successfully to target
 10:49:20:760 : data sent successfully to target: 0x0800000008
 10:49:20:782 : byte 0x00 sent successfully to target
 10:49:20:782 : byte 0xFF sent successfully to target
 10:49:20:796 : Sending GetID command and its XOR:
 10:49:20:796 : byte 0x02 sent successfully to target
 10:49:20:796 : byte 0xFD sent successfully to target
 10:49:20:797 : Received response from target: 0x00
 10:49:20:797 : Error: GETID command not acknowledged!
 10:49:20:797 : Reemission of GetID command
 10:49:20:797 : Sending GetID command and its XOR:
 10:49:20:797 : byte 0x02 sent successfully to target
 10:49:20:797 : byte 0xFD sent successfully to target
 10:49:20:797 : Received response from target: 0x00
 10:49:20:797 : Error: GETID command not acknowledged!
 10:49:20:797 : Reemission of GetID command
 10:49:20:798 : Sending GetID command and its XOR:
 10:49:20:798 : byte 0x02 sent successfully to target
 10:49:20:798 : byte 0xFD sent successfully to target
 10:49:20:798 : Received response from target: 0x91
 10:49:20:798 : Error: GETID command not acknowledged!
 10:49:20:798 : byte 0x11 sent successfully to target
 10:49:20:798 : byte 0xEE sent successfully to target
 10:49:20:894 : data sent successfully to target: 0x0800000008
 10:49:20:905 : UART PORT CLOSE 
 10:49:20:976 : Disconnected from device.
 10:49:20:979 : RTS low
 10:49:20:979 : DTR low
 10:49:20:979 : Serial Port ttyUSB1 is successfully opened.
 10:49:20:979 : Port configuration: parity = none, baudrate = 9600, data-bit = 8, stop-bit = 1.0, flow-control = off
 10:49:20:979 : No Init bits value is : 0 
 10:49:20:979 : Sending init command: 
 10:49:20:979 : byte 0x7F sent successfully to target
 10:49:20:985 : Wait ends after 1 loop, dataready = 1, delay = 7
 10:49:20:985 : Received response from target: 0x79
 10:49:20:995 : Activating device: OK
 10:49:20:995 : Board : --
 10:49:20:995 : Sending GetID command and its XOR:
 10:49:20:995 : byte 0x02 sent successfully to target
 10:49:20:996 : byte 0xFD sent successfully to target
 10:49:21:001 : Wait ends after 1 loop, dataready = 1, delay = 6
 10:49:21:001 : Received response from target: 0x79
 10:49:21:017 : Received 4 data bytes from target : 0x01041379
 10:49:21:017 : Chip ID: 0x413 
 10:49:21:017 : Sending Get command and its XOR:
 10:49:21:017 : byte 0x00 sent successfully to target
 10:49:21:017 : byte 0xFF sent successfully to target
 10:49:21:033 : Wait ends after 1 loop, dataready = 1, delay = 16
 10:49:21:033 : Received response from target: 0x79
 10:49:21:033 : Received 1 data bytes from target : 0x0b
 10:49:21:033 : size of bytes in the response: 11
 10:49:21:049 : Received 13 data bytes from target
 10:49:21:049 : Full received response: 0b31000102112131446373829279
 10:49:21:049 : BootLoader protocol version: 3.1
 10:49:21:049 : byte 0x11 sent successfully to target
 10:49:21:049 : byte 0xEE sent successfully to target
 10:49:21:149 : data sent successfully to target: 0x0800000008
 10:49:21:171 : byte 0x00 sent successfully to target
 10:49:21:171 : byte 0xFF sent successfully to target
 10:49:21:189 : Device Read Unprotect requested
 10:49:21:189 : Received 1 data bytes from target : 0x00
 10:49:21:189 : Received 1 data bytes from target : 0x00
 10:49:21:189 : Received 1 data bytes from target : 0x91
 10:49:21:189 : Sending read unprotect command and its XOR:
 10:49:21:190 : byte 0x92 sent successfully to target
 10:49:21:190 : byte 0x6D sent successfully to target
 10:49:21:203 : Wait ends after 1 loop, dataready = 1, delay = 16
 10:49:21:203 : Received response from target: 0x79
 10:49:21:203 : Received response from target: 0x79
 10:49:21:204 : Sending init command: 
 10:49:21:204 : byte 0x7F sent successfully to target
 10:49:22:185 : Wait ends after 1 loop, dataready = 1, delay = 985
 10:49:22:185 : Received response from target: 0x79
 10:49:22:195 : Reconnection after RDU OK !
 10:49:22:195 : Checking access to flash after RDU !
 10:49:22:195 : byte 0x11 sent successfully to target
 10:49:22:195 : byte 0xEE sent successfully to target
 10:49:22:295 : data sent successfully to target: 0x0800000008
 10:49:22:315 : byte 0x00 sent successfully to target
 10:49:22:315 : byte 0xFF sent successfully to target
 10:49:22:329 : Sending GetID command and its XOR:
 10:49:22:329 : byte 0x02 sent successfully to target
 10:49:22:329 : byte 0xFD sent successfully to target
 10:49:22:329 : Received response from target: 0x00
 10:49:22:329 : Error: GETID command not acknowledged!
 10:49:22:329 : Reemission of GetID command
 10:49:22:329 : Sending GetID command and its XOR:
 10:49:22:330 : byte 0x02 sent successfully to target
 10:49:22:330 : byte 0xFD sent successfully to target
 10:49:22:330 : Received response from target: 0x00
 10:49:22:330 : Error: GETID command not acknowledged!
 10:49:22:330 : Reemission of GetID command
 10:49:22:330 : Sending GetID command and its XOR:
 10:49:22:330 : byte 0x02 sent successfully to target
 10:49:22:330 : byte 0xFD sent successfully to target
 10:49:22:330 : Received response from target: 0x91
 10:49:22:330 : Error: GETID command not acknowledged!
 10:49:22:330 : byte 0x11 sent successfully to target
 10:49:22:330 : byte 0xEE sent successfully to target
 10:49:22:429 : data sent successfully to target: 0x0800000008

I'm receiving the GetID command and sending the response as below.

 uint8_t id_size = 0x01;
	
 uart_write(ACK_BYTE);
 uart_write(id_size);
 uart_write(DEVICE_ID_MSB);
 uart_write(DEVICE_ID_LSB);
 uart_write(ACK_BYTE);

This topic has been closed for replies.
Best answer by Rsrma.1

I think I've figured out the problem, this was happening because I've not written the read memory execution carefully. After correcting this problem now it's working.

3 replies

MM..1
Chief III
December 29, 2021

Seems your code isnt executed, what debug stop? , is code on github?

Rsrma.1
Rsrma.1Author
Associate III
December 29, 2021

I've debug it, it's going inside that function and other data is passing.

Rsrma.1
Rsrma.1AuthorBest answer
Associate III
December 29, 2021

I think I've figured out the problem, this was happening because I've not written the read memory execution carefully. After correcting this problem now it's working.

MM..1
Chief III
December 29, 2021

Ok and is your code based on an open source?

Rsrma.1
Rsrma.1Author
Associate III
January 20, 2022

Yes, OpenBL.