No matter how large your microcontroller’s memory might be – in practice, you will always need just a little bit more. In that case, STMicroelectronics’s SPI EEPROM provides a nice alternative to more established players.

Obviously, the biggest advantage of SPI involves the simplicity in connecting the part – you don’t need to worry about limited I2C address ranges or other problems. If your application has a free SPI controller, you are ready to go.

If multiple CS pins are available, adding SPI EEPROMs becomes really simple

Alternatively, an SPI MUX can be driven from the GPIO port bank in a fashion similar to the bank switching implemented in Solomon Systech’s display controllers. Either way, the maximum permitted clock frequency is set at relatively speedy 5MhZ.

STM simplifies the design of such boxes by providing a dedicated hold output input. If hold is activated, the serial data output line becomes high independence, while inputs and clock inputs are discarded silently.

A question of complications

ST’s part differs from its colleagues in that it’s memory is organized in a set of banks. The total amount of spacious 2Mbit is divided into a groups of pages made up of 256 bytes each, one of which can be designated as a read only identification page intended to store serial numbers and similar information.

Actually interacting with the SPI flash then is accomplished via a set of dedicated instructions shown in the figure.

Eight bit instructions set the operational mode of the chip

Table 4. Instruction Set

Instruction Description Instruction Format
WREN Write Enable 0000 0110
WRDI Write Disable 0000 0100
RDSR Read Status Register 0000 0101
READ Read from Memory Array 0000 0011
WRITE Wrtie to Memory Array 0000 0010
RDID Read Indentification Page 1000 0011
WRID Write Indentification Page 1000 0010
RDLS Reads the Indentification Page lock status 1000 0011
LID Locks the Indentification Page in read-only mode 1000 0010

Finally, keep in mind that ST also goes after the extremely lucrative I2C EEPROM market. Their offering for this market is called M24xxx. Both chip families are automotive certified, thereby permitting their usage in challenging environments.