Hi all,
I found that the current version of FlashMagic (V13.50) corrupts location 0x001C on bank B if "Activate Bank A" is checked. FlashMagic erases the chosen Flash blocks, then programs bank A, then programs bank B and then sends the ISP command to activate bank A. According to the NXP user manual this ISP activation command generates and writes the correct vector table checksum on location 0x001C for bank A and at the same time writes an invalid checksum (in fact 0x00000000) on location 0x001C on bank B. Dependant on what code is located at 0x001C this leads to the program to behave falsely or even crash.
Actually this is not a fault in FlashMagic itself, rather a bug in the design of the ISP command, but FlashMagic should work around it.
I suggest Flashmagic to change the order of operation: Erase the chosen sectors on the bank to be activated, program the bank to be activated, activate the bank, erase the chosen sectors on the other bank, program the other bank.
With older versions of FlashMagic (V9.80) one has to execute FlashMagic twice. One instance set to bank A and bank activation checked, the other instance set to bank B and bank activation unchecked. This process avoids corrupting the non-activated Flash bank and has worked fine for me.
Surprisingly neither version 13.50 nor version 9.80 shows an error when the corrupted code is verified. Obviously code location 0x001C is spared for verification on both banks.
Best regards
Werner
I found that the current version of FlashMagic (V13.50) corrupts location 0x001C on bank B if "Activate Bank A" is checked. FlashMagic erases the chosen Flash blocks, then programs bank A, then programs bank B and then sends the ISP command to activate bank A. According to the NXP user manual this ISP activation command generates and writes the correct vector table checksum on location 0x001C for bank A and at the same time writes an invalid checksum (in fact 0x00000000) on location 0x001C on bank B. Dependant on what code is located at 0x001C this leads to the program to behave falsely or even crash.
Actually this is not a fault in FlashMagic itself, rather a bug in the design of the ISP command, but FlashMagic should work around it.
I suggest Flashmagic to change the order of operation: Erase the chosen sectors on the bank to be activated, program the bank to be activated, activate the bank, erase the chosen sectors on the other bank, program the other bank.
With older versions of FlashMagic (V9.80) one has to execute FlashMagic twice. One instance set to bank A and bank activation checked, the other instance set to bank B and bank activation unchecked. This process avoids corrupting the non-activated Flash bank and has worked fine for me.
Surprisingly neither version 13.50 nor version 9.80 shows an error when the corrupted code is verified. Obviously code location 0x001C is spared for verification on both banks.
Best regards
Werner