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: 2020-04-27
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: FLASH
Downloaded: 2435 times
Not followed.
License: MIT license
The Flash 6 Click based on W25Q128JV (128M-bit) flash memory from Winbond provides a storage solution for systems with limited space, pins and power. The 25Q series offers flexibility and performance well beyond ordinary Serial Flash devices.
Do you want to subscribe in order to receive notifications regarding "Flash 6 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Flash 6 click" changes.
Do you want to report abuse regarding "Flash 6 click".
Library Description
Library contains function for write in memory and read from memory.
Key functions:
void flash6_erase_memory_segment( uint8_t segment, uint32_t start_addr );
- Function for eraseing segmentvoid flash6_write_memory_data ( uint32_t addr, uint8_t *data_buf, uint16_t buf_size );
- Function used for writing in memoryvoid flash6_read_memory_data ( uint32_t addr, uint8_t *data_buf, uint16_t buf_size );
- Function used for reading from memoryExamples description
The application is composed of three sections :
void application_task ( )
{
uint32_t start_addr;
uint8_t read_buff[ 50 ];
uint8_t cnt;
start_addr = 0x002000;
mikrobus_logWrite( " >>>> Erase sector <<<< ", _LOG_LINE );
flash6_erase_memory_segment( FLASH6_CMD_SECTOR_ERASE_4KB, start_addr );
Delay_ms( 500 );
mikrobus_logWrite( " >>>> Write in memory <<<< ", _LOG_LINE );
mikrobus_logWrite( " >>>> ............... <<<< ", _LOG_LINE );
flash6_write_memory_data( start_addr, &write_buf[ 0 ], 6 );
mikrobus_logWrite( " >>>> Read from memory <<<< ", _LOG_LINE );
flash6_read_memory_data( start_addr, &read_buff[ 0 ], 6 );
mikrobus_logWrite( " >>>> ", _LOG_TEXT );
for( cnt = 0; cnt < 6; cnt++ )
{
mikrobus_logWrite( &read_buff[ cnt ], _LOG_BYTE );
mikrobus_logWrite( " ", _LOG_TEXT );
Delay_ms( 100 );
}
mikrobus_logWrite( " <<<< ", _LOG_LINE );
mikrobus_logWrite( "---------------------------", _LOG_LINE );
Delay_ms( 2000 );
}
Other mikroE Libraries used in the example:
Additional notes and informations
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.