SQI FLASH Click Board
SQI FLASH Click Board
The SQI FLASH Click Board™ is based on the SST26VF064B, a 64 Mbit Serial Quad I/O flash device from Microchip. The chip utilizes a 4-bit multiplexed I/O serial interface to boost the performance. The Click Board™ is a very fast solid-state, non-volatile data storage medium, that can be electrically erased and reprogrammed. Operating at 104 MHz, the SST26VF064B enables minimum latency execute-in-place (XIP) capability, without the need for code shadowing.
Software Support
We provide an example for the SQI FLASH Click Board™ on our LibStock page and a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library carries all the necessary functions for the SQI Flash Click Board™.
Key Functions
void SQIFLASH_WriteArray(uint32_t address, uint8_t* pData, uint16_t number)
- Writes an array of data to the address specified
void SQIFLASH_ReadArray(uint32_t address, uint8_t* pData, uint16_t num)
- Reads array of data from the address specified
void SQIFLASH_SectorErase(uint32_t address)
- Erases sector where provided address belongs to
Example Description
The application is composed of three sections :
- System initialisation - Initializes pins, SPI peripheral, and UART used for logging.
- Application initialisation - Initializes driver and configures module but also checks the communication by reading the chip ID.
- Application task - (Code snippet) Sequentially writes and reads data from the SQI FLASH Click Board™. Written and read data must match because they are at the same address. Information about the current reading and writing will be logged to UART.
The example uses the SQIFLASH_WriteByte function to write the value to a 32bit address, forwarded as the parameter to the write function. The value and the address are derived from the same variable - counter, which is increased at the end of the application task function. This value is printed at the UART terminal.
After that, the SQIFLASH_ReadByte function is used to read from the address of the SQI Flash module, and it is stored in a separate variable, labelled - result. This value gets converted and it gets printed at the UART terminal. The application task function is executed inside the while loop
void applicationTask() { SQIFLASH_WriteByte(counter, counter); UART1_Write_Text( "rnValue Written : " ); ByteToStr( counter, txt ); UART1_Write_Text( txt ); Delay_ms( 100 ); result = SQIFLASH_ReadByte(counter); UART1_Write_Text( "rnValue Read : " ); ByteToStr( result, txt ); UART1_Write_Text( txt ); Delay_ms( 100 ); counter++; if (counter == 256) { counter = 0; } Delay_ms( 2000 ); }
The complete application code and ready-to-use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- UART Conversions
Additional Notes and Information
Depending on the development board you are using, you may need USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
The SQI FLASH Click Board™ board is supported with mikroSDK, the MikroElektronika Software Development Kit.
SQI FLASH Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.