flash8 2.0.0.0
Flash 8 Click Driver

API for configuring and manipulating Flash 8 Click driver. More...

Topics

 Flash 8 command set List
 List of command set of Flash 8 Click driver.
 
 Flash 8 Registers Settings
 Settings for registers of Flash 8 Click driver.
 
 Flash 8 MikroBUS Map
 MikroBUS pin mapping of Flash 8 Click driver.
 
 Flash8_get
 

Functions

void flash8_cfg_setup (flash8_cfg_t *cfg)
 Flash 8 configuration object setup function.
 
err_t flash8_init (flash8_t *ctx, flash8_cfg_t *cfg)
 Flash 8 initialization function.
 
void flash8_default_cfg (flash8_t *ctx)
 Flash 8 default configuration function.
 
err_t flash8_generic_write (flash8_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 Flash 8 data writing function.
 
err_t flash8_generic_read (flash8_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 Flash 8 data reading function.
 
void flash8_hold_enable (flash8_t *ctx)
 Flash 8 hold enable function.
 
void flash8_hold_disable (flash8_t *ctx)
 Flash 8 hold disable function.
 
void flash8_write_protect_enable (flash8_t *ctx)
 Flash 8 enable write protection function.
 
void flash8_write_protect_disable (flash8_t *ctx)
 Flash 8 disable write protection function.
 
err_t flash8_read_cell_array (flash8_t *ctx, uint32_t row_address, uint16_t column_address, uint8_t *feature_status_out)
 Flash 8 read cell array function.
 
err_t flash8_read_buffer (flash8_t *ctx, uint16_t column_address, uint8_t *read_data)
 Flash 8 read buffer function.
 
err_t flash8_program_load (flash8_t *ctx, uint16_t column_address, uint8_t *data_in, uint16_t len)
 Flash 8 program load function.
 
err_t flash8_program_execute (flash8_t *ctx, uint32_t row_address)
 Flash 8 program execute function.
 
err_t flash8_program_load_random (flash8_t *ctx, uint16_t column_address, uint8_t *data_in, uint8_t len)
 Flash 8 program load random function.
 
err_t flash8_block_erase (flash8_t *ctx, uint32_t row_address, uint8_t *feat_data)
 Flash 8 block erase function.
 
err_t flash8_sw_reset (flash8_t *ctx, uint8_t *feat_data)
 Flash 8 soft reset function.
 
err_t flash8_write_enable (flash8_t *ctx)
 Flash 8 write enable function.
 
err_t flash8_write_disable (flash8_t *ctx)
 Flash 8 write disable function.
 
err_t flash8_set_feature (flash8_t *ctx, uint8_t feature_addr, uint8_t feature_data)
 Flash 8 set feature function.
 
err_t flash8_set_config_feature (flash8_t *ctx, feature_cfg_t feature_data)
 Flash 8 set config feature function.
 
err_t flash8_get_feature (flash8_t *ctx, uint8_t feature_addr, uint8_t *feature_data)
 Flash 8 get feature function.
 
err_t flash8_get_config_feature (flash8_t *ctx, feature_cfg_t *feature_data)
 Flash 8 get config feature function.
 
err_t flash8_protected_area_all_unlocked (flash8_t *ctx)
 Flash 8 protected area all unlocked function.
 
err_t flash8_protect_execute (flash8_t *ctx, uint32_t row_address, uint8_t *feature_status_out)
 Flash 8 protect execute function.
 
err_t flash8_read_id (flash8_t *ctx, uint8_t *manufacture_id, uint8_t *device_id, uint8_t *organization_id)
 Flash 8 read ID function.
 
err_t flash8_write_memory (flash8_t *ctx, uint32_t row_address, uint16_t column_address, uint8_t *data_in, uint16_t len, uint8_t *feature_status_out)
 Flash 8 write memory function.
 
err_t flash8_read_memory (flash8_t *ctx, uint32_t row_address, uint16_t column_address, uint8_t *data_out, uint16_t len, uint8_t *feature_status_out)
 Flash 8 read memory function.
 

Detailed Description

API for configuring and manipulating Flash 8 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ flash8_block_erase()

err_t flash8_block_erase ( flash8_t * ctx,
uint32_t row_address,
uint8_t * feat_data )

Flash 8 block erase function.

This function block erase, performs erases the selected block. To complete the operation, performs write enable, erase data in the block and read the status (OIP and ERS_F bits) of the device of the KIOXIA 8Gb 3.3V Serial Interface NAND on the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
[in]row_address: Row Address 18-bits ( Block Address 12-bits, Page Address 6-bits ).
[out]feat_data: Read the status (OIP and ERS_F bits) of the device.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ flash8_cfg_setup()

void flash8_cfg_setup ( flash8_cfg_t * cfg)

Flash 8 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See flash8_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ flash8_default_cfg()

void flash8_default_cfg ( flash8_t * ctx)

Flash 8 default configuration function.

This function executes a default configuration of Flash 8 click board.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
Returns
None.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ flash8_generic_read()

err_t flash8_generic_read ( flash8_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

Flash 8 data reading function.

This function reads a desired number of data bytes starting from the selected register by using SPI serial interface.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
[in]reg: Start register address.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ flash8_generic_write()

err_t flash8_generic_write ( flash8_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

Flash 8 data writing function.

This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
[in]reg: Start register address.
[in]data_in: Data to be written.
[in]len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ flash8_get_config_feature()

err_t flash8_get_config_feature ( flash8_t * ctx,
feature_cfg_t * feature_data )

Flash 8 get config feature function.

This function get all features for getting feature settings or status of the KIOXIA 8Gb 3.3V Serial Interface NAND on the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
[out]feature_data: Feature operation object.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ flash8_get_feature()

err_t flash8_get_feature ( flash8_t * ctx,
uint8_t feature_addr,
uint8_t * feature_data )

Flash 8 get feature function.

This function get individual features for getting feature settings or status of the KIOXIA 8Gb 3.3V Serial Interface NAND on the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
[in]feature_addr: Feature Table address.
[in]feature_data: Feature data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ flash8_hold_disable()

void flash8_hold_disable ( flash8_t * ctx)

Flash 8 hold disable function.

This function performs write protection disable ( HLD is high ) of the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ flash8_hold_enable()

void flash8_hold_enable ( flash8_t * ctx)

Flash 8 hold enable function.

This function performs write protection enabled ( HLD is low ) of the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ flash8_init()

err_t flash8_init ( flash8_t * ctx,
flash8_cfg_t * cfg )

Flash 8 initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See flash8_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See flash8_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ flash8_program_execute()

err_t flash8_program_execute ( flash8_t * ctx,
uint32_t row_address )

Flash 8 program execute function.

This function performs program data from the buffer to the cell array of the KIOXIA 8Gb 3.3V Serial Interface NAND on the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
[in]row_address: Row Address 18-bits ( Block Address 12-bits, Page Address 6-bits ).
[in]data_in: Data to be written.
[in]len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ flash8_program_load()

err_t flash8_program_load ( flash8_t * ctx,
uint16_t column_address,
uint8_t * data_in,
uint16_t len )

Flash 8 program load function.

This function performs transfer data to the internal data buffer of the KIOXIA 8Gb 3.3V Serial Interface NAND on the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
[in]column_address: Column Address 13 bits ( 4224 or 4352 bytes/page ).
[in]data_in: Data to be written.
[in]len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ flash8_program_load_random()

err_t flash8_program_load_random ( flash8_t * ctx,
uint16_t column_address,
uint8_t * data_in,
uint8_t len )

Flash 8 program load random function.

This function program load random data and get feature performs transfer data to the internal data buffer of the KIOXIA 8Gb 3.3V Serial Interface NAND on the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
[in]column_address: Column Address 13 bits ( 4224 or 4352 bytes/page ).
[in]data_in: Data to be written.
[in]len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ flash8_protect_execute()

err_t flash8_protect_execute ( flash8_t * ctx,
uint32_t row_address,
uint8_t * feature_status_out )

Flash 8 protect execute function.

This function program the operation protect desired block and read the status (OIP and PRG_F bits) of the device of the KIOXIA 8Gb 3.3V Serial Interface NAND on the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
[in]row_address: Row Address 18-bits ( Block Address 12-bits, Page Address 6-bits ).
[out]feature_status_out: Read the status (OIP and PRG_F bits) of the device.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ flash8_protected_area_all_unlocked()

err_t flash8_protected_area_all_unlocked ( flash8_t * ctx)

Flash 8 protected area all unlocked function.

This function performs unlocked all protected area of the KIOXIA 8Gb 3.3V Serial Interface NAND on the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ flash8_read_buffer()

err_t flash8_read_buffer ( flash8_t * ctx,
uint16_t column_address,
uint8_t * read_data )

Flash 8 read buffer function.

This function read output the data from the internal data buffer of the KIOXIA 8Gb 3.3V Serial Interface NAND on the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
[in]column_address: Column Address 13 bits ( 4224 or 4352 bytes/page ).
[out]read_data: Read data out.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ flash8_read_cell_array()

err_t flash8_read_cell_array ( flash8_t * ctx,
uint32_t row_address,
uint16_t column_address,
uint8_t * feature_status_out )

Flash 8 read cell array function.

This function read the data from the cell array to the internal data buffer and read the status (OIP, ECCS0 and ECCS1 bits) of the KIOXIA 8Gb 3.3V Serial Interface NAND on the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
[in]row_address: Row Address 18-bits ( Block Address 12-bits, Page Address 6-bits ).
[in]column_address: Column Address 13 bits ( 4224 or 4352 bytes/page ).
[out]feature_status_out: Feature Table data out.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ flash8_read_id()

err_t flash8_read_id ( flash8_t * ctx,
uint8_t * manufacture_id,
uint8_t * device_id,
uint8_t * organization_id )

Flash 8 read ID function.

This function read manufacture, device and organization ID of the KIOXIA 8Gb 3.3V Serial Interface NAND on the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
[out]manufacture_id: Manufacture ID (KIOXIA) ( 0x98 ).
[out]device_id: Device ID ( 0xE4 ).
[out]organization_id: Organization ID ( 0x51 ).
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ flash8_read_memory()

err_t flash8_read_memory ( flash8_t * ctx,
uint32_t row_address,
uint16_t column_address,
uint8_t * data_out,
uint16_t len,
uint8_t * feature_status_out )

Flash 8 read memory function.

This function read memory, performs read the data from the cell array to the internal data buffer, read the status (OIP, ECCS0 and ECCS1 bits) and output the data from the internal data buffer of the KIOXIA 8Gb 3.3V Serial Interface NAND on the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
[in]row_address: Row Address 18-bits ( Block Address 12-bits, Page Address 6-bits ).
[in]column_address: Column Address 13 bits ( 4224 or 4352 bytes/page ).
[out]data_out: Output read data.
[in]len: Number of bytes to be written.
[out]feature_status_out: Read the status (OIP, ECCS0 and ECCS1 bits) of the device.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ flash8_set_config_feature()

err_t flash8_set_config_feature ( flash8_t * ctx,
feature_cfg_t feature_data )

Flash 8 set config feature function.

This function set all features for getting feature settings or status of the KIOXIA 8Gb 3.3V Serial Interface NAND on the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
[in]feature_data: Feature operation object.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ flash8_set_feature()

err_t flash8_set_feature ( flash8_t * ctx,
uint8_t feature_addr,
uint8_t feature_data )

Flash 8 set feature function.

This function set individual features for getting feature settings or status of the KIOXIA 8Gb 3.3V Serial Interface NAND on the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
[in]feature_addr: Feature Table address.
[in]feature_data: Feature data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ flash8_sw_reset()

err_t flash8_sw_reset ( flash8_t * ctx,
uint8_t * feat_data )

Flash 8 soft reset function.

This function soft reset, executed to abort the operation in progress by reset command and read the status (OIP bit) of the KIOXIA 8Gb 3.3V Serial Interface NAND on the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
[out]feat_data: Read the status (OIP bit) of the device.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ flash8_write_disable()

err_t flash8_write_disable ( flash8_t * ctx)

Flash 8 write disable function.

This function write enable reset the WEL (Write Enable Latch) bit of the KIOXIA 8Gb 3.3V Serial Interface NAND on the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ flash8_write_enable()

err_t flash8_write_enable ( flash8_t * ctx)

Flash 8 write enable function.

This function write enable set the WEL (Write Enable Latch) bit of the KIOXIA 8Gb 3.3V Serial Interface NAND on the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ flash8_write_memory()

err_t flash8_write_memory ( flash8_t * ctx,
uint32_t row_address,
uint16_t column_address,
uint8_t * data_in,
uint16_t len,
uint8_t * feature_status_out )

Flash 8 write memory function.

This function write, memory performs enable the program function, transfer data to the internal data buffe, program data from the buffer to the cell array and read the status (OIP and PRG_F bits) of the KIOXIA 8Gb 3.3V Serial Interface NAND on the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
[in]row_address: Row Address 18-bits ( Block Address 12-bits, Page Address 6-bits ).
[in]column_address: Column Address 13 bits ( 4224 or 4352 bytes/page ).
[in]data_in: Data to be written.
[in]len: Number of bytes to be written.
[out]feature_status_out: Read the status (OIP and PRG_F bits) of the device.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ flash8_write_protect_disable()

void flash8_write_protect_disable ( flash8_t * ctx)

Flash 8 disable write protection function.

This function performs write protection disable ( WP is high ) of the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ flash8_write_protect_enable()

void flash8_write_protect_enable ( flash8_t * ctx)

Flash 8 enable write protection function.

This function performs write protection enabled ( WP is low ) of the Flash 8 Click board™.

Parameters
[in]ctx: Click context object. See flash8_t object definition for detailed explanation.
Returns
None.
Note
None.