TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (351 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136652 times)
  2. FAT32 Library (69870 times)
  3. Network Ethernet Library (55902 times)
  4. USB Device Library (46245 times)
  5. Network WiFi Library (41873 times)
  6. FT800 Library (41113 times)
  7. GSM click (28966 times)
  8. PID Library (26403 times)
  9. mikroSDK (26331 times)
  10. microSD click (25344 times)
Libstock prefers package manager

Package Manager

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]

< Back
mikroSDK Library

Flash 4 click

Rating:

5

Author: MIKROE

Last Updated: 2018-11-07

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: FLASH

Downloaded: 3886 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.

No Abuse Reported

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".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

Flash 4 click

Flash 4 click

Native view of the Flash 4 click board.

View full image
Flash 4 click

Flash 4 click

Front and back view of the Flash 4 click board.

View full image

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 command
  • void flash4_4ReadFlash (uint8_t *outData, uint32_t addr, uint8_t nData) - Functions for read Flash, with 4 byte address
  • void flash4_4PageProgram (uint8_t *inData, uint32_t addr, uint8_t nData) - Functions for write data in Flash, with 4 byte address

Examples description

The application is composed of the three sections :

  • System Initialization - Initializes SPI Module and sets RST pin and CS pin as OUTPUT
  • Application Initialization - Initialization driver init and reset device
  • Application Task - (code snippet) - Erases memory at 0x00001234. Writes a message (MikroElektronika) to address 0x00001234. Then reads the data from the address 0x00001234.
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 clickUSB 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.

ALSO FROM THIS AUTHOR

Color 14 click

0

Color 14 Click is a compact add-on board that represents an accurate color sensing solution. This board features the APDS-9151, an integrated RGB, ambient light sensing, IR LED, and a complete proximity detection system from Broadcom Limited.

[Learn More]

AudioAmp 4 click

0

AudioAmp 4 click is a low-power audio amplifier with a digital volume control. It is equipped with the LM4860, an audio amplifier IC capable of delivering up to 1W of continuous power to an 8 Ω load.

[Learn More]

Flash 6 click

0

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.

[Learn More]