ConOpSys V2970
P004.07
ANVILEX control operating system
|
NAND memory hardware driver. More...
#include <S25FL512.h>
Classes | |
union | TBlock_Register |
Block lock register structure. More... | |
union | TStatus_Register |
Status register structure. More... | |
Public Member Functions | |
VOID | Init () |
Class constructor method. More... | |
virtual VOID | Start () |
Driver start operation method. More... | |
VOID | Execute () |
Background execute method. More... | |
virtual BOOL | Read_Buffer (U32 u32_Linear_Address, U32 u32_Size, U8 *u8_Data_Buffer) |
Read data from memory into buffer. More... | |
BOOL | Read_Extended_Buffer (U32 u32_Linear_Address, U32 u32_Size, U8 *u8_Data_Buffer) |
Read data from memory into buffer. More... | |
BOOL | Read_Buffer_By_Page_Index (U32 u32_Page_Index, U16 u16_Offset, U32 u32_Size, U8 *u8_Data_Buffer) |
Read data from memory into buffer. More... | |
virtual BOOL | Write_Buffer (U32 u32_Linear_Address, U32 u32_Size, U8 *u8_Data_Buffer) |
Write data from buffer into memory. More... | |
BOOL | Write_Buffer_By_Page_Index (U32 u32_Page_Index, U16 u16_Offset, U32 u32_Size, U8 *u8_Data_Buffer) |
Write data from buffer into memory. More... | |
BOOL | Erase_Block_By_Index (U16 u16_Block_Index) |
Erase block referenced by block index. More... | |
virtual BOOL | Erase_Chip (BOOL bool_Force_Bad_Block_Erase) |
Erase all blocks of the chip. More... | |
BOOL | Get_Bad_Block_Status (U32 u32_Block_Index, BOOL *bool_Bad_Block_Status) |
Test for specified block is bad and can not be utilised. More... | |
BOOL | Is_Block_Empty (U16 u16_Block_Index) |
Test for specified block is empty and be utilised for write operation. More... | |
BOOL | Is_Page_In_Cache_Empty () |
Test for specified page is empty and be utilised for write operation. More... | |
virtual VOID | Send_Information (TProtocol_Base *object_Protocol) |
Method sends actual driver information over specified communication link protocol. More... | |
TReturn_Test_Code | QA_Erase_Block_Test () |
Erase block test method. More... | |
TReturn_Test_Code | QA_Write_Page_Test () |
Write page test method. More... | |
TReturn_Test_Code | QA_Read_Page_Test () |
Read page test method. More... | |
TReturn_Test_Code | QA_Single_Block_Erase_Test () |
Single block erase test method. More... | |
TReturn_Test_Code | QA_Flash_Driver_Main_Test () |
Method for starting the main test sequence. More... | |
Public Member Functions inherited from TSPI_Memory_Base | |
TSPI_Memory_Base () | |
Base class constructor method. More... | |
virtual | ~TSPI_Memory_Base () |
Base class constructor method. More... | |
VOID | Init () |
SPI memory base object initialisation method. More... | |
VOID | Done () |
SPI memory base object finalisation method. More... | |
virtual VOID | Stop () |
Stop operation of SPI memory base driver. More... | |
VOID | Assign_SPI_Master (TSPI_Master_Base *object_New_SPI_Master) |
Assign SPI master hardware driver. More... | |
VOID | Unassign_SPI_Master () |
Unassign SPI master hardware driver. More... | |
virtual BOOL | Verify_Buffer (U32 u32_Linear_Address, U32 u32_Size, U8 *u8_Data_Buffer) |
Verify data in memory and memory method. More... | |
BOOL | Get_Block_Address (U16 u16_Block_Index, U32 *u32_Linear_Address) |
Get linear address of the block by specified block index. More... | |
BOOL | Get_Page_Address (U16 u16_Block_Index, U16 u16_Relative_Page_Index, U32 *u32_Linear_Address) |
Get linear address of the page by specified block index and relative page index. More... | |
U32 | Get_Capacity () |
Get capacity of attached SPI memory. More... | |
TRIL | Is_Available () |
Return SPI avaliability. More... | |
BOOL | Get_Page_Index (U32 u32_Linear_Address, U32 *u32_Page_Index) |
Get page index from lenear address. More... | |
BOOL | Get_Page_Index (U16 u16_Block_Index, U16 u16_Page_Relative_Index, U32 *u32_Page_Index) |
Get page index from block index and page relative index. More... | |
BOOL | Get_Block_Index_By_Page (U32 u32_Page_Index, U16 *u16_Block_Index) |
Get block index by page index. More... | |
BOOL | Get_Page_Index (U16 u16_Block_Index, U32 *u32_Page_Index) |
Get page index of the block. More... | |
BOOL | Get_Page_Size (U16 *u16_Page_Size) |
Return page size in bytes. More... | |
BOOL | Get_Pages_Per_Block_Count (U16 *u16_Pages_Per_Block) |
Return pages number into block. More... | |
BOOL | Get_Block_Count (U16 *u16_Block_Count) |
Return total amount of the blocks. More... | |
BOOL | Get_Pages_Per_Chip_Count (U32 *u32_Pages_Per_Chip) |
Return total amount of the pages. More... | |
Public Attributes | |
TChip_Type | enum_Flash_Chip_Type = chip_type_None |
Flash chip type storage. More... | |
U8 | u8_Manufacturer_ID = (U8)0xFF |
Manufacturer number storage. More... | |
U8 | u8_Device_ID = (U8)0xFF |
Serial number storage. More... | |
volatile U8 | u8_JEDEC_ID [3] = { (U8)0xFF, (U8)0xFF, (U8)0xFF } |
JEDEC code storage. More... | |
U32 | u32_Identifier_Dummy_Byte_Counter = (U32)0 |
Read identifier dummy byte counter. More... | |
U8 | u8_BP1 = (U8)0x00 |
BP1 bit in BL register. More... | |
U8 | u8_BP2 = (U8)0x00 |
BP2 bit in BL register. More... | |
U8 | u8_BRWD = (U8)0x00 |
BRWD bit in BL register. More... | |
U32 | u32_Block_Erase_Request_Counter = (U32)0 |
Block erase request counter. More... | |
U32 | u32_Block_Erase_Error_Counter = (U32)0 |
Block read error counter. More... | |
U32 | u32_Page_Read_Request_Counter = (U32)0 |
Page read request counter. More... | |
U32 | u32_Page_Read_Error_Counter = (U32)0 |
Page read error counter. More... | |
U32 | u32_Page_Write_Request_Counter = (U32)0 |
Page write request counter. More... | |
U32 | u32_Page_Write_Error_Counter = (U32)0 |
Page write error counter. More... | |
U16 | u16_Bad_Block_Counter = (U16)0 |
Bad block search counter. More... | |
U16 | u16_Bad_Block_Count = (U16)0 |
Bad block count. More... | |
U16 | u16_Execute_Bad_Block_Count_Index = (U16)0 |
Actual block index of the search bad block count process. More... | |
U8 | u8_Test_Buffer [2048] |
Actual block index of the search bad block count process. More... | |
Private Types | |
enum | TChip_Type { chip_type_None = 0 , chip_type_Unknown = 1 , chip_type_IS37SML01G1 = 2 , chip_type_GD5F4GQ4UAYIG = 3 , chip_type_S25FL512S = 4 } |
Define chip types. More... | |
enum | TS25FL512SCommand { commandRES = (U8)0xFF , commandBE = (U8)0xD8 , commandGF = (U8)0x0F , commandSF = (U8)0x1F , commandWRDI = (U8)0x04 , commandWREN = (U8)0x06 , commandPP = (U8)0x02 , commandRPP = (U8)0x84 , commandPE = (U8)0x10 , commandREAD = (U8)0x13 , commandRFC = (U8)0x03 , commandRDID = (U8)0x9F , command2RFC = (U8)0x3B , command4RPP = (U8)0x34 , command4RFC = (U8)0x6B } |
Define NVRAM commands. More... | |
enum | TS25FL512SAdress { address_BL = (U8)0xA0 , address_OTP = (U8)0xB0 , address_SR = (U8)0xC0 , address_OD = (U8)0xD0 } |
Feature address list. More... | |
typedef enum TS25FL512::TS25FL512SAdress | TS25FL512SAdress |
Feature address list. More... | |
Private Member Functions | |
virtual BOOL | Write_Enable () |
Enable write operation into memory. More... | |
virtual BOOL | Write_Disable () |
Disable write operation into memory. More... | |
virtual BOOL | Read_Status_Register (U8 *u8_Status_Register) |
Read memory device status register method. More... | |
BOOL | Get_Feature (TS25FL512SAdress enum_Feature_Adress, U8 *u8_Data) |
Get flash memory feature method. More... | |
BOOL | Set_Feature (TS25FL512SAdress enum_Feature_Adress, U8 u8_Data) |
Set flash memory feature method. More... | |
virtual BOOL | Read_Identification () |
Read memory device identification information method. More... | |
VOID | Reset () |
Software reset memory chip method. More... | |
BOOL | Read_Page_From_Cache_By_Leniar_Address (U32 u32_Address, U32 u32_Length, U8 *u8_Data_Buffer) |
Read multiple byte from chip cache method. More... | |
BOOL | Read_Page_From_Cache (U16 u16_Offset, U32 u32_Length, U8 *u8_Data_Buffer) |
Read multiple byte from chip cache method. More... | |
BOOL | Write_Page_To_Cache_By_Leniar_Address (U32 u32_Address, U32 u32_Length, U8 *u8_Data_Buffer) |
Write multiple byte into chip cache method. More... | |
BOOL | Write_Page_To_Cache (U16 u16_Offset, U32 u32_Length, U8 *u8_Data_Buffer) |
Write multiple byte into chip cache method. More... | |
BOOL | Read_Page_From_Cells_To_Cache (U32 u32_Linear_Address) |
Read page from chip cells into the cache method. More... | |
BOOL | Read_Page_From_Cells_To_Cache_By_Index (U32 u32_Page_Index) |
Read page from chip cells into the cache method. Page referenced by absolute page index within memory chip. More... | |
BOOL | Write_Page_From_Cache_To_Cells (U32 u32_Linear_Address) |
Write page from cache into chip cells method. More... | |
BOOL | Write_Page_From_Cache_To_Cells_By_Page_Index (U32 u32_Page_Index) |
Write page from cache into chip cells method. More... | |
BOOL | Get_Write_Protection_Bits () |
Get write protection bits. More... | |
BOOL | Wait_For_Operation_Done (F32 f32_Timeout) |
Wait specified time for hardware controller operation done method. More... | |
BOOL | Is_Operation_In_Progress () |
Get operation status method. More... | |
BOOL | Is_Read_Failure () |
Get read operation status method. More... | |
BOOL | Is_Erase_Failure () |
Get erase operation status method. More... | |
BOOL | Is_Program_Failure () |
Get program operation status method. More... | |
VOID | Increment_Block_Erase_Request_Counter () |
Increment block erase request counter method. More... | |
VOID | Increment_Block_Erase_Error_Counter () |
Increment block erase error counter method. More... | |
VOID | Increment_Page_Read_Request_Counter () |
Increment page read request counter method. More... | |
VOID | Increment_Page_Read_Error_Counter () |
Increment page read error counter method. More... | |
VOID | Increment_Page_Write_Request_Counter () |
Increment page write request counter method. More... | |
VOID | Increment_Page_Write_Error_Counter () |
Increment page write error counter method. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from TSPI_Memory_Base | |
BOOL | Get_Chip_Size (U32 *u32_Chip_Size) |
Return total chip capacity in bytes. More... | |
BOOL | Get_Block_Size (U32 *u32_Block_Size) |
Return block size in bytes. More... | |
BOOL | Extract_Page_Relative_Address (U32 u32_Linear_Address, U16 *u16_Relative_Address) |
Extract page relative address from lenear address. More... | |
BOOL | Is_Block_Index_In_Range (U16 u16_Block_Index) |
This method check that block index is valid. More... | |
BOOL | Is_Page_Index_In_Range (U32 u32_Page_Index) |
This method check that page index is valid. More... | |
Protected Attributes inherited from TSPI_Memory_Base | |
TSPI_Master_Base * | object_SPI_Master = (TSPI_Master_Base*)NULL |
Pointer to the SPI master object. More... | |
TMemory_Chip_Descriptor * | struct_Memory_Chip_Descriptor = (TMemory_Chip_Descriptor*)NULL |
Pointer to the chip descriptor structure. More... | |
TRIL | tril_Available = (TRIL)unset |
Memory chip availablility status. More... | |
BOOL | bool_Manufacturer_ID_Available = (BOOL)false |
Manufacturer ID availablility status. More... | |
BOOL | bool_Device_ID_Available = (BOOL)false |
Device ID availablility status. More... | |
BOOL | bool_Serial_Number_Available = (BOOL)false |
Serial number availablility status. More... | |
U32 | u32_Capacity = (U32)0 |
Depricated: Capacity of SPI memory in bytes. More... | |
NAND memory hardware driver.
|
private |
Feature address list.
|
private |
|
private |
|
private |
Define NVRAM commands.
Erase block referenced by block index.
[in] | u16_Block_Index | - Block index to erase |
false | - Erase operation failed |
true | - Erase operation successed |
References commandBE, TSPI_Master_Base::CS_Activate(), TSPI_Master_Base::CS_Deactivate(), Extract_U8_From_U16(), false, TSPI_Memory_Base::Get_Pages_Per_Block_Count(), Is_Erase_Failure(), NULL, TSPI_Memory_Base::object_SPI_Master, TSPI_Master_Base::Send_Byte(), Wait_For_Operation_Done(), and Write_Enable().
Referenced by Erase_Chip(), TEvent_Manager::Execute(), QA_Erase_Block_Test(), and QA_Single_Block_Erase_Test().
Erase all blocks of the chip.
[in] | bool_Force_Bad_Block_Erase | - Force bad block erase |
false | - Erase operation failed |
true | - Erase operation successed |
Reimplemented from TSPI_Memory_Base.
References Erase_Block_By_Index(), false, Get_Bad_Block_Status(), TSPI_Memory_Base::Get_Block_Count(), NULL, TSPI_Memory_Base::object_SPI_Master, and true.
Referenced by TEvent_Manager::Format_Event_Storage().
VOID TS25FL512::Execute | ( | ) |
Background execute method.
References Get_Bad_Block_Status(), Increment_Overflowed(), Increment_Saturated(), NULL, TSPI_Memory_Base::object_SPI_Master, true, u16_Bad_Block_Count, u16_Bad_Block_Counter, and u16_Execute_Bad_Block_Count_Index.
Referenced by TEvent_Manager::Execute().
Test for specified block is bad and can not be utilised.
[in] | u32_Block_Index | - Block index to erase |
[out] | bool_Bad_Block_Status | - Bad block status value |
false | - Block is good |
true | - Block is bad |
References TS25FL512::TStatus_Register::bits_ECC_Status, false, TSPI_Memory_Base::Get_Page_Address(), Read_Extended_Buffer(), Read_Status_Register(), and TS25FL512::TStatus_Register::u8_Raw_Data.
Referenced by Erase_Chip(), TEvent_Manager::Execute(), Execute(), TEvent_Manager::Get_Min_Max_Flash_Index(), TEvent_Manager::Half_Devision_Method_Searching(), QA_Erase_Block_Test(), QA_Read_Page_Test(), QA_Single_Block_Erase_Test(), and QA_Write_Page_Test().
|
private |
Get flash memory feature method.
[in] | enum_Feature_Adress | - Chip feature address |
[out] | u8_Data | - Chip feature value |
false | - Get operation successed |
true | - Get operation failed |
References commandGF, TSPI_Master_Base::CS_Activate(), TSPI_Master_Base::CS_Deactivate(), TSPI_Memory_Base::object_SPI_Master, TSPI_Master_Base::Receive_Byte(), and TSPI_Master_Base::Send_Byte().
Referenced by Get_Write_Protection_Bits().
|
private |
Get write protection bits.
false | - Operation successed |
true | - Operation failed |
References address_BL, TS25FL512::TBlock_Register::BP1, TS25FL512::TBlock_Register::BP2, TS25FL512::TBlock_Register::BRWD, Get_Feature(), u8_BP1, u8_BP2, u8_BRWD, and TS25FL512::TBlock_Register::u8_Raw_Data.
Referenced by Start().
|
private |
Increment block erase error counter method.
References Increment_Saturated(), and u32_Block_Erase_Error_Counter.
|
private |
Increment block erase request counter method.
References Increment_Saturated(), and u32_Block_Erase_Request_Counter.
|
private |
Increment page read error counter method.
References Increment_Saturated(), and u32_Page_Read_Error_Counter.
Referenced by Read_Page_From_Cells_To_Cache_By_Index().
|
private |
Increment page read request counter method.
References Increment_Saturated(), and u32_Page_Read_Request_Counter.
Referenced by Read_Page_From_Cells_To_Cache_By_Index().
|
private |
Increment page write error counter method.
References Increment_Saturated(), and u32_Page_Write_Error_Counter.
Referenced by Write_Page_From_Cache_To_Cells(), and Write_Page_From_Cache_To_Cells_By_Page_Index().
|
private |
Increment page write request counter method.
References Increment_Saturated(), and u32_Page_Write_Request_Counter.
Referenced by Write_Page_From_Cache_To_Cells(), and Write_Page_From_Cache_To_Cells_By_Page_Index().
VOID TS25FL512::Init | ( | ) |
Class constructor method.
Class destructor method.
Driver initialisation method.
References TSPI_Memory_Base::Init().
Test for specified block is empty and be utilised for write operation.
[in] | u16_Block_Index | - Block index to be test |
false | - Block is not empty |
true | - Block is empty |
References TSPI_Memory_Base::Get_Page_Index(), TSPI_Memory_Base::Get_Pages_Per_Block_Count(), Is_Page_In_Cache_Empty(), and Read_Page_From_Cells_To_Cache_By_Index().
Referenced by TEvent_Manager::Execute(), QA_Erase_Block_Test(), and QA_Single_Block_Erase_Test().
|
private |
Get erase operation status method.
false | - Erase operation successed without any errors |
true | - Erase oparation failed |
References TS25FL512::TStatus_Register::bit_Erase_Fail, Read_Status_Register(), and TS25FL512::TStatus_Register::u8_Raw_Data.
Referenced by Erase_Block_By_Index().
|
private |
Get operation status method.
false | - Operation completed |
true | - Operation in progress |
References TS25FL512::TStatus_Register::bit_Operation_In_Progress, Read_Status_Register(), and TS25FL512::TStatus_Register::u8_Raw_Data.
BOOL TS25FL512::Is_Page_In_Cache_Empty | ( | ) |
Test for specified page is empty and be utilised for write operation.
false | - Page is not empty |
true | - Page is empty |
References commandRFC, TSPI_Master_Base::CS_Activate(), TSPI_Master_Base::CS_Deactivate(), false, TSPI_Memory_Base::Get_Page_Size(), TSPI_Memory_Base::object_SPI_Master, TSPI_Master_Base::Send_Byte(), and TSPI_Master_Base::Verify_Byte().
Referenced by Is_Block_Empty().
|
private |
Get program operation status method.
false | - Program operation successed without any errors |
true | - Program oparation failed |
References TS25FL512::TStatus_Register::bit_Program_Fail, Read_Status_Register(), and TS25FL512::TStatus_Register::u8_Raw_Data.
Referenced by Write_Page_From_Cache_To_Cells(), and Write_Page_From_Cache_To_Cells_By_Page_Index().
|
private |
Get read operation status method.
false | - Read operation successed without any errors |
true | - Read oparation failed |
References TS25FL512::TStatus_Register::bits_ECC_Status, Read_Status_Register(), and TS25FL512::TStatus_Register::u8_Raw_Data.
Referenced by Read_Page_From_Cells_To_Cache_By_Index().
TReturn_Test_Code TS25FL512::QA_Erase_Block_Test | ( | ) |
Erase block test method.
References enum_Block_Empty_Error, enum_Block_Erase_Error, enum_Block_Index_Out_Range, enum_Get_Block_Count_Error, enum_Get_Block_Status_Error, enum_Success_Test_Code, Erase_Block_By_Index(), Get_Bad_Block_Status(), TSPI_Memory_Base::Get_Block_Count(), Is_Block_Empty(), and TSPI_Memory_Base::Is_Block_Index_In_Range().
Referenced by QA_Flash_Driver_Main_Test().
TReturn_Test_Code TS25FL512::QA_Flash_Driver_Main_Test | ( | ) |
Method for starting the main test sequence.
References enum_Erase_Test_Failed, enum_Read_Test_Failed, enum_Single_Block_Erase_Test_Failed, enum_Success_Test_Code, enum_Write_Test_Failed, QA_Erase_Block_Test(), QA_Read_Page_Test(), QA_Single_Block_Erase_Test(), and QA_Write_Page_Test().
TReturn_Test_Code TS25FL512::QA_Read_Page_Test | ( | ) |
Read page test method.
References enum_Get_Block_Index_Error, enum_Get_Block_Status_Error, enum_Get_Page_Per_Block_Count_Error, enum_Get_Page_Per_Chip_Count_Error, enum_Get_Page_Size_Error, enum_Page_Index_Out_Range, enum_Read_Failed, enum_Success_Test_Code, enum_Verify_Read_Error, Get_Bad_Block_Status(), TSPI_Memory_Base::Get_Block_Index_By_Page(), TSPI_Memory_Base::Get_Page_Size(), TSPI_Memory_Base::Get_Pages_Per_Block_Count(), TSPI_Memory_Base::Get_Pages_Per_Chip_Count(), TSPI_Memory_Base::Is_Page_Index_In_Range(), Read_Buffer_By_Page_Index(), U32_Composite::u32_Raw_Value, U32_Composite::u8_Byte_0, U32_Composite::u8_Byte_1, U32_Composite::u8_Byte_2, U32_Composite::u8_Byte_3, and u8_Test_Buffer.
Referenced by QA_Flash_Driver_Main_Test().
TReturn_Test_Code TS25FL512::QA_Single_Block_Erase_Test | ( | ) |
Single block erase test method.
References enum_Block_Empty_Error, enum_Block_Erase_Error, enum_Block_Index_Out_Range, enum_Get_Block_Count_Error, enum_Get_Block_Status_Error, enum_Success_Test_Code, Erase_Block_By_Index(), Get_Bad_Block_Status(), TSPI_Memory_Base::Get_Block_Count(), Is_Block_Empty(), and TSPI_Memory_Base::Is_Block_Index_In_Range().
Referenced by QA_Flash_Driver_Main_Test().
TReturn_Test_Code TS25FL512::QA_Write_Page_Test | ( | ) |
Write page test method.
References enum_Get_Block_Index_Error, enum_Get_Block_Status_Error, enum_Get_Page_Per_Block_Count_Error, enum_Get_Page_Per_Chip_Count_Error, enum_Get_Page_Size_Error, enum_Page_Index_Out_Range, enum_Success_Test_Code, enum_Write_Failed, false, Get_Bad_Block_Status(), TSPI_Memory_Base::Get_Block_Index_By_Page(), TSPI_Memory_Base::Get_Page_Size(), TSPI_Memory_Base::Get_Pages_Per_Block_Count(), TSPI_Memory_Base::Get_Pages_Per_Chip_Count(), TSPI_Memory_Base::Is_Page_Index_In_Range(), true, U32_Composite::u32_Raw_Value, U32_Composite::u8_Byte_0, U32_Composite::u8_Byte_1, U32_Composite::u8_Byte_2, U32_Composite::u8_Byte_3, u8_Test_Buffer, and Write_Buffer_By_Page_Index().
Referenced by QA_Flash_Driver_Main_Test().
Read data from memory into buffer.
[in] | u32_Linear_Address | - Linear address of the data in memory |
[in] | u32_Size | - Size of the data to read |
[out] | *u8_Data_Buffer | - Pointer to the data buffer |
false | - Read operation failed |
true | - Read operation successed |
Implements TSPI_Memory_Base.
References NULL, TSPI_Memory_Base::object_SPI_Master, Read_Page_From_Cache(), and Read_Page_From_Cells_To_Cache().
BOOL TS25FL512::Read_Buffer_By_Page_Index | ( | U32 | u32_Page_Index, |
U16 | u16_Offset, | ||
U32 | u32_Size, | ||
U8 * | u8_Data_Buffer | ||
) |
Read data from memory into buffer.
[in] | u32_Page_Index | - Page index |
[in] | u16_Offset | - Offset inside page |
[in] | u32_Size | - Size of the data to read |
[out] | *u8_Data_Buffer | - Pointer to the data buffer |
false | - Read operation failed |
true | - Read operation successed |
References NULL, TSPI_Memory_Base::object_SPI_Master, Read_Page_From_Cache(), and Read_Page_From_Cells_To_Cache_By_Index().
Referenced by TEvent_Manager::Get_Min_Max_Flash_Index(), TEvent_Manager::Half_Devision_Method_Searching(), and QA_Read_Page_Test().
Read data from memory into buffer.
[in] | u32_Linear_Address | - Linear address of the data in memory |
[in] | u32_Size | - Size of the data to read |
[out] | *u8_Data_Buffer | - Pointer to the data buffer |
false | - Read operation failed |
true | - Read operation successed |
References TSPI_Memory_Base::Extract_Page_Relative_Address(), NULL, TSPI_Memory_Base::object_SPI_Master, Read_Page_From_Cache(), and Read_Page_From_Cells_To_Cache().
Referenced by Get_Bad_Block_Status().
|
privatevirtual |
Read memory device identification information method.
false | - Read operation successed |
true | - Read operation failed |
Implements TSPI_Memory_Base.
References TSPI_Memory_Base::bool_Device_ID_Available, TSPI_Memory_Base::bool_Manufacturer_ID_Available, chip_type_GD5F4GQ4UAYIG, chip_type_IS37SML01G1, chip_type_None, chip_type_S25FL512S, chip_type_Unknown, commandRDID, Compose_U16(), TSPI_Master_Base::CS_Activate(), TSPI_Master_Base::CS_Deactivate(), enum_Flash_Chip_Type, false, NULL, TSPI_Memory_Base::object_SPI_Master, TSPI_Master_Base::Receive_Byte(), TSPI_Master_Base::Send_Byte(), TSPI_Memory_Base::struct_Memory_Chip_Descriptor, struct_Memory_Chip_Descriptor_GIGADEVICE_GD5F4GQ4UAYIG, struct_Memory_Chip_Descriptor_ISSI_IS37SML01G1, struct_Memory_Chip_Descriptor_SPANSION_S25FL512S, TSPI_Memory_Base::tril_Available, true, u32_Identifier_Dummy_Byte_Counter, u8_Device_ID, u8_JEDEC_ID, and u8_Manufacturer_ID.
Referenced by Start().
|
private |
Read multiple byte from chip cache method.
[in] | u16_Offset | - Address offset in cache |
[in] | u32_Length | - Amount of the byte to read |
[in] | u8_Data_Buffer | - Pointer to the data buffer |
false | - Read operation successed |
true | - Read operation failed |
References commandRFC, TSPI_Master_Base::CS_Activate(), TSPI_Master_Base::CS_Deactivate(), Extract_U8_From_U16(), TSPI_Memory_Base::object_SPI_Master, TSPI_Master_Base::Receive_Byte(), and TSPI_Master_Base::Send_Byte().
Referenced by Read_Buffer(), Read_Buffer_By_Page_Index(), and Read_Extended_Buffer().
|
private |
Read multiple byte from chip cache method.
[in] | u32_Address | - Start address in cache |
[in] | u32_Length | - Amount of the byte to read |
[in] | u8_Data_Buffer | - Pointer to the data buffer |
false | - Read operation successed |
true | - Read operation failed |
References commandRFC, TSPI_Master_Base::CS_Activate(), TSPI_Master_Base::CS_Deactivate(), TSPI_Memory_Base::Extract_Page_Relative_Address(), Extract_U8_From_U16(), TSPI_Memory_Base::object_SPI_Master, TSPI_Master_Base::Receive_Byte(), and TSPI_Master_Base::Send_Byte().
Read page from chip cells into the cache method.
[in] | u32_Linear_Address | - Linear address of the page to read |
false | - Read operation successed |
true | - Read operation failed |
References Read_Page_From_Cells_To_Cache_By_Index().
Referenced by Read_Buffer(), and Read_Extended_Buffer().
Read page from chip cells into the cache method. Page referenced by absolute page index within memory chip.
[in] | u32_Page_Index | - Absolute index of the page to read |
false | - Read operation successed |
true | - Read operation failed |
References commandREAD, TSPI_Master_Base::CS_Activate(), TSPI_Master_Base::CS_Deactivate(), Extract_U8_From_U32(), Increment_Page_Read_Error_Counter(), Increment_Page_Read_Request_Counter(), Is_Read_Failure(), TSPI_Memory_Base::object_SPI_Master, TSPI_Master_Base::Send_Byte(), and Wait_For_Operation_Done().
Referenced by Is_Block_Empty(), Read_Buffer_By_Page_Index(), Read_Page_From_Cells_To_Cache(), and Write_Buffer_By_Page_Index().
Read memory device status register method.
[out] | *u8_Status_Register | - Pointer to status register value |
false | - Read operation failed |
true | - Read operation successed |
Reimplemented from TSPI_Memory_Base.
References address_SR, commandGF, TSPI_Master_Base::CS_Activate(), TSPI_Master_Base::CS_Deactivate(), TSPI_Memory_Base::object_SPI_Master, TSPI_Master_Base::Receive_Byte(), and TSPI_Master_Base::Send_Byte().
Referenced by Get_Bad_Block_Status(), Is_Erase_Failure(), Is_Operation_In_Progress(), Is_Program_Failure(), Is_Read_Failure(), Write_Page_To_Cache(), and Write_Page_To_Cache_By_Leniar_Address().
|
private |
Software reset memory chip method.
References commandRES, TSPI_Master_Base::CS_Activate(), TSPI_Master_Base::CS_Deactivate(), THigh_Precision_Timer_Base::Delay(), object_Delay_Timer, TSPI_Memory_Base::object_SPI_Master, and TSPI_Master_Base::Send_Byte().
Referenced by Start().
|
virtual |
Method sends actual driver information over specified communication link protocol.
[in] | *object_Protocol | - Pointer to the connunication link protocol |
Reimplemented from TSPI_Memory_Base.
References chip_type_GD5F4GQ4UAYIG, chip_type_IS37SML01G1, chip_type_None, chip_type_S25FL512S, chip_type_Unknown, enum_Flash_Chip_Type, TProtocol_Base::Transmit_String(), TProtocol_Base::Transmit_U16_Value_As_Decimal(), TProtocol_Base::Transmit_U32_Value_As_Decimal(), TProtocol_Base::Transmit_U8_Value_As_Decimal(), TProtocol_Base::Transmit_U8_Value_As_Hex(), u16_Bad_Block_Count, u16_Bad_Block_Counter, u16_Execute_Bad_Block_Count_Index, u32_Block_Erase_Error_Counter, u32_Block_Erase_Request_Counter, u32_Identifier_Dummy_Byte_Counter, u32_Page_Read_Error_Counter, u32_Page_Read_Request_Counter, u32_Page_Write_Error_Counter, u32_Page_Write_Request_Counter, u8_BP1, u8_BP2, u8_BRWD, u8_Device_ID, u8_JEDEC_ID, and u8_Manufacturer_ID.
|
private |
Set flash memory feature method.
[in] | enum_Feature_Adress | - Chip feature address |
[in] | u8_Data | - Chip feature value |
false | - Set operation successed |
true | - Set operation failed |
References commandSF, TSPI_Master_Base::CS_Activate(), TSPI_Master_Base::CS_Deactivate(), TSPI_Memory_Base::object_SPI_Master, and TSPI_Master_Base::Send_Byte().
Referenced by Start().
|
virtual |
Driver start operation method.
Reimplemented from TSPI_Memory_Base.
References address_BL, Get_Write_Protection_Bits(), Read_Identification(), Reset(), Set_Feature(), and TSPI_Memory_Base::Start().
Wait specified time for hardware controller operation done method.
[in] | f32_Timeout | - Timeout in seconds |
false | - Hardware controller perform operation in specified time |
true | - Hardware controller not perform operation in specified time |
References address_SR, TS25FL512::TStatus_Register::bit_Operation_In_Progress, commandGF, TSPI_Master_Base::CS_Activate(), TSPI_Master_Base::CS_Deactivate(), TTIMER2_STM32F429::Get_Actual_Time_U64(), THigh_Precision_Timer_Base::Is_Timeout(), object_Delay_Timer, TSPI_Memory_Base::object_SPI_Master, TSPI_Master_Base::Receive_Byte(), TSPI_Master_Base::Send_Byte(), and TS25FL512::TStatus_Register::u8_Raw_Data.
Referenced by Erase_Block_By_Index(), Read_Page_From_Cells_To_Cache_By_Index(), Write_Page_From_Cache_To_Cells(), and Write_Page_From_Cache_To_Cells_By_Page_Index().
Write data from buffer into memory.
[in] | u32_Linear_Address | - Linear address of the data in memory |
[in] | u32_Size | - Size of the data to write |
[out] | *u8_Data_Buffer | - Pointer to the data buffer |
false | - Write operation failed |
true | - Write operation successed |
Implements TSPI_Memory_Base.
References TSPI_Memory_Base::Get_Chip_Size(), NULL, TSPI_Memory_Base::object_SPI_Master, Write_Page_From_Cache_To_Cells(), and Write_Page_To_Cache().
BOOL TS25FL512::Write_Buffer_By_Page_Index | ( | U32 | u32_Page_Index, |
U16 | u16_Offset, | ||
U32 | u32_Size, | ||
U8 * | u8_Data_Buffer | ||
) |
Write data from buffer into memory.
[in] | u32_Page_Index | - Page index |
[in] | u16_Offset | - Offset into page |
[in] | u32_Size | - Size of the data to write |
[out] | *u8_Data_Buffer | - Pointer to the data buffer |
false | - Write operation failed |
true | - Write operation successed |
References TSPI_Memory_Base::Get_Page_Size(), TSPI_Memory_Base::Get_Pages_Per_Chip_Count(), NULL, TSPI_Memory_Base::object_SPI_Master, Read_Page_From_Cells_To_Cache_By_Index(), true, Write_Page_From_Cache_To_Cells_By_Page_Index(), and Write_Page_To_Cache().
Referenced by TEvent_Manager::Execute(), and QA_Write_Page_Test().
|
privatevirtual |
Disable write operation into memory.
false | - Operation successed |
true | - Operation failed |
Reimplemented from TSPI_Memory_Base.
References commandWRDI, TSPI_Master_Base::CS_Activate(), TSPI_Master_Base::CS_Deactivate(), TSPI_Memory_Base::object_SPI_Master, and TSPI_Master_Base::Send_Byte().
|
privatevirtual |
Enable write operation into memory.
false | - Operation successed |
true | - Operation failed |
Reimplemented from TSPI_Memory_Base.
References commandWREN, TSPI_Master_Base::CS_Activate(), TSPI_Master_Base::CS_Deactivate(), TSPI_Memory_Base::object_SPI_Master, and TSPI_Master_Base::Send_Byte().
Referenced by Erase_Block_By_Index(), Write_Page_To_Cache(), and Write_Page_To_Cache_By_Leniar_Address().
Write page from cache into chip cells method.
[in] | u32_Linear_Address | - Linear address of the page to write |
false | - Write operation successed |
true | - Write operation failed |
References commandPE, TSPI_Master_Base::CS_Activate(), TSPI_Master_Base::CS_Deactivate(), Extract_U8_From_U32(), Increment_Page_Write_Error_Counter(), Increment_Page_Write_Request_Counter(), Is_Program_Failure(), TSPI_Memory_Base::object_SPI_Master, TSPI_Master_Base::Send_Byte(), and Wait_For_Operation_Done().
Referenced by Write_Buffer().
Write page from cache into chip cells method.
[in] | u32_Page_Index | - Absolute indes og the page to write |
false | - Write operation successed |
true | - Write operation failed |
References commandPE, TSPI_Master_Base::CS_Activate(), TSPI_Master_Base::CS_Deactivate(), Extract_U8_From_U32(), Increment_Page_Write_Error_Counter(), Increment_Page_Write_Request_Counter(), Is_Program_Failure(), TSPI_Memory_Base::object_SPI_Master, TSPI_Master_Base::Send_Byte(), and Wait_For_Operation_Done().
Referenced by Write_Buffer_By_Page_Index().
Write multiple byte into chip cache method.
[in] | u16_Offset | - Address offset in cache |
[in] | u32_Length | - Amount of the byte to write |
[in] | u8_Data_Buffer | - Pointer to the data buffer |
false | - Write operation successed |
true | - Write operation failed |
References commandPP, TSPI_Master_Base::CS_Activate(), TSPI_Master_Base::CS_Deactivate(), Extract_U8_From_U16(), TSPI_Memory_Base::object_SPI_Master, Read_Status_Register(), TSPI_Master_Base::Send_Byte(), and Write_Enable().
Referenced by Write_Buffer(), and Write_Buffer_By_Page_Index().
|
private |
Write multiple byte into chip cache method.
[in] | u32_Address | - Start address in cache |
[in] | u32_Length | - Amount of the byte to write |
[in] | u8_Data_Buffer | - Pointer to the data buffer |
false | - Write operation successed |
true | - Write operation failed |
References commandPP, TSPI_Master_Base::CS_Activate(), TSPI_Master_Base::CS_Deactivate(), TSPI_Memory_Base::Extract_Page_Relative_Address(), Extract_U8_From_U16(), TSPI_Memory_Base::object_SPI_Master, Read_Status_Register(), TSPI_Master_Base::Send_Byte(), and Write_Enable().
TChip_Type TS25FL512::enum_Flash_Chip_Type = chip_type_None |
Flash chip type storage.
Referenced by Read_Identification(), and Send_Information().
Bad block count.
Referenced by Execute(), and Send_Information().
Bad block search counter.
Referenced by Execute(), and Send_Information().
Actual block index of the search bad block count process.
Referenced by Execute(), and Send_Information().
Block read error counter.
Referenced by Increment_Block_Erase_Error_Counter(), and Send_Information().
Block erase request counter.
Referenced by Increment_Block_Erase_Request_Counter(), and Send_Information().
Read identifier dummy byte counter.
Referenced by Read_Identification(), and Send_Information().
Page read error counter.
Referenced by Increment_Page_Read_Error_Counter(), and Send_Information().
Page read request counter.
Referenced by Increment_Page_Read_Request_Counter(), and Send_Information().
Page write error counter.
Referenced by Increment_Page_Write_Error_Counter(), and Send_Information().
Page write request counter.
Referenced by Increment_Page_Write_Request_Counter(), and Send_Information().
BP1 bit in BL register.
Referenced by Get_Write_Protection_Bits(), and Send_Information().
BP2 bit in BL register.
Referenced by Get_Write_Protection_Bits(), and Send_Information().
BRWD bit in BL register.
Referenced by Get_Write_Protection_Bits(), and Send_Information().
Serial number storage.
Referenced by Read_Identification(), and Send_Information().
JEDEC code storage.
Referenced by Read_Identification(), and Send_Information().
Manufacturer number storage.
Referenced by Read_Identification(), and Send_Information().
U8 TS25FL512::u8_Test_Buffer[2048] |
Actual block index of the search bad block count process.
Referenced by QA_Read_Page_Test(), and QA_Write_Page_Test().