Erase and Blank Check Process for 433Wireless Module

9.0 Erase Operation

Before programming the device, it must be erased. The erase operation writes all 1s into the flash memory, preparing it for the writing of new data. After the device is erased, a blank check operation can be performed to verify its status. For more details, refer to Section 9.1 'Blank Check'.

The process of erasing the program memory (including program, boot, and configuration memory regions) involves selecting MTAP and sending the MCHP_ERASE command. Afterward, the programmer must read and verify the bits in the MCHP_STATUS to wait for the erase operation to complete. The process of performing a chip erase is illustrated in Figure 9-1 below.

Erase Steps:

  1. SendCommand (MTAP_SW_MTAP)
  2. SendCommand (MTAP_COMMAND)
  3. XferData (MCHP_ERASE)
  4. 1ms delay
  5. statusVal = XferData (MCHP_STATUS)
  6. If CFGRDY (statusVal) is not 1 and FCBUSY (statusVal) is not 0, repeat from Step 4.

9.1 Blank Check

The term 'blank check' refers to verifying whether the device has been successfully erased and has no programmed storage cells. Blank or erased storage cells always read as 1. The device configuration register is ignored during the blank check. Additionally, all unimplemented memory regions should be ignored during the blank check. Note: Device ID storage cells are read-only and cannot be erased, so a chip erase does not affect these storage cells.

Blank Check Process:

  1. SendCommand (MTAP_COMMAND)
  2. statusVal = XferData (MCHP_STATUS)
  3. If FCBUSY = 0 and CFGRDY = 1, proceed. Otherwise, repeat the steps.
  4. SendCommand (MTAP_SW_MTAP) - Select MTAP to command mode.

Notes:

  • The chip erase operation is self-timed. If the FCBUSY and CFGRDY bits are not set correctly within the designated chip erase time, the sequence might be incorrect or the device could be damaged.

Source: Microchip Technology Inc., 2010-2012 DS61145J_CN, Page 19

pdf 文件大小:1.14MB