Other Parts Discussed in Thread: TMS570LC4357
Hi,
I'm currently trying to modify a bootloader from the TMS570LS31 to work on the TMS570LC4357. The bootloader uses the XCP Protocol via CAN Bus to transfer data to the controller. This data should then be programmed to flash banks 0 and 1.
Due to the length of the CAN messages there are at most 7 bytes in one message which should be programmed to flash (one byte is used to notify the programming command). Very often only 4 bytes per message should be programmed (it is not possible to wait until 8 bytes have been received, as there is no evidence that the data comes in sequential order via the CAN bus).
Therefore i have to use the 'Fapi_DataOnly' command with the 'Fapi_issueProgrammingCommand' function, as an ECC value should not be calculated and programmed automatically beacuse there is no complete word to be programmed. This leads to wrong values in the flash, as they are automatically "corrected" by the unprogrammed ECC values.
When I'm trying to "manually" calculate an ECC value afterwards when the word is completed (by using 'Fapi_calculateEcc', 'Fapi_remapMainAddress' and 'Fapi_issueProgrammingCommandForEccAddresses', I'm able to calculate and program an ECC value but this does not fix the automatically "corrected" values in the flash. So i still have corrupted data after ECC calculation.
After going through several topics in this forum, I'm quite sure that i use the correct F021 library, execute the library from RAM, etc....
I also have noticed that there is a way to program partial words on bank 7, however this doesn't help either, as I'm willing to program the received data to bank 0 and bank 1.
Does anyone know how to program impartial words in these banks or does have another approach to fix this problem?
Thanks in advance.
Best regards,
Max