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-11-07
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: FLASH
Downloaded: 4436 times
Not followed.
License: MIT license
Flash 4 click is a perfect solution for the mass storage option in various embedded applications. With fast performance being one of its key features, Flash 4 click can also be used for the code shadowing, execution-in-place (XIP), and data storage.
Do you want to subscribe in order to receive notifications regarding "Flash 4 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Flash 4 click" changes.
Do you want to report abuse regarding "Flash 4 click".
Library Description
The library contains all the necessary functions for working with Flash 4 click.
Key functions:
void flash4_writeCommand(uint8_t cmd)
- Functions for write commandExamples description
The application is composed of the three sections :
void applicationTask()
{
flash4_writeCommand(_FLASH4_CMD_WRITE_ENABLE_WREN);
mikrobus_logWrite("--- Erase chip --START--", _LOG_LINE);
flash4_4sectorErase(0x00001234);
while(flash4_checkWIP());
mikrobus_logWrite("--- Erase chip --DONE--", _LOG_LINE);
flash4_writeCommand(_FLASH4_CMD_WRITE_ENABLE_WREN);
flash4_4PageProgram(&dataBuffer[0], 0x00001234, 16);
while(flash4_checkWIP());
Delay_100ms();
flash4_4ReadFlash(&readBuffer[0],0x00001234, 16);
while(flash4_checkWIP());
mikrobus_logWrite("--- Read buffer : ", _LOG_TEXT);
mikrobus_logWrite(readBuffer, _LOG_LINE);
Delay_ms( 7000 );
}
Other mikroE Libraries used in the example:
SPI
Additional notes and information
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or 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.