TOP Contributors

  1. MIKROE (2642 codes)
  2. Alcides Ramos (348 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 (136225 times)
  2. FAT32 Library (69495 times)
  3. Network Ethernet Library (55711 times)
  4. USB Device Library (45995 times)
  5. Network WiFi Library (41640 times)
  6. FT800 Library (40804 times)
  7. GSM click (28789 times)
  8. PID Library (26333 times)
  9. mikroSDK (26061 times)
  10. microSD click (25146 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: 3838 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

Accel 7 click

0

The acceleration sensing is based on the principle of measuring the differential capacitance, which further decreases errors due to manufacturing imperfections, temperature and other environmental influences. The micro-electromechanical sensor (MEMS) is coupled with a very advanced application specific integrated circuit (ASIC), which allows the simplicity of the KXTJ3-1057 design, requiring a low number of additional external components.

[Learn More]

H-Bridge 14 click

0

H-Bridge 14 Click is a compact add-on board with an H-Bridge gate driver, also known as a full-bridge pre-driver. This board features the DRV8873, an automotive H-Bridge motor driver from Texas Instruments. The DRV8873 is an N-channel H-Bridge motor driver that can drive one bidirectional brushed DC motor, two unidirectional brushed DC motors, solenoids, or other resistive inductive loads.

[Learn More]

RTC 8 click

0

RTC 8 click is a real time clock module which has an extremely low power consumption, allowing it to be used with a single button cell battery, for an extended period of time.

[Learn More]