26.5.6 Command and Data Interface

The NVM Controller is addressable from the APB bus, while the NVM main address space is addressable from the AHB bus. Read and automatic page write operations are performed by addressing the NVM main address space or the Data Flash address space directly, while other operations such as manual page writes and row erases must be performed by issuing commands through the NVM Controller.

To issue a command, the CTRLA.CMD bits must be written along with the CTRLA.CMDEX value. When a command is issued, INTFLAG.READY will be cleared until the command has completed. Any commands written while INTFLAG.READY is low will be ignored. Before entering any sleep mode, ensure any commands written to the NVM controller have completed by confirming the NVMCTRL INTFLAG.READY bit is '1'.

The CTRLB register must be used to control the power reduction mode, read wait states, and write mode.