MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Smart Card PHY TDA8035 Driver

Overview

The Smart Card interface TDA8035 driver handles the external interface chip TDA8035 which supports all necessary functions to control the ICC. These functions involve PHY pin initialization, ICC voltage selection and activation, ICC clock generation, ICC card detection, and activation/deactivation sequences.

Macros

#define SMARTCARD_ATR_DURATION_ADJUSTMENT   (360u)
 Smart card definition which specifies the adjustment number of clock cycles during which an ATR string has to be received.
 
#define SMARTCARD_INIT_DELAY_CLOCK_CYCLES_ADJUSTMENT   (4200u)
 Smart card definition which specifies the adjustment number of clock cycles until an initial 'TS' character has to be received. More...
 
#define SMARTCARD_TDA8035_STATUS_PRES   (0x01u)
 Masks for TDA8035 status register. More...
 
#define SMARTCARD_TDA8035_STATUS_ACTIVE   (0x02u)
 Smart card PHY TDA8035 Smart card active status.
 
#define SMARTCARD_TDA8035_STATUS_FAULTY   (0x04u)
 Smart card PHY TDA8035 Smart card faulty status.
 
#define SMARTCARD_TDA8035_STATUS_CARD_REMOVED   (0x08u)
 Smart card PHY TDA8035 Smart card removed status.
 
#define SMARTCARD_TDA8035_STATUS_CARD_DEACTIVATED   (0x10u)
 Smart card PHY TDA8035 Smart card deactivated status.
 

Functions

void SMARTCARD_PHY_TDA8035_GetDefaultConfig (smartcard_interface_config_t *config)
 Fills in the configuration structure with default values. More...
 
status_t SMARTCARD_PHY_TDA8035_Init (void *base, smartcard_interface_config_t const *config, uint32_t srcClock_Hz)
 Initializes a Smart card interface instance. More...
 
void SMARTCARD_PHY_TDA8035_Deinit (void *base, smartcard_interface_config_t *config)
 De-initializes a Smart card interface, stops the Smart card clock, and disables the VCC. More...
 
status_t SMARTCARD_PHY_TDA8035_Activate (void *base, smartcard_context_t *context, smartcard_reset_type_t resetType)
 Activates the Smart card IC. More...
 
status_t SMARTCARD_PHY_TDA8035_Deactivate (void *base, smartcard_context_t *context)
 De-activates the Smart card IC. More...
 
status_t SMARTCARD_PHY_TDA8035_Control (void *base, smartcard_context_t *context, smartcard_interface_control_t control, uint32_t param)
 Controls the Smart card interface IC. More...
 
void SMARTCARD_PHY_TDA8035_IRQHandler (void *base, smartcard_context_t *context)
 Smart card interface IC IRQ ISR. More...
 

Macro Definition Documentation

#define SMARTCARD_INIT_DELAY_CLOCK_CYCLES_ADJUSTMENT   (4200u)
#define SMARTCARD_TDA8035_STATUS_PRES   (0x01u)

Smart card PHY TDA8035 Smart card present status

Function Documentation

void SMARTCARD_PHY_TDA8035_GetDefaultConfig ( smartcard_interface_config_t config)
Parameters
configThe Smart card user configuration structure which contains configuration structure of type smartcard_interface_config_t. Function fill in members: clockToResetDelay = 42000, vcc = kSmartcardVoltageClassB3_3V, with default values.
status_t SMARTCARD_PHY_TDA8035_Init ( void *  base,
smartcard_interface_config_t const *  config,
uint32_t  srcClock_Hz 
)
Parameters
baseThe Smart card peripheral base address.
configThe user configuration structure of type smartcard_interface_config_t. The user can call to fill out configuration structure function SMARTCARD_PHY_TDA8035_GetDefaultConfig().
srcClock_HzSmart card clock generation module source clock.
Return values
kStatus_SMARTCARD_Successor kStatus_SMARTCARD_OtherError for an error.
void SMARTCARD_PHY_TDA8035_Deinit ( void *  base,
smartcard_interface_config_t config 
)
Parameters
baseThe Smart card peripheral module base address.
configThe user configuration structure of type smartcard_interface_config_t.
status_t SMARTCARD_PHY_TDA8035_Activate ( void *  base,
smartcard_context_t context,
smartcard_reset_type_t  resetType 
)
Parameters
baseThe Smart card peripheral module base address.
contextA pointer to a Smart card driver context structure.
resetTypetype of reset to be performed, possible values = kSmartcardColdReset, kSmartcardWarmReset
Return values
kStatus_SMARTCARD_Successor kStatus_SMARTCARD_OtherError for an error.
status_t SMARTCARD_PHY_TDA8035_Deactivate ( void *  base,
smartcard_context_t context 
)
Parameters
baseThe Smart card peripheral module base address.
contextA pointer to a Smart card driver context structure.
Return values
kStatus_SMARTCARD_Successor kStatus_SMARTCARD_OtherError for an error.
status_t SMARTCARD_PHY_TDA8035_Control ( void *  base,
smartcard_context_t context,
smartcard_interface_control_t  control,
uint32_t  param 
)
Parameters
baseThe Smart card peripheral module base address.
contextA pointer to a Smart card driver context structure.
controlA interface command type.
paramInteger value specific to control type
Return values
kStatus_SMARTCARD_Successor kStatus_SMARTCARD_OtherError for an error.
void SMARTCARD_PHY_TDA8035_IRQHandler ( void *  base,
smartcard_context_t context 
)
Parameters
baseThe Smart card peripheral module base address.
contextThe Smart card context pointer.