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?
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?