- Disable the master transaction by asserting the master inhibit bit of SPICR (60h), and reset the RX and TX FIFOs through SPICR.
- Issue the write data command into SPIDTR, to write data into any specific sector followed by the flash sector address.
- Fill SPIDTR with the data to be written to flash; the maximum data size depends upon the configured QSPI FIFO size.
- Issue chip select by writing 0x00 to SPISSR.
- Enable master transaction by deasserting the SPICR master inhibit bit.
- Deassert chip select by writing 0x01 to SPISSR.
- Disable master transaction by asserting the SPICR master inhibit bit.