Revision history   OpenPOWER Library

 12.3.2. Flash Procedures

 CAIA-compliant adapters might contain a flash for storing non-volatile information.

 Read:

  1. Set the flash address (VSEC offset x'50') to the first word in the flash to read. The value is a word (4-byte) address, not a byte address.

  2. Set the flash size (VSEC offset x'54') to the number of 512 word (2 KB) blocks to read.

  3. Set the Read Request bit in the Flash Status/Control Register (VSEC offset x'28'; bit 27) to '1' to start the read operation. The hardware will start reading the flash device and buffering the data.

  4. Perform the requested number of reads from the flash data port. The number of reads required is

    512 × the value written to flash size.

 Program:

  1. Set the flash address (VSEC offset x'50') to the first block in flash to program. The address must be block aligned or 32K words (lower 15 bits must be '0').

  2. Set the flash size (VSEC offset x'54') to the number of 32K word blocks (128 KB) blocks to program.

  3. Set the Program Request bit in the Flash Status/Control Register (VSEC offset x'28'; bit 26) to '1' to start the program operation. The hardware will start erasing the requested number of blocks to prepare for programming.

  4. Poll the Flash Status/Control Register until the Erase Status is '1' indicating the erase phase is complete and ready for programming.

  5. Perform the requested number of writes to the flash data port. The number of writes required is

    32K × the value written to flash size.


loading table of contents...