AN12218SW Bootloader fails to write correct data if record straddles sector boundary.

cancel
Showing results for 
Search instead for 
Did you mean: 

AN12218SW Bootloader fails to write correct data if record straddles sector boundary.

133 Views
lucianomoretti
Contributor IV

In the code for the AN12218 Boodloader if the SREC record straddles a page boundary (flash_program_address is in one page, flash_program_address+data_size is in the next page) then it does not erase the next page to allow programming the data and on the next pass the FlashEraseSector() call erases and leaves a hole unprogrammed (all 0xFF).

Another conditional to check flash_prog_address+data_size and erase is needed.

0 Kudos
3 Replies

117 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

this weakness of s-record parser has been already reported to us:

https://community.nxp.com/t5/S32-Design-Studio/Why-does-the-AN12218SW-bootloader-fails-to-parse-the-...

We are working to fix this. Currently the workaround is to convert the file as mentioned in the thread above.

Regards,

Lukas

0 Kudos

112 Views
lucianomoretti
Contributor IV

I think you misunderstand.

The 8-byte alignment issue is related to the flash write process.

This issue is related to the sector erase. If an aligned SREC (say 32 bytes, evenly divisible by 8 bytes) straddles the sector boundary (say 16 bytes in one sector, 16 bytes in the next) then the erase will not properly happen and you'll be left with invalidly programmed data.

0 Kudos

89 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Thanks, I have already asked the team to rework this completely, so I hope it will be updated soon.

Regards,

Lukas

0 Kudos