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: 2019-10-18
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: FLASH
Downloaded: 3330 times
Not followed.
License: MIT license
Flash 5 Click is a perfect solution for the mass storage option in various embedded applications. It features the W25N01GVZEIG/IT (1G-bit) Serial SLC NAND Flash Memory from Winbond which provides a storage solution for systems with limited space, pins and power.
Do you want to subscribe in order to receive notifications regarding "Flash 5 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Flash 5 click" changes.
Do you want to report abuse regarding "Flash 5 click".
Library Description
The library initializes and defines the SPI bus and drivers that offer a choice for writing data in memory and reads data from memory. The library includes function for controling configuration of the device, software reset and erasing memory.
Key functions:
void flash5_send_cmd ( uint8_t cmd_data )
- Sends one Byte of datavoid flash5_page_read_memory ( uint16_t column_addr, uint8_t *data_buf, uint16_t buf_size )
- Reads data from memory to buffervoid flash5_page_load_memory ( uint16_t column_addr, uint8_t *data_buf, uint16_t buf_size )
- Writes data to memory from bufferuint8_t flash5_read_status_data ( uint8_t status_cmd, uint8_t status_addr )
- Reads status of selected status registarvoid flash5_write_status_data ( uint8_t status_cmd, uint8_t status_addr, uint8_t status_data )
- Writes status to selected status registarvoid flash5_erase_chip ( void )
- Erases whole device memoryvoid flash5_software_reset ( void )
- Resets deviceExamples description
The application is composed of three sections :
void applicationTask( )
{
uint8_t n_counter;
flash5_send_cmd( FLASH5_CMD_WRITE_ENABLE );
flash5_page_load_memory( 0x000A, &write_buf[ 0 ], 6 );
flash5_page_read_memory( 0x000A, &read_buf[ 0 ], 6 );
for( n_counter = 0; n_counter < 6; n_counter++ )
{
mikrobus_logWrite( &read_buf[ n_counter ], _LOG_BYTE );
Delay_ms( 100 );
}
mikrobus_logWrite( "", _LOG_LINE );
mikrobus_logWrite( "-------------------", _LOG_LINE );
Delay_ms( 5000 );
}
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.