2020-05-13 03:02 PM
I have an application where I must be able to update the code remotely through the CAN2 link and the embedded bootloader. This worked fine using the mass erase function, but now I need to erase sectors individually. The ap note AN3154 poorly describes this functionality by "Send message with stdID=0x43 and data field containing sector codes" . Later it says "std ID = 0x43, DLC = 0x01 to 0x08, data = see data sheet" . Should the pages be erased one by one or through a list ? Is it possible to provide an example of what should be the CAN message ?
Thanks !
2020-05-13 07:41 PM
The data bytes indicate the number of the flash pages you wish you erase.
It's up to you if you want to erase one by one (DLC=1, data[0] = #), or all at once (DLC>1).
So to erase page 0: ID = 0x43, DLC = 0x01, data[0] = 0x00.
2020-05-14 07:15 AM
THanks for the answer.. however is it possible to erase several pages at once, for example:
ID= 0x43, DLC = 0x08, data = 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07,
and repeat the command with other pages until all space I need is erased ?
2020-05-14 07:27 AM