TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 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 (137099 times)
  2. FAT32 Library (70236 times)
  3. Network Ethernet Library (56124 times)
  4. USB Device Library (46434 times)
  5. Network WiFi Library (42077 times)
  6. FT800 Library (41387 times)
  7. GSM click (29116 times)
  8. mikroSDK (26562 times)
  9. PID Library (26489 times)
  10. microSD click (25487 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

SQI FLASH click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-03

Package Version: 2.1.0.9

mikroSDK Library: 2.0.0.0

Category: FLASH

Downloaded: 92 times

Not followed.

License: MIT license  

SQI FLASH click is based on the SST26VF064B, a 64 Mbit Serial Quad I/O flash device from Microchip. The chip utilizes 4-bit multiplexed I/O serial interface to boost the performance. The click is a very fast solid-state, non-volatile data storage medium, that can be electrically erased and reprogrammed.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "SQI FLASH click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "SQI FLASH click" changes.

Do you want to report abuse regarding "SQI FLASH click".

  • mikroSDK Library 1.0.0.0
  • Comments (0)

mikroSDK Library Blog


SQI FLASH click

SQI FLASH click is based on the SST26VF064B, a 64 Mbit Serial Quad I/O flash device from Microchip. The chip utilizes 4-bit multiplexed I/O serial interface to boost the performance. The click is a very fast solid-state, non-volatile data storage medium, that can be electrically erased and reprogrammed.

sqiflash_click.png

click Product page


Click library

  • Author : Stefan Ilic
  • Date : Aug 2021.
  • Type : SPI type

Software Support

We provide a library for the SqiFlash Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Library Description

This library contains API for SqiFlash Click driver.

Standard key functions :

  • sqiflash_cfg_setup Config Object Initialization function.

    void sqiflash_cfg_setup ( sqiflash_cfg_t *cfg );
  • sqiflash_init Initialization function.

    err_t sqiflash_init ( sqiflash_t *ctx, sqiflash_cfg_t *cfg );

Example key functions :

  • sqiflash_write_generic SQI FLASH Write.

    void sqiflash_write_generic( sqiflash_t *ctx, uint32_t address, uint8_t *buffer, uint32_t data_count );
  • sqiflash_read_generic SQI FLASH Read.

    void sqiflash_read_generic( sqiflash_t *ctx, uint32_t address, uint8_t *buffer, uint32_t data_count );
  • sqiflash_global_block_unlock SQI FLASH Global Block Unlock.

    void sqiflash_global_block_unlock( sqiflash_t *ctx );

Example Description

This is an example that demonstrates the use of the SQI FLASH Click board.

The demo application is composed of two sections :

Application Init

SQI FLASH Driver Initialization, initializes the click by setting mikroBUS to approprieate logic levels, performing global block unlock and chip erase functions, reads manufacturer ID, memory type and device ID and logs it on USB UART terminal.


void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    sqiflash_cfg_t sqiflash_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    sqiflash_cfg_setup( &sqiflash_cfg );
    SQIFLASH_MAP_MIKROBUS( sqiflash_cfg, MIKROBUS_1 );
    if ( SPI_MASTER_ERROR == sqiflash_init( &sqiflash, &sqiflash_cfg ) ) 
    {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );
        for ( ; ; );
    }
    Delay_ms ( 300 );
    sqiflash_global_block_unlock( &sqiflash );
    Delay_ms ( 400 );
    sqiflash_chip_erase( &sqiflash );
    Delay_ms ( 300 );

    device_manufac = sqiflash_device_manufac( &sqiflash );
    log_printf( &logger, " Manufacturer ID: 0x%.2X\r\n", ( uint16_t ) device_manufac );
    device_type = sqiflash_device_type( &sqiflash );
    log_printf( &logger, " Memory Type: 0x%.2X\r\n", ( uint16_t ) device_type );
    device_id = sqiflash_device_id( &sqiflash );
    log_printf( &logger, " Device ID: 0x%.2X\r\n", ( uint16_t ) device_id );
    log_info( &logger, " Application Task " );
}

Application Task

Writing data to click memory and displaying the read data via UART.


void application_task ( void ) 
{
    log_printf( &logger, " Writing data to address: 0x%.6LX\r\n", address );
    sqiflash_write_generic( &sqiflash, address, wr_data, 9 );
    log_printf( &logger, " Written data: %s", wr_data );
    log_printf( &logger, "\r\n Reading data from address: 0x%.6LX\r\n", address );
    sqiflash_read_generic( &sqiflash, address, rd_data, 9 );
    log_printf( &logger, " Read data: %s", rd_data );
    log_printf( &logger, "-------------------------------------\r\n" );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
}

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Other Mikroe Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.SqiFlash

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.


ALSO FROM THIS AUTHOR

I2C MUX 2 click

5

I2C MUX 2 Click is a quad bidirectional translating I2C and SMBus switch with reset and interrupt functions, intended for applications with I2C slave address conflicts. It features a quad bidirectional translating switch controlled via the I2C bus, labeled as TCA9545A from Texas Instruments.

[Learn More]

RTC 16 click

0

RTC 16 Click is a compact add-on board that accurately keeps the time of a day. This board features the BU9873, a CMOS real-time clock that has a built-in interrupt generation function from Rohm Semiconductors. The BU9873 provides year, month, day, weekday, hours, minutes, and seconds based on a 32.768kHz quartz crystal. This RTC is connected to the MCU through an I2C interface and configured to serial transmit time and calendar data. It also has an alarm function that outputs an interrupt signal to the MCU when the day of the week, hour, or minute matches with the preset time.

[Learn More]

Magneto 5 click

5

Magneto 5 click is a very accurate and reliable magnetic sensor device, which features the MEMSIC MMC34160PJ, a 3-axis magnetic sensor IC.

[Learn More]