Files
microchip-application-pec93…/Examples/flash/flash_prog_erase_nvr
2026-02-03 11:37:13 +08:00
..
2026-02-03 11:37:13 +08:00
2026-02-03 11:37:13 +08:00
2026-02-03 11:37:13 +08:00
2026-02-03 11:37:13 +08:00

flash_prog_erase_nvr

This example is a demo project to P/E (Program/Erase) NVR area of DUT (execute at main-flash)

This example is only for internal verification. We do NOT expect user to modify data of NVR

  • There are 8-KBytes (sector 0 ~ 15) in NVR area

    A sector size is 512 bytes

    • The 15-th sector is recorded the paraments of embedded flash
    • The 14-th sector is recorded the trim-values
  • It supports 3 type (read 8/16/32 bits) to verify data

    // at main.c
    #define CONFIG_USE_READ_WORD
    /* #define CONFIG_USE_READ_HWORD */
    /* #define CONFIG_USE_READ_BYTE */
    

Log

Use serial port with baudrate 115200, 8bit, no parity check.

14:12:31
This is NVR Erase/Program/Read (0x00200000 ~ 0x00201e00) example
## P/E with word value, read 32-bits to verify
sector-addr: x00200000
  erase this sector
  verify data
  prog data to this  sector
  verify data
  done~
sector-addr: x00200200
  erase this sector
  verify data
  prog data to this  sector
  verify data
  done~
sector-addr: x00200400
  erase this sector
  verify data
  prog data to this  sector
  verify data
  done~
sector-addr: x00200600
  erase this sector
  verify data
  prog data to this  sector
  verify data
  done~
sector-addr: x00200800
  erase this sector
  verify data
  prog data to this  sector
  verify data
  done~
sector-addr: x00200A00
  erase this sector
  verify data
  prog data to this  sector
  verify data
  done~
sector-addr: x00200C00
  erase this sector
  verify data
  prog data to this  sector
  verify data
  done~
sector-addr: x00200E00
  erase this sector
  verify data
  prog data to this  sector
  verify data
  done~
sector-addr: x00201000
  erase this sector
  verify data
  prog data to this  sector
  verify data
  done~
sector-addr: x00201200
  erase this sector
  verify data
  prog data to this  sector
  verify data
  done~
sector-addr: x00201400
  erase this sector
  verify data
  prog data to this  sector
  verify data
  done~
sector-addr: x00201600
  erase this sector
  verify data
  prog data to this  sector
  verify data
  done~
sector-addr: x00201800
  erase this sector
  verify data
  prog data to this  sector
  verify data
  done~
sector-addr: x00201A00
  erase this sector
  verify data
  prog data to this  sector
  verify data
  done~
sector-addr: x00201C00
  erase this sector
  verify data
  prog data to this  sector
  verify data
  done~
Fully verify data
  done~
done ~~~~~~