Hi,
We are implementing a Linux programming tool on the custom board.
We are able to enter bootloader mode with BL_CONFIG register.
BL_CONFIG:
BOOTLOADER_ENABLE: 0xC5
BL_LEVEL: 0x0
BL_PIN_NUMBER: 0x7
BL_ENABLE: 0xC5
And commands, BAUD_RATE_DETECT(0x55, 0x55), CMD_GET_STATUS(0x23), and CMD_BANK_ERASE(0x2C), can run successfully, which means we can receive ACK and data correctly
But somehow, we always receives a NACK(0x00, 0x33) after sending CMD_DOWNLOAD(0x21).
Our procedure is BAUD_RATE_DETECT -> CMD_BANK_ERASE -> CMD_DOWNLOAD -> CMD_SEND_DATA
These are the log of DOWNLOAD command bytes we sent, we want to program all 128KB(0x20000) memory from address 0x00000000.
cmd[0] = 0x0B
cmd[1] = 0x2E
cmd[2] = 0x21
cmd[3] = 0x00
cmd[4] = 0x00
cmd[5] = 0x00
cmd[6] = 0x00
cmd[7] = 0x00
cmd[8] = 0x02
cmd[9] = 0x00
cmd[10] = 0x00
We thought the command should be correct, but we have no idea why bootloader always returns NACK.
We also tried to reduce program size to 252 bytes in CMD_DOWNLOAD, but still no luck.
Please help to provide any suggestion.
Thanks in advance.
Regards,
Ivan