Renesas PTX1xxR IoT-Reader API (non-OS) Version 7.3.1
Renesas Software Stack for IoT-Reader Applications (non-OS)
Data Structures | Typedefs | Enumerations | Functions
ptxNSC.h File Reference
#include "ptxStatus.h"
#include "ptxNSC_Event.h"
#include "ptxNSC_RfConfigVal.h"
#include "ptxNSC_Hal.h"
#include <stddef.h>
#include <stdint.h>
Include dependency graph for ptxNSC.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ptxNSC_RfConfigTlv
 Parameters for NSC_RF_CONFIG_CMD. More...
 
struct  ptxNSC_InitPars
 Parameters for NSC_INIT_CMD. More...
 
struct  ptxNSC_RfDiscPars
 Parameters for NSC_DISCOVER_CMD. More...
 
struct  ptxNSC_RfPar_RfTech
 NSC Rf Parameter Rf Tech. More...
 
struct  ptxNSC_RfPar_Fwt
 NSC Rf Parameter Fwt. More...
 
struct  ptxNSC_RfPar_TxBitRate
 NSC Rf Parameter Tx_Bit_Rate. More...
 
struct  ptxNSC_RfPar_RxBitRate
 NSC Rf Parameter Rx_Bit_Rate. More...
 
struct  ptxNSC_RfPar_TxParity
 NSC Rf Parameter Tx_Parity. More...
 
struct  ptxNSC_RfPar_RxParity
 NSC Rf Parameter Rx_Parity. More...
 
struct  ptxNSC_RfPar_TxCRC
 NSC Rf Parameter Tx_CRC. More...
 
struct  ptxNSC_RfPar_RxCRC
 NSC Rf Parameter Rx_Parity. More...
 
struct  ptxNsc_RfPar_ResLimit
 NSC Rf Parameter Res(ponse)_Limit. More...
 
struct  ptxNsc_RfPar_TxResidualBits
 NSC Rf Parameter Tx_Residual_Bits. More...
 
struct  ptxNsc_RfPar_RfField
 NSC Rf Parameter Rf_Field. More...
 
union  ptxNSC_RfPar_Params
 Union Rf Parameters. More...
 
struct  ptxNSC_RfPar
 Rf Param. More...
 
struct  ptxNSC_RfSetParams_Par
 NSC Rf Set Parameters CMD parameter structure. More...
 
struct  ptxNSC_RfActTech_A_Param
 NSC Rf Tech A Activation Parameters. More...
 
struct  ptxNSC_RfActTech_B_Param
 NSC Rf Tech B Activation Parameters. More...
 
struct  ptxNSC_RfActTech_F_Param
 NSC Rf Tech F Activation Parameters. More...
 
struct  ptxNSC_RfActTech_V_Param
 NSC Rf Tech V Activation Parameters. More...
 
union  ptxNSC_RfActTech_Param
 NSC Rf Tech Activation Parameters. More...
 
union  ptxNSC_RfActProt_ISODEP_Param
 NSC Rf Prot ISO-DEP (Type-A) Activation Parameters. More...
 
union  ptxNSC_RfActProt_Param_t
 NSC Rf Prot Activation Parameters. More...
 
struct  ptxNSC_RfActiv_Param
 NSC Rf Activate structure. More...
 
struct  ptxNSC_RfDeactPars
 NSC RF deactivate parameters. More...
 
struct  ptxNSC_ReadCmd_Par
 NSC Read CMD parameter structure. More...
 
struct  ptxNSC_WriteCmd_Par
 
struct  ptxNSC_Rsp
 NSC RSP Handler. More...
 
struct  ptxNSC_RfConfig_Regs
 NSC Rf Config Registers Structures. More...
 
struct  ptxNSC_RfConfig_Param
 NSC Rf Config Parameters. More...
 
struct  ptxNSC_RFMiscConfig_Param
 NSC Misc. Rf Config Parameters (Shadow-Copy) More...
 
struct  ptxNSC_ConfigPars
 Configuration parameters for the NSC Component. More...
 
struct  ptxNSC_Custom_Extension
 Extension Prototype (RFU): Extension Component Structure. More...
 
struct  ptxNSC
 Main NSC component structure. More...
 

Macros

PTX1K Communication parameters.
#define PTX_NSC_TYPE_FRAME_MASK   (0xC0)
 
#define PTX_NSC_TYPE_FRAME_CMD   (0x00)
 
#define PTX_NSC_TYPE_FRAME_RSP   (0x01)
 
#define PTX_NSC_TYPE_FRAME_NTF   (0x02)
 
#define PTX_NSC_TYPE_FRAME_TRANSP   (0x03)
 
#define PTX_NSC_MAX_MTU_SIZE   (253u)
 
#define PTX_NSC_TRANSFER_TO   (500u)
 
#define PTX_NSC_MAX_RSP_LEN   (256u)
 
NSC Standby command opcode and length definitions.
#define PTX_NSC_STANDBY_CMD_OPCODE   (0x05u)
 
#define PTX_NSC_STANDBY_RSP_OPCODE   (0x45u)
 
#define PTX_NSC_STANDBY_RESP_LEN   (0x02u)
 
#define PTX_NSC_STANDBY_PARAMETERS_LEN   (0x00u)
 
NSC Wakeup command opcode and length definitions.
#define PTX_NSC_WAKEUP_CMD_OPCODE   (0x06u)
 
#define PTX_NSC_WAKEUP_RSP_OPCODE   (0x46u)
 
#define PTX_NSC_WAKEUP_RESP_LEN   (0x02u)
 
#define PTX_NSC_WAKEUP_PARAMETERS_LEN   (0x00u)
 
NSC DATA.
#define PTX_NSC_DATA_MSG_MAX_PAYLOAD_LEN   PTX_NSC_MAX_MTU_SIZE
 
#define PTX_NSC_DATA_MSG_OPCODE_INDEX   (0x00u)
 
#define PTX_NSC_DATA_MSG_OPCODE   (0xC2u)
 
#define PTX_NSC_DATA_MSG_OPCODE_CHAINING   (0xE2u)
 
#define PTX_NSC_DATA_MSG_OPCODE_LENGTH   (0x01u)
 
#define PTX_NSC_DATA_MSG_CON_MSG_LEN_INDEX   (0x01u)
 
#define PTX_NSC_DATA_MSG_CON_MSG_LENGTH   (0x01u)
 
#define PTX_NSC_DATA_MSG_CON_MSG_LENGTH_VALUE_ACK   (0x00u)
 
#define PTX_NSC_DATA_MSG_CON_MSG_INDEX   (0x02u)
 
NSC DATA CONTROL.
#define PTX_NSC_RFD_CTRL_OPCODE   (0xD2u)
 
#define PTX_NSC_RFD_CTRL_ACK   (0x00u)
 
#define PTX_NSC_RFD_CTRL_NACK   (0x01u)
 
#define PTX_NSC_RFD_CTRL_EOF   (0x02u)
 
#define PTX_NSC_RFD_CTRL_ATTENTION   (0x03u)
 
#define PTX_NSC_RFD_CTRL_NR   (0x04u)
 
Ensure that the DFY is reset after FW download.
#define PTX_NSC_FWDOWN_FORCED   (1u)
 
#define PTX_NSC_FWDOWN_NOT_FORCED   (0u)
 
NSC command opcode and length definitions.
#define PTX_NSC_INIT_CMD_OPCODE   (0x02u)
 
#define PTX_NSC_INIT_RSP_OPCODE   (0x42u)
 
#define PTX_NSC_INIT_RESP_LEN   (0x02u)
 
NSC Init command parameters values
#define PTX_NSC_INIT_CON_HOST_LENGTH   (4U)
 
#define PTX_NSC_INIT_CON_HOST_CE_LENGTH   (4U)
 
#define PTX_NSC_INIT_CON_UART_CONFIG   (2U)
 
#define PTX_NSC_INIT_CON_PRNG_SEED   (4U)
 
#define PTX_NSC_INIT_CON_N_ALM_MAX   (4U)
 
#define PTX_NSC_INIT_CON_N_ALM_MIN   (4U)
 
NSC RF Config command parameters values
#define PTX_NSC_RFCONF_CMD_OPCODE   (0x11u)
 
#define PTX_NSC_RFCONF_RSP_OPCODE   (0x51u)
 
#define PTX_NSC_RFCONF_RESP_LEN   (0x02u)
 
#define PTX_NSC_RFCONF_TX_POWER_MODE   (0x02u)
 
#define PTX_NSC_RFCONF_WAVEBANK_0   (0x00u)
 
#define PTX_NSC_RFCONF_WAVEBANK_1   (0x01u)
 
#define PTX_NSC_RFCONF_WAVEBANK_2   (0x02u)
 
#define PTX_NSC_RFCONF_WAVEBANK_3   (0x03u)
 
#define PTX_NSC_RFCONF_WAVEBANK_4   (0x04u)
 
#define PTX_NSC_RFCONF_WAVEBANK_5   (0x05u)
 
#define PTX_NSC_RFCONF_WAVEBANK_6   (0x06u)
 
#define PTX_NSC_RFCONF_WAVEBANK_7   (0x07u)
 
#define PTX_NSC_RFCONF_WAVEBANK_8   (0x08u)
 
#define PTX_NSC_RFCONF_WAVEBANK_9   (0x09u)
 
#define PTX_NSC_RFCONF_WAVEBANK_10   (0x0Au)
 
#define PTX_NSC_RFCONF_WAVEBANK_11   (0x0Bu)
 
#define PTX_NSC_RFCONF_WAVEBANK_12   (0x0Cu)
 
#define PTX_NSC_RFCONF_WAVEBANK_13   (0x0Du)
 
#define PTX_NSC_RFCONF_WAVEBANK_14   (0x0Eu)
 
#define PTX_NSC_RFCONF_WAVEBANK_15   (0x0Fu)
 
#define PTX_NSC_RFCONF_WAVEBANK_16   (0x10u)
 
#define PTX_NSC_RFCONF_WAVEBANK_17   (0x11u)
 
#define PTX_NSC_RFCONF_WAVEBANK_18   (0x12u)
 
#define PTX_NSC_RFCONF_WAVEBANK_19   (0x13u)
 
#define PTX_NSC_RFCONF_MISC   (0x04u)
 
#define PTX_NSC_RFCONF_POLL_A_106   (0x11u)
 
#define PTX_NSC_RFCONF_POLL_A_212   (0x12u)
 
#define PTX_NSC_RFCONF_POLL_A_424   (0x13u)
 
#define PTX_NSC_RFCONF_POLL_A_848   (0x14u)
 
#define PTX_NSC_RFCONF_POLL_B_106   (0x15u)
 
#define PTX_NSC_RFCONF_POLL_B_212   (0x16u)
 
#define PTX_NSC_RFCONF_POLL_B_424   (0x17u)
 
#define PTX_NSC_RFCONF_POLL_B_848   (0x18u)
 
#define PTX_NSC_RFCONF_POLL_F_212   (0x19u)
 
#define PTX_NSC_RFCONF_POLL_F_424   (0x1Au)
 
#define PTX_NSC_RFCONF_POLL_V   (0x1Eu)
 
#define PTX_NSC_RFCONF_LISTEN   (0x20u)
 
#define PTX_NSC_RFCONF_LAST_PARAM   (0x00u)
 
NSC RF Discovery command parameters values
#define PTX_NSC_DISC_CMD_OPCODE   (0x12u)
 
#define PTX_NSC_DISC_RESP_LEN   (0x02u)
 
#define PTX_NSC_DISC_OPCODE   (0x52u)
 
#define PTX_NSC_DISC_CON_POLLB_CMD_LEN   (3u)
 
#define PTX_NSC_DISC_CON_POLLF_CMD_LEN   (6u)
 
#define PTX_NSC_DISC_CON_POLLV_CMD_LEN   (11u)
 
#define PTX_NSC_DISC_CON_POLLB_ATTRIB_INF_LEN   (15u)
 
#define PTX_NSC_DISC_CON_POLL_NFCDEP_ATR_REQ_G_LEN   (20u)
 
#define PTX_NSC_DISC_CON_LIS_SENSRESP_LEN   (2u)
 
#define PTX_NSC_DISC_CON_LISA_NFCID1_LEN   (15u)
 
#define PTX_NSC_DISC_CON_LISB_SENSBRESP_LEN   (13u)
 
#define PTX_NSC_DISC_CON_LISF_SENSFRESP_LEN   (19u)
 
#define PTX_NSC_DISC_CON_LISV_INVRESP_LEN   (10u)
 
#define PTX_NSC_DISC_CON_LIS_ISODEP_ATS_LEN   (21u)
 
#define PTX_NSC_DISC_CON_LIS_ISODEP_ATTRIB_RES_LEN   (16u)
 
#define PTX_NSC_DISC_CON_LIS_NFCDEP_ATR_RES_G_LEN   (20u)
 
#define PTX_NSC_DISC_CON_IDLE_TIME_LEN   (3u)
 
#define PTX_NSC_TYPES_RFU_1_LEN   (23U)
 
#define PTX_NSC_SET_PARAMS_DISC_CMD_OPCODE   (0x16u)
 
#define PTX_NSC_SET_PARAMS_DISC_RSP_OPCODE   (0x56u)
 
#define PTX_NSC_SET_PARAMS_DISC_RSP_LEN   (0x02u)
 
#define PTX_NSC_SET_PARAM_CMD_EOC   (0x00u)
 
NSC RF Deactivate command parameters values
#define PTX_NSC_DEACT_CMD_OPCODE   (0x14u)
 
#define PTX_NSC_DEACT_RESP_LEN   (0x03u)
 
#define PTX_NSC_DEACT_RSP_OPCODE   (0x54u)
 
NSC RF Activate command parameters values
#define PTX_NSC_RF_ACTIVATE_CMD_OPCODE_INDEX   (0x00u)
 
#define PTX_NSC_RF_ACTIVATE_CMD_OPCODE   (0x13u)
 
#define PTX_NSC_RF_ACTIVATE_CMD_OPCODE_LENGTH   (0x01u)
 
#define PTX_NSC_RF_ACTIVATE_CMD_PARAMS_MAXLENGTH   (0x18u)
 
#define PTX_NSC_RF_ACTIVATE_RSP_LENGTH   (0x02u)
 
#define PTX_NSC_RF_ACTIVATE_RSP_OPCODE   (0x53u)
 
NSC RF Set Routing Table command parameters values
#define PTX_NSC_RF_SET_ROUTING_TABLE_CMD_OPCODE   (0x15u)
 
#define PTX_NSC_RF_SET_ROUTING_TABLE_CMD_LENGTH   (0x0Cu)
 
#define PTX_NSC_RF_SET_ROUTING_TABLE_RSP_LENGTH   (0x02u)
 
#define PTX_NSC_RF_SET_ROUTING_TABLE_RSP_OPCODE   (0x55u)
 
Definitions for NSC RST RESPONSE.
#define PTX_NSC_RESET_RSP_LENGTH   (0x02u)
 
#define PTX_NSC_RESET_RSP_OPCODE   (0x41u)
 
Definitions for OpCodes NTFs.
#define PTX_NSC_OPCODE_RFFIELDNTF   (0x91u)
 
#define PTX_NSC_OPCODE_RFDISCNTF   (0x92u)
 
#define PTX_NSC_OPCODE_RFACTNTF   (0x93u)
 
#define PTX_NSC_OPCODE_RFDEACTNTF   (0x94u)
 
#define PTX_NSC_OPCODE_RFERRORNTF   (0x95u)
 
#define PTX_NSC_OPCODE_LPCDNTF   (0x97u)
 
#define PTX_NSC_RFERRORNTF_LENGTH   (0x02u)
 
Definitions for NSC types of frames.
#define PTX_NSC_FRAMETYPE   (0xC0u)
 
#define PTX_NSC_FRAMETYPE_CMD   (0x00u)
 
#define PTX_NSC_FRAMETYPE_RSP   (0x40u)
 
#define PTX_NSC_FRAMETYPE_NTF   (0x80u)
 
#define PTX_NSC_FRAMETYPE_TRANSPARENT   (0xC0u)
 
#define PTX_NSC_FRAMETYPE_TRANSP_HCP   (0xC1u)
 
Definitions for NSC Activate command parameters.
#define PTX_NSC_TYPES_LISBSENSRES_LEN   (13U)
 
#define PTX_NSC_MAXIMUM_NFCID1_LEN   (10u)
 
#define PTX_NSC_NFCID0_LEN   (4u)
 
#define PTX_NSC_NFCID2_LEN   (8u)
 
#define PTX_NSC_TYPEV_UID_LEN   (8u)
 
Common Type of Rf Tech for the Stack
#define PTX_NSC_TYPES_TECH_A   (0x00u)
 
#define PTX_NSC_TYPES_TECH_B   (0x01u)
 
#define PTX_NSC_TYPES_TECH_F   (0x02u)
 
#define PTX_NSC_TYPES_TECH_V   (0x06u)
 
RF_TECH parameter of NSC_RF_ACTIVATE_NTF.
#define PTX_NSC_TYPES_TECH_POLL_A   (0x00u)
 
#define PTX_NSC_TYPES_TECH_POLL_B   (0x01u)
 
#define PTX_NSC_TYPES_TECH_POLL_F   (0x02u)
 
#define PTX_NSC_TYPES_TECH_POLL_ACT   (0x03u)
 
#define PTX_NSC_TYPES_TECH_POLL_V   (0x06u)
 
#define PTX_NSC_TYPES_TECH_LISTEN_A   (0x80u)
 
ERROR_CODE parameter of NSC_RF_ERROR_NTF.
#define PTX_NSC_RF_ERROR_NTF_CODE_OK   (0x00u)
 
#define PTX_NSC_RF_ERROR_NTF_CODE_ERR_THERMAL   (0x06u)
 
#define PTX_NSC_RF_ERROR_NTF_CODE_ERR_OVERCURRENT   (0x07u)
 
#define PTX_NSC_RF_ERROR_NTF_CODE_ERR_CURRENT_LIMIT   (0x09u)
 
#define PTX_NSC_RF_ERROR_NTF_CODE_ERR_EXT_CURRENT_SENSOR   (0x0Au)
 
#define PTX_NSC_RF_ERROR_NTF_CODE_ERR_EMV_COLL   (0x11u)
 
#define PTX_NSC_RF_ERROR_NTF_CODE_ERR_TIMEOUT   (0x12u)
 
#define PTX_NSC_RF_ERROR_NTF_CODE_ERR_TRANSMISSION   (0x13u)
 
#define PTX_NSC_RF_ERROR_NTF_CODE_ERR_PROTOCOL   (0x14u)
 
Maximum Number of Rf Parameters to set.
#define PTX_NSC_RF_SET_PARAMS_MAX   (11u)
 
Definitions for NSC Read Command.
#define PTX_NSC_TYPES_RD_OP_MAX   (3u)
 
#define PTX_NSC_READ_CMD_HD_LENGTH   (0x03u)
 
#define PTX_NSC_READ_CMD_OPCODE   (0x03u)
 
#define PTX_NSC_READ_RSP_HD_LENGTH   (0x03u)
 
#define PTX_NSC_READ_RSP_OPCODE   (0x43u)
 
Definitions for NSC Write Command.
#define PTX_NSC_TYPES_WR_OP_MAX   (70u)
 
#define PTX_NSC_WRITE_CMD_HD_LENGTH   (0x03u)
 
#define PTX_NSC_WRITE_CMD_OPCODE   (0x04u)
 
#define PTX_NSC_WRITE_RSP_LENGTH   (0x02u)
 
#define PTX_NSC_WRITE_RSP_OPCODE   (0x44u)
 
Generic / Misc. Defines
#define PTX_NSC_MISC_RF_CONFIG_BUFFER_SIZE   (uint8_t)37
 
#define PTX_NSC_MISC_RF_CONFIG_FLAGS_SET   (uint8_t)0x01
 
#define PTX_NSC_MISC_RF_CONFIG_FLAGS_LOADED   (uint8_t)0x02
 
Definitions for NSC RF RUN TEST CMD
#define PTX_NSC_RF_RUN_TEST_CMD_OPCODE   (0x17u)
 
#define PTX_NSC_RF_RUN_TEST_CMD_RSP_OPCODE   (0x57u)
 
#define PTX_NSC_RF_RUN_TEST_CMD_RSP_LENGTH   (0x02u)
 
Definitions for NSC RF STOP TEST CMD
#define PTX_NSC_RF_STOP_TEST_CMD_OPCODE   (0x18u)
 
#define PTX_NSC_RF_STOP_TEST_CMD_RSP_OPCODE   (0x58u)
 
#define PTX_NSC_RF_STOP_TEST_CMD_RSP_LENGTH   (0x02u)
 
Definitions for NSC INIT CMD
#define PTX_NSC_INIT_EXT_PROTECTION_EN_MASK   (0x03u)
 
NSC Extension Definitions
#define PTX_NSC_MAX_EXTENSIONS   (uint8_t)(1u)
 

Typedefs

typedef void(* pptxNSC_WfeCallBack_t) (void *ctx, ptxNSC_Event_t *event)
 Callback function for Waiting For Events (asynchronously).
 
typedef void(* pptxNSC_Process_Ext_NTF_t) (void *ctx, uint8_t *pld, size_t pldLen)
 Processing function for Extension Notifications.
 
typedef void(* pptxNSC_ExtCallBack_t) (void *ctx, void *events, uint8_t *pld, size_t pldLen)
 Callback function used for processing extension NTF (i.e. WLC extensions).
 
typedef enum ptxNSC_Rsp_ErrorCodes ptxNSC_Rsp_ErrorCodes_t
 NSC response Eror Codes.
 
typedef enum ptxNSC_RfConfig_ParamList ptxNSC_RfConfig_ParamList_t
 NSC RF CONFIG Parameter Type List.
 
typedef struct ptxNSC_RfConfigTlv ptxNSC_RfConfigTlv_t
 Parameters for NSC_RF_CONFIG_CMD.
 
typedef struct ptxNSC_InitPars ptxNSC_InitPars_t
 Parameters for NSC_INIT_CMD.
 
typedef struct ptxNSC_RfDiscPars ptxNSC_RfDiscPars_t
 Parameters for NSC_DISCOVER_CMD.
 
typedef enum ptxNSC_PollType ptxNSC_PollType_t
 Enum for Polling-Loop type.
 
typedef enum ptxNSC_InitTechPoll ptxNSC_InitTechPoll_t
 Enum for initial technology in the discovery loop.
 
typedef enum ptxNSC_RfDiscovery_Mode ptxNSC_RfDiscovery_Mode_t
 NSC Rf Discovery Con_Poll_Disc_Mode parameter settings.
 
typedef enum ptxNSC_RfParameter_Id ptxNSC_RfParameter_Id_t
 NSC Rf Parameter Id.
 
typedef struct ptxNSC_RfPar_RfTech ptxNSC_RfPar_RfTech_t
 NSC Rf Parameter Rf Tech.
 
typedef struct ptxNSC_RfPar_Fwt ptxNSC_RfPar_Fwt_t
 NSC Rf Parameter Fwt.
 
typedef struct ptxNSC_RfPar_TxBitRate ptxNSC_RfPar_TxBitRate_t
 NSC Rf Parameter Tx_Bit_Rate.
 
typedef struct ptxNSC_RfPar_RxBitRate ptxNSC_RfPar_RxBitRate_t
 NSC Rf Parameter Rx_Bit_Rate.
 
typedef struct ptxNSC_RfPar_TxParity ptxNSC_RfPar_TxParity_t
 NSC Rf Parameter Tx_Parity.
 
typedef struct ptxNSC_RfPar_RxParity ptxNSC_RfPar_RxParity_t
 NSC Rf Parameter Rx_Parity.
 
typedef struct ptxNSC_RfPar_TxCRC ptxNSC_RfPar_TxCRC_t
 NSC Rf Parameter Tx_CRC.
 
typedef struct ptxNSC_RfPar_RxCRC ptxNSC_RfPar_RxCRC_t
 NSC Rf Parameter Rx_Parity.
 
typedef struct ptxNsc_RfPar_ResLimit ptxNsc_RfPar_ResLimit_t
 NSC Rf Parameter Res(ponse)_Limit.
 
typedef struct ptxNsc_RfPar_TxResidualBits ptxNsc_RfPar_TxResidualBits_t
 NSC Rf Parameter Tx_Residual_Bits.
 
typedef struct ptxNsc_RfPar_RfField ptxNsc_RfPar_RfField_t
 NSC Rf Parameter Rf_Field.
 
typedef union ptxNSC_RfPar_Params ptxNSC_RfPar_Params_t
 Union Rf Parameters.
 
typedef struct ptxNSC_RfPar ptxNSC_RfPar_t
 Rf Param.
 
typedef struct ptxNSC_RfSetParams_Par ptxNSC_RfSetParams_Par_t
 NSC Rf Set Parameters CMD parameter structure.
 
typedef struct ptxNSC_RfActTech_A_Param ptxNSC_RfActTech_A_Param_t
 NSC Rf Tech A Activation Parameters.
 
typedef struct ptxNSC_RfActTech_B_Param ptxNSC_RfActTech_B_Param_t
 NSC Rf Tech B Activation Parameters.
 
typedef struct ptxNSC_RfActTech_F_Param ptxNSC_RfActTech_F_Param_t
 NSC Rf Tech F Activation Parameters.
 
typedef struct ptxNSC_RfActTech_V_Param ptxNSC_RfActTech_V_Param_t
 NSC Rf Tech V Activation Parameters.
 
typedef union ptxNSC_RfActTech_Param ptxNSC_RfActTech_Param_t
 NSC Rf Tech Activation Parameters.
 
typedef union ptxNSC_RfActProt_ISODEP_Param ptxNSC_RfActProt_ISODEP_Param_t
 NSC Rf Prot ISO-DEP (Type-A) Activation Parameters.
 
typedef union ptxNSC_RfActProt_Param_t ptxNSC_RfActProt_Param_t
 NSC Rf Prot Activation Parameters.
 
typedef struct ptxNSC_RfActiv_Param ptxNSC_RfActiv_Param_t
 NSC Rf Activate structure.
 
typedef enum ptxNSC_RfDeact_Type ptxNSC_RfDeact_Type_t
 NSC Rf Deactivate procedure type.
 
typedef enum ptxNSC_RfDeact_State ptxNSC_RfDeact_State_t
 NSC RF state-machine state after command execution.
 
typedef struct ptxNSC_RfDeactPars ptxNSC_RfDeactPars_t
 NSC RF deactivate parameters.
 
typedef enum ptxNSC_ReadCmd_Type ptxNSC_ReadCmd_Type_t
 Types of NSC Read CMD.
 
typedef struct ptxNSC_ReadCmd_Par ptxNSC_ReadCmd_Par_t
 NSC Read CMD parameter structure.
 
typedef enum ptxNSC_WriteCmd_Type ptxNSC_WriteCmd_Type_t
 
typedef struct ptxNSC_WriteCmd_Par ptxNSC_WriteCmd_Par_t
 
typedef enum ptxNSC_RevisionType ptxNSC_RevisionType_t
 NSC Revision-Info Types.
 
typedef enum ptxNSC_Power_Mode ptxNSC_Power_Mode_t
 NSC chip power modes.
 
typedef enum ptxNSC_System_State ptxNSC_System_State_t
 System States in PTX100x.
 
typedef enum ptxNSC_Mode ptxNSC_Mode_t
 NSC Mode. (Just used for UART Interface).
 
typedef enum ptxNSC_RfTest_ID ptxNSC_RfTest_ID_t
 Test-IDs for RF-Test command.
 
typedef struct ptxNSC_Rsp ptxNSC_Rsp_t
 NSC RSP Handler.
 
typedef struct ptxNSC_RfConfig_Regs ptxNSC_RfConfig_Regs_t
 NSC Rf Config Registers Structures.
 
typedef struct ptxNSC_RfConfig_Param ptxNSC_RfConfig_Param_t
 NSC Rf Config Parameters.
 
typedef struct ptxNSC_RFMiscConfig_Param ptxNSC_RFMiscConfig_Param_t
 NSC Misc. Rf Config Parameters (Shadow-Copy)
 
typedef struct ptxNSC_ConfigPars ptxNSC_ConfigPars_t
 Configuration parameters for the NSC Component.
 
typedef ptxStatus_t(* pExtNSCDiscoverCmd_t) (void *extCtx, uint8_t *cmdBuffer)
 Extension Prototype (RFU): Handler for NSC RF-Discover Command.
 
typedef ptxStatus_t(* pExtNSCDiscoverNtf_t) (void *extCtx, struct ptxNSC *nscCtx, uint8_t *payload, size_t lengthOfPayload, ptxNSC_Event_t *event)
 Extension Prototype (RFU): Handler for NSC RF-Discover Notification.
 
typedef ptxStatus_t(* pExtNSCActivateNtf_t) (void *extCtx, struct ptxNSC *nscCtx, uint8_t *payload, size_t lengthOfPayload, ptxNSC_Event_t *event)
 Extension Prototype (RFU): Handler for NSC RF-Activate Notification.
 
typedef struct ptxNSC_Custom_Extension ptxNSC_Custom_Extension_t
 Extension Prototype (RFU): Extension Component Structure.
 
typedef struct ptxNSC ptxNSC_t
 Main NSC component structure.
 

Enumerations

enum  ptxNSC_Rsp_ErrorCodes {
  ptxNscRsp_Sucessful = (0x00u) , ptxNscRsp_UnknownError = (0x01u) , ptxNscRsp_NotAllowedCmd = (0x02u) , ptxNscRsp_UnknownErrorCmd = (0x03u) ,
  ptxNscRsp_InvalidParameter = (0x04u) , ptxNscRsp_RouteNotFound = (0x05u) , ptxNscRsp_PAThermalProtError = (0x06u) , ptxNscRsp_PAOvercurProtError = (0x07u) ,
  ptxNscRsp_DeviceInStandby = (0x08u) , ptxNscRsp_RfCollisionError = (0x11u) , ptxNscRsp_RfTimeoutError = (0x12u) , ptxNscRsp_RfTransmissionError = (0x13u) ,
  ptxNscRsp_RfProtocolError = (0x14u) , ptxNscRsp_RfPollModNotSupported = (0x15u) , ptxNscRsp_RfListModNotSupported = (0x16u) , ptxNscRsp_SwpUiccNotPresent = (0x21u) ,
  ptxNscRsp_SwpInterfaceError = (0x22u) , ptxNscRsp_SwpIdentityCheckFail = (0x23u) , ptxNscRsp_SwpModeNotSupported = (0x24u)
}
 NSC response Eror Codes. More...
 
enum  ptxNSC_RfConfig_ParamList {
  RfCfgParam_Undefined , RfCfgParam_Wavebank_0 , RfCfgParam_Wavebank_1 , RfCfgParam_Wavebank_2 ,
  RfCfgParam_Wavebank_3 , RfCfgParam_Wavebank_4 , RfCfgParam_Wavebank_5 , RfCfgParam_Wavebank_6 ,
  RfCfgParam_Wavebank_7 , RfCfgParam_Wavebank_8 , RfCfgParam_Wavebank_9 , RfCfgParam_Wavebank_10 ,
  RfCfgParam_Wavebank_11 , RfCfgParam_Wavebank_12 , RfCfgParam_Wavebank_13 , RfCfgParam_Wavebank_14 ,
  RfCfgParam_Wavebank_15 , RfCfgParam_Wavebank_16 , RfCfgParam_Wavebank_17 , RfCfgParam_Wavebank_18 ,
  RfCfgParam_Wavebank_19 , RfCfgParam_RegsPollA106 , RfCfgParam_RegsPollA212 , RfCfgParam_RegsPollA424 ,
  RfCfgParam_RegsPollA848 , RfCfgParam_RegsPollB106 , RfCfgParam_RegsPollB212 , RfCfgParam_RegsPollB424 ,
  RfCfgParam_RegsPollB848 , RfCfgParam_RegsPollF212 , RfCfgParam_RegsPollF424 , RfCfgParam_RegsPollV ,
  RfCfgParam_Listen , RfCfgParam_RegsMisc , RfCfgParam_MaxNum
}
 NSC RF CONFIG Parameter Type List.
 
enum  ptxNSC_PollType {
  PollModeDisabled , ConstantField , NfcForumMode , EmvPollMode ,
  EmvPollMode_TransacA , EmvPollMode_TransacB , IsoPollMode
}
 Enum for Polling-Loop type. More...
 
enum  ptxNSC_InitTechPoll {
  Init_Poll_ACM , Init_Poll_A , Init_Poll_B , Init_Poll_F ,
  Init_Poll_V
}
 Enum for initial technology in the discovery loop. More...
 
enum  ptxNSC_RfDiscovery_Mode { DiscoveryMode_Regular = 0x00u , DiscoveryMode_Lpcd = 0x01u , DiscoveryMode_Hybrid_Start = 0x02u , DiscoveryMode_Hybrid_End = 0xFFu }
 NSC Rf Discovery Con_Poll_Disc_Mode parameter settings. More...
 
enum  ptxNSC_RfParameter_Id {
  RfParameter_EoC , RfParameter_Rf_Tech , RfParameter_Fwt , RfParameter_Tx_Bit_Rate ,
  RfParameter_Rx_Bit_Rate , RfParameter_Tx_PAR , RfParameter_Rx_PAR , RfParameter_Tx_CRC ,
  RfParameter_Rx_CRC , RfParameter_Res_Limit , RfParameter_Tx_Residual_Bits , RfParameter_Rf_Field
}
 NSC Rf Parameter Id. More...
 
enum  ptxNSC_RfDeact_Type { DeactType_Generic = 0x01u , DeactType_Protocol_Specific = 0x02u }
 NSC Rf Deactivate procedure type. More...
 
enum  ptxNSC_RfDeact_State { RfIdle = 0x01u , RfDiscovery = 0x02u , RfPollSleep = 0x03u , RfDiscoverNoFieldOff = 0x05u }
 NSC RF state-machine state after command execution. More...
 
enum  ptxNSC_ReadCmd_Type { ReadRandomAdd = 1u }
 Types of NSC Read CMD. More...
 
enum  ptxNSC_WriteCmd_Type { WriteRandomAdd = 1u }
 
enum  ptxNSC_RevisionType {
  ptxNSC_Info_C_Stack , ptxNSC_Info_Local_Changes , ptxNSC_Info_DFY_Code , ptxNSC_Info_DFY_Toolchain ,
  ptxNSC_Info_ChipID , ptxNSC_Info_ProductID
}
 NSC Revision-Info Types.
 
enum  ptxNSC_Power_Mode { PowerMode_Active = 0x00u , PowerMode_StandBy = 0x01u }
 NSC chip power modes. More...
 
enum  ptxNSC_System_State { SystemState_OK , SystemState_ERR_Overcurrent , SystemState_ERR_Temperature , SystemState_ERR_CurrentLimit }
 System States in PTX100x.
 
enum  ptxNSC_Mode { NscMode_HW , NscMode_SYS }
 NSC Mode. (Just used for UART Interface). More...
 
enum  ptxNSC_RfTest_ID {
  RfTest_TRANSAC_A = 1 , RfTest_TRANSAC_B = 2 , RfTest_Carrier = 3 , RfTest_PRBS_9 = 4 ,
  RfTest_PRBS_15 = 5
}
 Test-IDs for RF-Test command. More...
 

Functions

ptxStatus_t ptxNSC_Init (ptxNSC_t **nscCtx, ptxNSC_ConfigPars_t *configPars)
 Initialize the NSC Component.
 
ptxStatus_t ptxNSC_Deinit (ptxNSC_t *nscCtx)
 De-Initialize the NSC Component.
 
ptxStatus_t ptxNSC_SoftReset (ptxNSC_t *nscCtx)
 NSC Soft Reset on the PTX1K.
 
ptxStatus_t ptxNSC_HardReset (ptxNSC_t *nscCtx)
 NSC Hard Reset on the PTX1K via the SEN-pin.
 
ptxStatus_t ptxNSC_Reset (ptxNSC_t *nscCtx)
 Performs either an caller-agnostic NSC Hard (if SEN-pin is connected) or Soft Reset.
 
ptxStatus_t ptxNSC_FwDownloader (ptxNSC_t *nscCtx)
 NSC FW Downloading on the PTX1K.
 
ptxStatus_t ptxNSC_DFY_Activation (ptxNSC_t *nscCtx)
 NSC DFY Activation.
 
ptxStatus_t ptxNSC_InitCmd (ptxNSC_t *nscCtx, ptxNSC_InitPars_t *nscInitPars)
 NSC_INIT_CMD.
 
ptxStatus_t ptxNSC_StandbyCmd (ptxNSC_t *nscCtx)
 NSC_STANDY_CMD.
 
ptxStatus_t ptxNSC_WakeupCmd (ptxNSC_t *nscCtx)
 NSC_WAKEUP_CMD.
 
ptxStatus_t ptxNSC_RfConfig (ptxNSC_t *nscCtx, ptxNSC_RfConfigTlv_t *nscRfCfgParams, uint8_t rfConfigTlvCount)
 NSC_RF_CONFIG_CMD.
 
ptxStatus_t ptxNSC_RfDiscovery (ptxNSC_t *nscCtx, ptxNSC_RfDiscPars_t *nscRfDiscPars)
 NSC_RF_DISCOVER_CMD.
 
ptxStatus_t ptxNSC_RfSetParams (ptxNSC_t *nscCtx, ptxNSC_RfPar_t *nscRfParams, size_t nscRfParamsLen)
 NSC_RF_DISCOVER_CMD.
 
ptxStatus_t ptxNSC_RfActivate (ptxNSC_t *nscCtx, ptxNSC_RfActiv_Param_t *nscRfActPars, uint8_t *activationData, size_t *activationDataLen)
 NSC_RF_ACTIVATE_CMD.
 
ptxStatus_t ptxNSC_RfDeactivate (ptxNSC_t *nscCtx, ptxNSC_RfDeactPars_t *nscRfDeactPars)
 NSC_RF_DEACTIVATE_CMD.
 
ptxStatus_t ptxNSC_RfDataMsgTx (ptxNSC_t *nscCtx, uint8_t *msgData, size_t msgDataLen, uint8_t isChained)
 Transmission of a NSC_RF_MSG to a remote RF device such as a reader.
 
ptxStatus_t ptxNSC_Get_Mtu (ptxNSC_t *nscCtx, uint32_t *maxTransferUnit)
 Get Maximum Transfer Unit.
 
ptxStatus_t ptxNSC_GetRevisionInfo (ptxNSC_t *nscCtx, ptxNSC_RevisionType_t revisionType, uint32_t *revisionInfo)
 Get various revisions of system (C-Stack, DFY-Code/-Toochain, Chip-ID, Local changes etc.
 
ptxStatus_t ptxNSC_CheckSystemState (ptxNSC_t *nscCtx, ptxStatus_t currentStatus)
 Checks System-State during initialization phase of IC.
 
ptxStatus_t ptxNSC_ReadTempSensor (ptxNSC_t *nscCtx, uint8_t *sensVal)
 Read out IC temperature sensor.
 
ptxStatus_t ptxNSC_GetInitConfigParams (ptxNSC_t *nscCtx, uint32_t baudRate, uint8_t *uartConfig)
 Get uart configuration parameters for NSC init command.
 
ptxStatus_t ptxNSC_GetMiscRFConfig (ptxNSC_t *nscCtx, uint8_t *configBuffer, uint8_t *configBufferLen)
 NSC Get last loaded Misc. RF-Configuration.
 
ptxStatus_t ptxNSC_Read (ptxNSC_t *nscCtx, uint16_t address, uint8_t *value)
 Reads a (register) value from the chip.
 
ptxStatus_t ptxNSC_Write (ptxNSC_t *nscCtx, uint16_t address, uint8_t value)
 Writes a single (register/memory) value to the chip.
 
ptxStatus_t ptxNSC_WriteN (ptxNSC_t *nscCtx, uint16_t *addresses, uint8_t *values, size_t nrWrites)
 Writes multiple (register/memory) values to the chip.
 
ptxStatus_t ptxNSC_RfTestRun (ptxNSC_t *nscCtx, ptxNSC_RfTest_ID_t rfTestId, uint8_t *rfTestParams, size_t rfTestParamsLen)
 Function for NSC_RF_RUN_CMD.
 
ptxStatus_t ptxNSC_RfTestStop (ptxNSC_t *nscCtx)
 Function for NSC_RF_STOP_CMD.
 
ptxStatus_t ptxNSC_GetDeactivateTimeout (ptxNSC_t *nscCtx, uint32_t *currentTimeout)
 Function to retrieve the current timeout value in [ms] to wait for a NSC.RF_DEACTIVATE_RSP.
 
ptxStatus_t ptxNSC_SetDeactivateTimeout (ptxNSC_t *nscCtx, uint32_t *currentTimeout)
 Function to set the current timeout value in [ms] to wait for a NSC.RF_DEACTIVATE_RSP.
 
ptxStatus_t ptxNSC_SetNrResidualTxBits (ptxNSC_t *nscCtx, uint8_t transparentModeEnabled, uint8_t nrTxBits)
 Enables or disables the NFC Type-A Transparent Mode and allows to set the number of residual Tx-bits if enabled.
 
ptxStatus_t ptxNSC_RegisterExtension (ptxNSC_t *nscCtx, ptxNSC_Custom_Extension_t *extension)
 Register an NSC-Extension (Prototype/RFU).
 
ptxStatus_t ptxNSC_DeRegisterExtension (ptxNSC_t *nscCtx, uint8_t extensionID)
 De-Register an NSC-Extension (Prototype/RFU).
 
ptxStatus_t ptxNSC_ProcessRspErrorCode (ptxNSC_Rsp_ErrorCodes_t NscRspErrorCode)
 
ptxStatus_t ptxNSC_Send (ptxNSC_t *nscCtx, ptxNscHal_BufferId_t bufferId, uint8_t *txBuf[], size_t txLen[], size_t numBuffers)
 
ptxStatus_t ptxNSC_ReceiveRsp (ptxNSC_t *nscCtx, uint8_t **rsp, size_t *rspLen, uint32_t timeOut)
 
ptxStatus_t ptxNSC_Process (ptxNSC_t *nscCtx, uint8_t *buff, size_t buffLen)
 
ptxStatus_t ptxNSC_SetMode (ptxNSC_t *nscCtx, ptxNSC_Mode_t newMode)
 
ptxStatus_t ptxNSC_GetMode (ptxNSC_t *nscCtx, ptxNSC_Mode_t *currentMode)
 
ptxStatus_t ptxNSC_Stop_WaitForRx (ptxNSC_t *nscCtx)
 
ptxStatus_t ptxNSC_Start_WaitForRx (ptxNSC_t *nscCtx)
 

Detailed Description

SPDX-License-Identifier: BSD-3-Clause

Copyright (c) 2026, Renesas Electronics Corporation and/or its affiliates

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of Renesas nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY Renesas "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RENESAS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT

OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Project : PTX1K Module : NSC File : ptxNSC.h

Description :