![]() |
STM8L libraries for CR95HF 1.0
|
This file contains all the functions in order to send commands to a contactless tag of the M24LRXX family performing iso15693 standards. Note that command dealing with multiple blocks (write read get status) utilize internal eeprom of the MCU whereas other commands use flash program memory. More...
#include "m24lrxx_command.h"
Functions | |
u8 | M24LRXX_Inventory (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 Tag_AFI, const u8 MaskLength, const u8 *Mask, u8 *Inventory_16_slots_Nb_UID_Retrieved) |
This function sends, through the CR95HF, to a contactless tag posssibly of the M24LRXX family, an inventory command and fills the Tag structure if some contactless tag answers. | |
u8 | M24LRXX_Stay_Quiet (const u8 Request_flags, const u8 *Tag_UID) |
This function sends, through the CR95HF, a stay quiet command to a unique contactless tag possibly belonging to the M24LRXX family designated by its UID. | |
u8 | M24LRXX_Read_Single_Block (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, const u16 Block_number) |
This function sends, through the CR95HF, a read single block command to the contactless tag possibly of the M24LRX family in the field or to an unique contactless tag designated by its UID. Note that for more than 8kbits device, the protocol extension should be set within the request flags as the block number is on two bytes. | |
u8 | M24LRXX_Write_Single_Block (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, const u16 Block_number, const u8 *Data) |
This function sends, through the CR95HF, a write single block command to the contactless tag opssibly from the M24LRXX family in the field or to an unique contactless tag designated by its UID.Note that for more than 8kbits device, the protocol extension should be set within the request flags as the block number is on two bytes. | |
u8 | M24LRXX_Read_Multiple_Block (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, const u16 First_Block_number, const u8 Number_of_Blocks) |
This function sends, through the CR95HF, a read multiple block command to the contactless tag possibly belonging to the M24LRXX family in the field or to an unique contactless tag designated by its UID. Note that data received are stored into the internal EEPROM of the MCU. | |
u8 | M24LRXX_Select (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID) |
This function sends, through the CR95HF, a select command to the unique contactless tag designated by its UID possibly belonging to the M24LRXX family. | |
u8 | M24LRXX_Reset_to_Ready (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID) |
This function sends, through the CR95HF, a reset to ready state command to a contactless tag possibly belong to the M24LRXX family. This command could be used in two different case: | |
u8 | M24LRXX_Write_AFI (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, const u8 Tag_AFI) |
This function sends, through the CR95HF, a write AFI command to the contacless tag in the field possibly belonging to the M24LRXX family or to an unique contactless tag designated by its UID. | |
u8 | M24LRXX_Lock_AFI (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID) |
This function sends, through the CR95HF, a Lock AFI command to the contacless tag in the field possibly from the M24LRXX family or to an unique contactless tag designated by its UID. | |
u8 | M24LRXX_Write_DSFID (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, const u8 Tag_DSFID) |
This function sends, through the CR95HF, a write DSFID command to the contacless tag in the field possibly belonging to the M24LRXX family or to an unique contactless tag designated by its UID. | |
u8 | M24LRXX_Lock_DSFID (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID) |
This function sends, through the CR95HF, a Lock DSFID command to the contacless tag in the field possibly from the M24LRXX family or to an unique contactless tag designated by its UID. | |
u8 | M24LRXX_Get_System_Info (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID) |
This function sends, through the CR95HF, an get System Information command to the contacless tag ,possibly from the M24LRXX family, in the field or to an unique contactless tag designated by its UID. Note that here the protocol extension flag is set. | |
u8 | M24LRXX_Get_Multiple_Blocks_Security_Status (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, const u16 First_Block_number, const u8 Number_of_Blocks) |
This function sends, through the CR95HF, a get multiple blocks security status command to the contactless tag in the field,possibly from the M24LRXX family, or to an unique contactless tag designated by its UID. note that data are stored into the eeprom. | |
u8 | M24LRXX_Write_Sector_Password (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, const u8 Password_Number, const u8 *Password) |
This function sends, through the CR95HF, a write sector password command to a M24LRXX contactless tag in the field or designated by its UID . The password written will be usefull to protect data contained within the contactless tag. Note that on delivery state the passwords are 00.00.00.00 h and a present password must be issued whith this value before issuing the command and then when each time password is changed. | |
u8 | M24LRXX_Lock_Sector_Password (ISO15693_Tag *MyTag, u8 Request_flags, const u8 *Tag_UID, u16 Sector_Number, u8 Sector_Security_Status) |
This function sends, through the CR95HF, a lock sector password command to a M24LRXX contactless tag in the field or designated by its UID. Note that for devices with more than 8kbits memory this command locks a entire sector (i.e : 32 blocks). This command can also be used to lock only one block (less than 8kbits devices. | |
u8 | M24LRXX_Present_Sector_Password (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, const u8 Password_Number, const u8 *Password) |
This function sends, through the CR95HF, a present sector password command to a M24LRXX contactless tag in the field or designated by its UID . The password provided is compared with the one within the conctactless tag. If they macth the access to all memory linked to the password is changed as set with the lock sector password command previously. | |
u8 | M24LRXX_Fast_Read_Single_Block (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, const u16 Block_number) |
This function sends, through the CR95HF, a read single block command to the M24LRXX contactless tag in the field or to an unique contactless tag designated by its UID. The particularity of this command is the datatrate used by the contactless tag to answer which is 53kbits/s. | |
u8 | M24LRXX_Fast_Inventory_Initiated (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 Tag_AFI, const u8 MaskLength, const u8 *Mask, u8 *Inventory_16_slots_Nb_UID_Retrieved) |
This function sends, through the CR95HF, a fast inventory command to the M24LRXX contactless tags in the field. The datarate of the response is multiplied by 2 (here 52kbits/s). Note that a fast initiate command should be issued before calling this function. | |
u8 | M24LRXX_Fast_Initiate (ISO15693_Tag *MyTag, const u8 Request_flags) |
This function sends, through the CR95HF, a fast initiate command to a M24LRXX contactless tag in the field or designated by its UID . On receiving the fast initiate command the M24LRXX contactless tag set the internal initiate flag ( to send a inventory initited command) and returns its UID and its DSFID, with a datarate multiplied by two (here 52kbits/s). Note that the command should not be in addressed or selected mode, the flag is reset afther a power off. | |
u8 | M24LRXX_Fast_Read_Multiple_Block (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, const u8 First_Block_number, const u8 Number_of_Blocks) |
This function sends, through the CR95HF, a read multiple block command a fast read multiple blocks command to a M24LRXX contactless tag in the field or designated by its UID . Note that data received are stored into the internal EEPROM of the MCU. | |
u8 | M24LRXX_Inventory_Initiated (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 Tag_AFI, const u8 MaskLength, const u8 *Mask, u8 *Inventory_16_slots_Nb_UID_Retrieved) |
This function sends, through the CR95HF, an inventory initiated command to the M24LRXX contactless tags in the field. On receiving the initiate command the M24LRXX contactless tag set the internal initiate flag ( to send a inventory initited command) and returns its UID and its DSFID. Note that a initiate command should be issued before calling this function. | |
u8 | M24LRXX_Initiate (ISO15693_Tag *MyTag, const u8 Request_flags) |
This function sends, through the CR95HF, an initiate command to a M24LRXX contactless tag in the field or designated by its UID . On receiving the initiate command the M24LRXX contactless tag set the internal initiate flag ( to send a inventory initited command) and returns its UID and its DSFID. Note that the command should not be in addressed or selected mode, the flag is reset afther a power off. | |
u8 | M24LRXX_ReadCfg (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID) |
This function sends, through the CR95HF, an read Config command to a M24LRXX-E contactless tag in the field or designated by its UID . On receiving the read Config command the M24LRXX-E contactless tag reads the configuration byte and sends back its value. | |
u8 | M24LRXX_Write_EH_Cfg (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, u8 Configuration_Byte) |
This function sends, through the CR95HF, an WriteEHCfg command to a M24LRXX-E contactless tag in the field or designated by its UID . On receiving the write Energy Harvesting Configuration command the M24LRXX-E contactless tag writes the data provided to the configuration byte and reports the status of the command.Note that only bits 0 to 2 are written bit 3 is ignored. | |
u8 | M24LRXX_Write_DO_Cfg (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, u8 Configuration_Byte) |
This function sends, through the CR95HF, an WriteDOCfg command to a M24LRXX-E contactless tag in the field or designated by its UID . On receiving the write Data Out Configuration command the M24LRXX-E contactless tag writes the data provided to the configuration byte and reports the status of the command. Note that only the fourth bit (bit 3) is written, bits 0 to 2 are ignored. | |
u8 | M24LRXX_SetRst_EH_en (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, u8 Set_Reset) |
This function sends, through the CR95HF, an setRstEHen command to a M24LRXX-E contactless tag in the field or designated by its UID . On receiving the set reset Energy Harvesting Enable command the M24LRXX-E contactless tag set or reset the EHenable bit, within the volatile control register. | |
u8 | M24LRXX_Check_EH_En (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID) |
This function sends, through the CR95HF, an Check EH En command to a M24LRXX-E contactless tag in the field or designated by its UID . On receiving the Check Energy Harvesting enabled command the M24LRXX-E contactless tag reads the control register and sends back its value. Note that as this command is a RF command the bit 1 (field on ) is expected to be set, the main purpose of this command is detemrine if the Energy Harvesting mode is enabled. | |
u8 | M24LRXX_Is_Request_Flags_ok (const u8 Request_flags, const u8 M24LRXX_cmd_code) |
This function performs several checks to verify that the request flag is not wrong for the M24LRXX family contactless tags. | |
u8 | M24LRXX_Is_Memory_programming_function (const u8 M24LRXX_cmd_code) |
This function returns if the M24LRXX contactless tag performs a memory programming by processing the command (write, lock). Note that this functions includes the M24LRXX custom commands. | |
u8 | M24LRXX_Is_Fast_Datarate_ok (const u8 Request_flags, const CR95HF_Protocol_Config *Protocol_Settings) |
This function returns for fast commands if the datarate selected with the protocol select function is really 52kbits/s and if the requestflags is really in high datarate ( fast command multiplies the data rate per 2 (High datarate : 26kbits/s) | |
u8 | M24LRXX_Is_Fast_Command (const u8 M24LRXX_cmd_code) |
This function returns if the command is a fast command. | |
u8 | M24LRXX_Get_Block_Security_Password_number (u8 Byte_Status) |
This function returns if the block is protected by password and the number of the pasword protecting the block. | |
u8 | M24LRXX_Get_Block_Security_Read_Write_Protection_with_Password (u8 Byte_Status) |
This function returns the read write protection of the block when password is presented. | |
u8 | M24LRXX_Get_Block_Security_Read_Write_Protection_without_Password (u8 Byte_Status) |
This function returns the read write protection of the block whithout password. | |
u8 | M24LRXX_Get_Energy_Harvesting_Range (u8 Configuration_Byte) |
This function returns the range of energy harvesting using the Configuration byte retrieved with a Read Cfg command. | |
u8 | M24LRXX_Get_RF_BUSY_WIP (u8 Configuration_Byte) |
This function returns the RF busy or Write in progress bit using the Configuration byte retrieved with a Read Cfg command. | |
u8 | M24LRXX_Get_EH_mode_Configuration_Byte (u8 Configuration_Byte) |
This function returns the Energy Harvesting Mode bit using the Configuration byte retrieved with a Read Cfg command. | |
u8 | M24LRXX_Get_EH_mode_Control_Register (u8 Control_Register) |
This function returns the Energy Harvesting Mode bit using the Control Register retrieved with a Check EH En command. | |
u8 | M24LRXX_Compute_Security_Status_byte (u8 Password_Number, u8 Read_Write_Protection_Password, u8 Read_Write_Protection_No_Password) |
The purpose of this function is to compute the security byte given the password number and the read write protection with and without password. | |
u8 | M24LRXX_Compute_Configuration_Byte (u8 RF_WIP_BUSY, u8 EH_Enable, u8 EH_Range) |
The purpose of this function is to compute the configuration byte for energy harvesting mode given the parameters Energy Harvesting activation and range. | |
Variables | |
CR95HF_Protocol_Config | Protocol_Settings |
CR95HF_CommandSending | Cmd |
CR95HF_ResponseReceiving | Response |
This file contains all the functions in order to send commands to a contactless tag of the M24LRXX family performing iso15693 standards. Note that command dealing with multiple blocks (write read get status) utilize internal eeprom of the MCU whereas other commands use flash program memory.
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
Common Stucture used to transmit data within commands
Protocol and parameters related used
Common Stucture used to receive data within commands