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 (136662 times)
  2. FAT32 Library (69898 times)
  3. Network Ethernet Library (55918 times)
  4. USB Device Library (46248 times)
  5. Network WiFi Library (41881 times)
  6. FT800 Library (41126 times)
  7. GSM click (28971 times)
  8. PID Library (26406 times)
  9. mikroSDK (26343 times)
  10. microSD click (25350 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

LTE IoT click

0

LTE IoT click is a Click board™ that allows connection to the LTE and 2G networks

[Learn More]

CAN Isolator click

5

CAN Isolator click provides isolated CAN communication. It carries the ADM3053 signal and power isolated CAN transceiver with an integrated isolated DC-to-DC converter. The click is designed to run on either 3.3V or 5V power supply. CAN Isolator click communicates with the target microcontroller over UART interface.

[Learn More]

Stepper 7 click

0

Stepper 7 click is a bipolar step motor driver. It features an H-bridge bipolar step motor driver, which supports full and half step control modes. Stepper 7 click also carries a port expander so that the communication can be done with a minimal number of pins, through the mikroBUS™ SPI bus.

[Learn More]