Hello!
We are currently struggling to write CMPA to fix the CAN_BAUD for the bootloader. Accessing through ISP and "get-property", "flash-image" and "flash-erase-all" work fine, but when trying to perform a "write-memory" on the CMPA region it fails with invalid_argument:
>>blhost -p COM3 get-property 1
Ping responded in 1 attempt(s)
Inject command 'get-property'
Response status = 0 (0x0) Success.
Response word 1 = 1258488064 (0x4b030100)
Current Version = K3.1.0
>>blhost -p COM3 write-memory 0x3E204 {{00}}
Ping responded in 1 attempt(s)
Inject command 'write-memory'
Successful generic response to command 'write-memory'
(1/1)100% Completed!
Response status = 4 (0x4) kStatus_InvalidArgument
Wrote 1 of 1 bytes.
>>blhost -p COM3 write-memory 0x3E204 {{00040000}}
Ping responded in 1 attempt(s)
Inject command 'write-memory'
Successful generic response to command 'write-memory'
(1/1)100% Completed!
Response status = 4 (0x4) kStatus_InvalidArgument
Wrote 4 of 4 bytes.
Trying to write anything will always read back "00"
Any hints why it won't work? Thanks in advance and kind regards!
OK, I think I finally found a solution. It looks like the CMPA has to be written as a single block.
blhost -p COM3 write-memory 0x3E200 cmpa.bin
Works even though only a single bit is changed. I think it should be mentioned somewhere that it is not possible to write bytes or words to CMPA. Ideally, blhost should automatically perform a read-modify-write operation in such cases...