SPRUJ28E November 2021 – September 2024 AM68 , AM68A , TDA4AL-Q1 , TDA4VE-Q1 , TDA4VL-Q1
Serial NAND defines 1S-1S-1S mode for general backwards compatibility, and 1S-1S-8S for maximum throughput (S here means *S*ingle Data rate). Serial NAND memory array is organized into pages of size 2KB/4KB. Read is a two-step process where a complete page is first read into flash’s internal buffer/cache using Page read command and then the host controller reads from internal buffer in 1- or 4- or 8-bit mode using the read commands. Page read command that is issued is 0x13, followed by 24 address bits. The frequency of operation supported is 50 MHz.
For 1S-1S-1S mode of operation (Bit-width =1, Single Data Rate). The Command and Address issued are 8 bits and 16 bits respectively. The Read Command that is issued is 0x0b, followed by address bits and 8 dummy cycles.
For 1S-1S-8S mode of operation (Bit-width =8, Single Data Rate). The Command and Address issued are 8 bits and 16 bits respectively. The Read Command that is issued is 0x8b, followed by address bits and 8 dummy cycles. Additionally, flash is configured in 8-bit mode after POR through volatile configuration register if the manufacturer is Winbond.
For 1S-1S-4S mode of operation (Bit-width =4, Single Data Rate). The Command and Address issued are 8 bits and 16 bits respectively. The Read Command that is issued is 0x6b, followed by address bits and 8 dummy cycles.
Note that in 8-bit mode pin mux is done for all 8 OSPI data lines and in 4-bit/1-bit mode pin mux is done for 4 OSPI data lines. This is done to disable the HOLD functionality feature in 1-bit mode.
Serial NAND boot expects ECC to be auto-managed by the flash. Most of the flashes have the ECC enabled by default and can do 1-bit correction and 2-bit detection for ECC errors. ROM checks for 2-bit ECC error via status register 3 (address 0xC0) bit 5 after every page load. In case of 2-bit ECC error the boot will fail and ROM will take the fallback option.
Serial NAND boot also manages bad blocks that can be present in the flash at time of shipment or develop during the lifetime. Bad block marker is a non-FFh data byte stored at Byte 0 of spare area of Page 0 for each bad block and ROM checks for the same while reading the first page of a memory block. ROM will skip the particular block if it is marked as bad and move to the next one.
The following boot mode pin configuration and corresponding pin usage and mux configuration are shown below. This is the Serial NAND boot mode.
Serial Nand driver in ROM does not support devices that have multiple planes, as they require special handling to read even-numbered blocks.
BOOTMODE Pins | Field | Value | Description | MCU Only=1 Value |
---|---|---|---|---|
4 | Read Mode 1 | 0 | OSPI/ 1-1-8 Mode (valid only when Read Mode 2 is 0) | 0 |
1 | QSPI/ 1-1-4 mode (valid only when Read Mode 2 is 0) | |||
5 | Read Mode 2 | 0 | Reserved (Read mode is taken from Read Mode 1) | 0 |
1 | SPI/ 1-1-1 mode (Read mode is taken from Read Mode 2 and Read Mode 1 is ignored) |
Device Pin | Module Signal | Pull Enable | Pull Direction | Driver Index | Rx En/Dis | Pinmux Sel |
---|---|---|---|---|---|---|
MCU_OSPI0_CLK | MCU_OSPI0_CLK | Disable | Up | 0 | Disable | 0 |
MCU_OSPI0_LBCLKO | MCU_OSPI0_LBCLKO | Disable | Up | 0 | Enable | 0 |
MCU_OSPI0_DQS | MCU_OSPI0_DQS | Disable | Up | 0 | Enable | 0 |
MCU_OSPI0_D0 | MCU_OSPI0_D0 | Enable | Up | 0 | Enable | 0 |
MCU_OSPI0_D1 | MCU_OSPI0_D1 | Enable | Up | 0 | Enable | 0 |
MCU_OSPI0_D2 | MCU_OSPI0_D2 | Enable | Up | 0 | Enable | 0 |
MCU_OSPI0_D3 | MCU_OSPI0_D3 | Enable | Up | 0 | Enable | 0 |
MCU_OSPI0_D4 | MCU_OSPI0_D4 | Enable | Up | 0 | Enable | 0 |
MCU_OSPI0_D5 | MCU_OSPI0_D5 | Enable | Up | 0 | Enable | 0 |
MCU_OSPI0_D6 | MCU_OSPI0_D6 | Enable | Up | 0 | Enable | 0 |
MCU_OSPI0_D7 | MCU_OSPI0_D7 | Enable | Up | 0 | Enable | 0 |
MCU_OSPI0_CSn0 | MCU_OSPI0_CSn0 | Enable | Up | 0 | Disable | 0 |
MCU_OSPI0_CSn1 | MCU_OSPI0_CSn1 | Enable | Up | 0 | Disable | 0 |