[SOLVED] J-Link Flash Loader: erase and program maximum times in FlashDevice

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] J-Link Flash Loader: erase and program maximum times in FlashDevice

    I'm creating a Flash Loader for a SPI Flash connected to a SPI peripheral of LPC1788. After issuing sector erase command, you can know when the erase is complete by polling busy bit in the STATUS register.

    How do J-Link know when a sector erase is complete? In FlashDevice structure there are two members: TimeoutProg and TimeoutErase. Does it mean that J-Link waits for this maximum timeout to know when the erase is complete?

    Another question. Should the function EraseSector() return only after the erase is complete (i.e. after busy flag of SPI Flash comes back to zero)? Could EraseSector() return just after issuing the erase command?