We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2018-03-07
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: FLASH
Downloaded: 4995 times
Not followed.
License: MIT license
SQI FLASH click is based upon the SST26VF064B, 64 Mbit Serial Quad I/O flash device from Microchip. The chip utilizes 4-bit multiplexed I/O serial interface to boost performance. The click is a very fast solid-state, non-volatile data storage medium, that can be electrically erased and reprogrammed.
Do you want to subscribe in order to receive notifications regarding "SQI Flash click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "SQI Flash click" changes.
Do you want to report abuse regarding "SQI Flash click".
Library carries all the necessary functions for the SQI Flash click.
Key functions
void SQIFLASH_WriteArray(uint32_t address, uint8_t* pData, uint16_t number) - Writes 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 belong to
Examples Description
The application is composed of three sections :
The example uses the SQIFLASH_WriteByte function to write the value to a 32bit address, forwarded as the parameter to the write function. Both 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, SQIFLASH_ReadByte function is used to read from the address of the SQI Flash module and it is stored in a separate variable, labeled - 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 ); }
Other mikroE Libraries used in the example:
Additional notes and information
Depending on the development board you are using, you may need USB UART click, USB UART 2 clickor RS232 click 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.