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 (137084 times)
  2. FAT32 Library (70228 times)
  3. Network Ethernet Library (56097 times)
  4. USB Device Library (46428 times)
  5. Network WiFi Library (42044 times)
  6. FT800 Library (41382 times)
  7. GSM click (29110 times)
  8. mikroSDK (26558 times)
  9. PID Library (26487 times)
  10. microSD click (25486 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

Semper Flash 2 click

Rating:

5

Author: MIKROE

Last Updated: 2020-03-20

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: FLASH

Downloaded: 2020 times

Not followed.

License: MIT license  

The Semper Flash 2 Click is a Click board which features the S25HL512T, a perfect solution for the mass storage option in various embedded applications. With fast performance being one of its key features, Semper Flash 2 click can also be used for the code shadowing, execute-in-place (XIP), and data storage.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Semper Flash 2 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Semper Flash 2 click" changes.

Do you want to report abuse regarding "Semper Flash 2 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

Semper Flash 2 Click

Semper Flash 2 Click

Native view of the Semper Flash 2 Click board.

View full image
Semper Flash 2 Click

Semper Flash 2 Click

Front and back view of the Semper Flash 2 Click board.

View full image

Library Description

Library provides functions for using SPI module, changing pin states. Also it gives you function for controlling memory of device.

Key functions:

  • void semperflash2_send_cmd ( uint8_t cmd ) - Function for sending one byte of data
  • void semperflash2_transfer_data ( uint8_t *write_buf, uint8_t *read_buf, uint16_t buf_size ) - Function for transfering data via SPI module
  • void semperflash2_write_data ( uint8_t *data_buf, uint16_t buf_size ) - Function for writing data via SPI module
  • void semperflash2_write_config ( seperflash2_cfg_t *cfg_data ) - Function for writing new config to device
  • uint8_t semperflash2_read_memory ( uint32_t addr, uint8_t *data_buf, uint16_t buf_size ) - Function for reading memory from specific address
  • uint8_t semperflash2_write_memory ( uint32_t addr, uint8_t *data_buf, uint16_t buf_size ) - Function for writing memory to specific address

Examples description

The application is composed of three sections :

  • System Initialization - Initialization of SPI module and setting pins to output
  • Application Initialization - Configure device reads manufacturer id and device id and writes device id
  • Application Task - Erases memory of one address and then on one cycle writes one buffer and on the other writes other one
void application_task ( )
{
    memset( &read_buf_data[ 0 ], 0, 13 );
    semperflash2_send_cmd( SEMPERFLASH2_WRITE_ENABLE );
    semperflash2_erase_memory( ADRESS_MEMORY );
    Delay_ms( 1000 );
    
    if ( COMPANY_FLAG == txt_flag )
    {
       semperflash2_send_cmd( SEMPERFLASH2_WRITE_ENABLE );
       status_data = semperflash2_write_memory( ADRESS_MEMORY, &write_data_com[ 0 ], 7 );
       error_handler( status_data );
       status_data = semperflash2_read_memory( ADRESS_MEMORY, &read_buf_data[ 0 ], 7 );
       error_handler( status_data );
       mikrobus_logWrite( read_buf_data, _LOG_LINE );
       txt_flag = CLICK_FLAG;
    }
    else if ( CLICK_FLAG == txt_flag )
    {
       semperflash2_send_cmd( SEMPERFLASH2_WRITE_ENABLE );
       status_data = semperflash2_write_memory( ADRESS_MEMORY, &write_data_clk[ 0 ], 13 );
       error_handler( status_data );
       status_data = semperflash2_read_memory( ADRESS_MEMORY, &read_buf_data[ 0 ], 13 );
       error_handler( status_data );
       mikrobus_logWrite( read_buf_data, _LOG_LINE );
       txt_flag = COMPANY_FLAG;
    }
    mikrobus_logWrite( "....................", _LOG_LINE );
    Delay_ms( 2000 );
}


Additional Functions :

  • void error_handler ( uint8_t stat ) - Proceses return of the function and if it is error logs witch one it is

The full application code, and ready to use projects can be found on our LibStock page.

Other mikroE Libraries used in the example:

  • SPI
  • Conversions

Additional notes and informations

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

Heart Rate 10 click

0

Heart Rate 10 Click is a compact add-on board suitable for heart rate monitoring applications. This board features the MAX86916, an integrated optical sensor with applications in bio-sensing, proximity, and color from Maxim Integrated.

[Learn More]

Camera Click - Example

6

This project is a simple demonstration of using Camera click board based on the OV7670-VL2A CMOS VGA camera.

[Learn More]

DIGI POT 13 click

0

DIGI POT 13 Click is a compact add-on board that contains a digitally controlled potentiometer. This board features the MAX5419, a 256-tap non-volatile digital potentiometer from Analog Devices. On this Click board™, one digitally I2C-controlled potentiometer is realized with typical end-to-end resistance values of 200kΩ. It can operate from both 3.3V and 5V power supplies and provides a low 35ppm/ºC end-to-end nominal resistance temperature coefficient and only 5ppm/ºC ratiometric.

[Learn More]