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]
Rating:
Author: MIKROE
Last Updated: 2019-11-12
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: FLASH
Downloaded: 3779 times
Not followed.
License: MIT license
The Semper Flash Click is a Click board which features the S25HS512T, a perfect solution for the mass storage option in various embedded applications.
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 semperflash_send_cmd ( uint8_t cmd )
- Function for sending one byte of datavoid semperflash_transfer_data ( uint8_t *write_buf, uint8_t *read_buf, uint16_t buf_size )
- Function for transfering data via SPI modulevoid semperflash_write_data ( uint8_t *data_buf, uint16_t buf_size )
- Function for writing data via SPI modulevoid semperflash_write_config ( seperflash_cfg_t *cfg_data )
- Function for writing new config to deviceuint8_t semperflash_read_memory ( uint32_t addr, uint8_t *data_buf, uint16_t buf_size )
- Function for reading memory from specific addressuint8_t semperflash_write_memory ( uint32_t addr, uint8_t *data_buf, uint16_t buf_size )
- Function for writing memory to specific addressExamples description
The application is composed of three sections :
void application_task ( )
{
memset( &read_buf_data[ 0 ], 0, 13 );
semperflash_send_cmd( SEMPERFLASH_WRITE_ENABLE );
semperflash_erase_memory( ADRESS_MEMORY );
Delay_ms( 1000 );
if ( COMPANY_FLAG == txt_flag )
{
semperflash_send_cmd( SEMPERFLASH_WRITE_ENABLE );
status_data = semperflash_write_memory( ADRESS_MEMORY, &write_data_com[ 0 ], 7 );
error_handler( status_data );
status_data = semperflash_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 )
{
semperflash_send_cmd( SEMPERFLASH_WRITE_ENABLE );
status_data = semperflash_write_memory( ADRESS_MEMORY, &write_data_clk[ 0 ], 13 );
error_handler( status_data );
status_data = semperflash_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 :
Other mikroE Libraries used in the example:
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.
H-Bridge 10 Click is a compact add-on board containing H-bridge outputs that let you control a DC motor to go backward or forward. This board features the MP6523, a triple, half-bridge, DMOS, output driver with integrated power MOSFETs that can drive up to three different loads from Monolithic Power Systems (MPS). The MP6523 is rated for an operating voltage range from 7V to 28V. It is SPI-configurable and has various diagnostic functions. Complete protection features include short-circuit protection (SCP), under-voltage protection (UVP), and thermal shutdown, alongside an onboard power supply existence-check circuit. This Click board™ is suitable as a multiple brushed DC motor driver for driving various loads in automotive and industrial applications, and more.
[Learn More]WiFi NINA click is a powerful standalone WiFi module, equipped with the state-of-the-art NINA-W132 module from u-blox, that can be easily configured with the u-blox s-center software, using AT commands.
[Learn More]PWR Meter click is a power measurement Click board, capable of measuring voltage and current through the load, connected to either AC or DC power source.
[Learn More]You have unsaved changes. If you choose to leave all changes will be discarded.
Do you want to subscribe in order to receive notifications regarding "Semper Flash click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Semper Flash click" changes.
Do you want to report abuse regarding "Semper Flash click".