NFCT HAL
- group nrf_nfct_hal
Hardware access layer (HAL) for the Near Field Communication Tag (NFCT) peripheral.
Defines
-
NRF_NFCT_CRC_SIZE
CRC size in bytes.
-
NRF_NFCT_DISABLE_ALL_INT
Value to disable all interrupts.
-
NRF_NFCT_MOD_CTRL_PIN_NOT_CONNECTED
This value can be used as a parameter for the nrf_nfct_mod_ctrl_pin_set function to specify that a given NFCT signal (MODULATION CONTROL) must not be connected to a physical pin.
Enums
-
enum nrf_nfct_task_t
NFCT tasks.
Values:
-
enumerator NRF_NFCT_TASK_ACTIVATE
Activate the NFCT peripheral for the incoming and outgoing frames, change state to activated.
-
enumerator NRF_NFCT_TASK_DISABLE
Disable the NFCT peripheral.
-
enumerator NRF_NFCT_TASK_SENSE
Enable the NFC sense field mode, change state to sense mode.
-
enumerator NRF_NFCT_TASK_STARTTX
Start the transmission of an outgoing frame, change state to transmit.
-
enumerator NRF_NFCT_TASK_ENABLERXDATA
Initialize EasyDMA for receive.
-
enumerator NRF_NFCT_TASK_GOIDLE
Force state machine to the IDLE state.
-
enumerator NRF_NFCT_TASK_GOSLEEP
Force state machine to the SLEEP_A state.
-
enumerator NRF_NFCT_TASK_ACTIVATE
-
enum nrf_nfct_event_t
NFCT events.
Values:
-
enumerator NRF_NFCT_EVENT_READY
The NFCT peripheral is ready to receive and send frames.
-
enumerator NRF_NFCT_EVENT_FIELDDETECTED
Remote NFC field is detected.
-
enumerator NRF_NFCT_EVENT_FIELDLOST
Remote NFC field is lost.
-
enumerator NRF_NFCT_EVENT_TXFRAMESTART
The start of the first symbol of a transmitted frame.
-
enumerator NRF_NFCT_EVENT_TXFRAMEEND
The end of the last transmitted on-air symbol of a frame.
-
enumerator NRF_NFCT_EVENT_RXFRAMESTART
The end of the first symbol of a received frame.
-
enumerator NRF_NFCT_EVENT_RXFRAMEEND
Received data was checked (CRC, parity) and transferred to RAM, and EasyDMA ended accessing the RX buffer.
-
enumerator NRF_NFCT_EVENT_ERROR
NFC error reported. The ERRORSTATUS register contains details on the source of the error.
-
enumerator NRF_NFCT_EVENT_RXERROR
NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error.
-
enumerator NRF_NFCT_EVENT_ENDRX
RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full.
-
enumerator NRF_NFCT_EVENT_ENDTX
Transmission of data in RAM ended, and EasyDMA ended accessing the TX buffer.
-
enumerator NRF_NFCT_EVENT_AUTOCOLRESSTARTED
Auto collision resolution process started.
-
enumerator NRF_NFCT_EVENT_COLLISION
NFC auto collision resolution error reported.
-
enumerator NRF_NFCT_EVENT_SELECTED
NFC auto collision resolution successfully completed.
-
enumerator NRF_NFCT_EVENT_STARTED
EasyDMA is ready to receive or send frames.
-
enumerator NRF_NFCT_EVENT_READY
-
enum nrf_nfct_short_mask_t
NFCT shortcuts.
Values:
-
enumerator NRF_NFCT_SHORT_FIELDDETECTED_ACTIVATE_MASK
Shortcut between the FIELDDETECTED event and the ACTIVATE task.
-
enumerator NRF_NFCT_SHORT_FIELDLOST_SENSE_MASK
Shortcut between the FIELDLOST event and the SENSE task.
-
enumerator NRF_NFCT_SHORT_TXFRAMEEND_ENABLERXDATA_MASK
Shortcut between the TXFRAMEEND event and the ENABLERXDATA task.
-
enumerator NRF_NFCT_SHORT_FIELDDETECTED_ACTIVATE_MASK
-
enum nrf_nfct_int_mask_t
NFCT interrupts.
Values:
-
enumerator NRF_NFCT_INT_READY_MASK
Interrupt on READY event.
-
enumerator NRF_NFCT_INT_FIELDDETECTED_MASK
Interrupt on FIELDDETECTED event.
-
enumerator NRF_NFCT_INT_FIELDLOST_MASK
Interrupt on FIELDLOST event.
-
enumerator NRF_NFCT_INT_TXFRAMESTART_MASK
Interrupt on TXFRAMESTART event.
-
enumerator NRF_NFCT_INT_TXFRAMEEND_MASK
Interrupt on TXFRAMEEND event.
-
enumerator NRF_NFCT_INT_RXFRAMESTART_MASK
Interrupt on RXFRAMESTART event.
-
enumerator NRF_NFCT_INT_RXFRAMEEND_MASK
Interrupt on RXFRAMEEND event.
-
enumerator NRF_NFCT_INT_ERROR_MASK
Interrupt on ERROR event.
-
enumerator NRF_NFCT_INT_RXERROR_MASK
Interrupt on RXERROR event.
-
enumerator NRF_NFCT_INT_ENDRX_MASK
Interrupt on ENDRX event.
-
enumerator NRF_NFCT_INT_ENDTX_MASK
Interrupt on ENDTX event.
-
enumerator NRF_NFCT_INT_AUTOCOLRESSTARTED_MASK
Interrupt on AUTOCOLRESSTARTED event.
-
enumerator NRF_NFCT_INT_COLLISION_MASK
Interrupt on COLLISION event.
-
enumerator NRF_NFCT_INT_SELECTED_MASK
Interrupt on SELECTED event.
-
enumerator NRF_NFCT_INT_STARTED_MASK
Interrupt on STARTED event.
-
enumerator NRF_NFCT_INT_READY_MASK
-
enum nrf_nfct_error_status_t
NFC error status bit masks.
Values:
-
enumerator NRF_NFCT_ERROR_FRAMEDELAYTIMEOUT_MASK
Timeout of the Frame Delay Timer (no frame transmission started in the FDT window).
-
enumerator NRF_NFCT_ERROR_NFCFIELDTOOSTRONG_MASK
Field level is too high at maximum load resistance.
-
enumerator NRF_NFCT_ERROR_NFCFIELDTOOWEAK_MASK
Field level is too low at minimum load resistance.
-
enumerator NRF_NFCT_ERROR_FRAMEDELAYTIMEOUT_MASK
-
enum nrf_nfct_rx_frame_status_t
NFC received frame status bit masks.
Values:
-
enumerator NRF_NFCT_RX_FRAME_STATUS_CRC_MASK
CRC status mask.
-
enumerator NRF_NFCT_RX_FRAME_STATUS_PARITY_MASK
Parity status mask.
-
enumerator NRF_NFCT_RX_FRAME_STATUS_OVERRUN_MASK
Overrun status mask.
-
enumerator NRF_NFCT_RX_FRAME_STATUS_CRC_MASK
-
enum nrf_nfct_tag_state_t
NFC tag state.
Values:
-
enumerator NRF_NFCT_TAG_STATE_DISABLED
Disabled or sensing NFC field.
-
enumerator NRF_NFCT_TAG_STATE_RAMP_UP
Ramping up.
-
enumerator NRF_NFCT_TAG_STATE_IDLE
Idle.
-
enumerator NRF_NFCT_TAG_STATE_RECEIVE
Receiving data.
-
enumerator NRF_NFCT_TAG_STATE_FRAME_DELAY
Counting Frame Delay Time since the last symbol of the last received frame.
-
enumerator NRF_NFCT_TAG_STATE_TRANSMIT
Transmitting data.
-
enumerator NRF_NFCT_TAG_STATE_DISABLED
-
enum nrf_nfct_sleep_state_t
NFC tag sleep state.
Shows the sleep state during automatic collision resolution according to the NFC Forum Activity Technical Specification v2.0.
Values:
-
enumerator NRF_NFCT_SLEEP_STATE_IDLE
‘IDLE’ state.
-
enumerator NRF_NFCT_SLEEP_STATE_SLEEP_A
‘SLEEP_A’ state.
-
enumerator NRF_NFCT_SLEEP_STATE_IDLE
-
enum nrf_nfct_field_state_t
NFC field state bit masks.
Values:
-
enumerator NRF_NFCT_FIELD_STATE_PRESENT_MASK
Field presence mask.
-
enumerator NRF_NFCT_FIELD_STATE_LOCK_MASK
Field lock mask.
-
enumerator NRF_NFCT_FIELD_STATE_PRESENT_MASK
-
enum nrf_nfct_frame_delay_mode_t
NFC frame delay mode for data transmission.
Values:
-
enumerator NRF_NFCT_FRAME_DELAY_MODE_FREERUN
Frame transmission starts when NRF_NFCT_TASK_STARTTX is set (delay timer is not used).
-
enumerator NRF_NFCT_FRAME_DELAY_MODE_WINDOW
Frame transmission starts in a window between FRAMEDELAYMIN and FRAMEDELAYMAX.
-
enumerator NRF_NFCT_FRAME_DELAY_MODE_EXACTVAL
Frame transmission starts when the delay timer reaches FRAMEDELAYMAX.
-
enumerator NRF_NFCT_FRAME_DELAY_MODE_WINDOWGRID
Frame transmission starts in a bit grid between FRAMEDELAYMIN and FRAMEDELAYMAX.
-
enumerator NRF_NFCT_FRAME_DELAY_MODE_FREERUN
-
enum nrf_nfct_tx_frame_config_t
Bit masks for NFC transmission frame configuration.
Values:
-
enumerator NRF_NFCT_TX_FRAME_CONFIG_PARITY
Indicates whether parity is added in the transmitted frames.
-
enumerator NRF_NFCT_TX_FRAME_CONFIG_DISCARD_START
Indicates whether unused bits are discarded at the start or at the end of the transmitted frames.
-
enumerator NRF_NFCT_TX_FRAME_CONFIG_SOF
Indicates whether SoF symbol is added in the transmitted frames.
-
enumerator NRF_NFCT_TX_FRAME_CONFIG_CRC16
Indicates whether CRC is added in the transmitted frames.
-
enumerator NRF_NFCT_TX_FRAME_CONFIG_PARITY
-
enum nrf_nfct_rx_frame_config_t
Bit masks for NFC reception frame configuration.
Values:
-
enumerator NRF_NFCT_RX_FRAME_CONFIG_PARITY
Indicates whether parity is expected in the received frames.
-
enumerator NRF_NFCT_RX_FRAME_CONFIG_SOF
Indicates whether SoF symbol is expected in the received frames.
-
enumerator NRF_NFCT_RX_FRAME_CONFIG_CRC16
Indicates whether CRC is expected and checked in the received frames.
-
enumerator NRF_NFCT_RX_FRAME_CONFIG_PARITY
-
enum nrf_nfct_sensres_nfcid1_size_t
‘NFCI1 size’ NFC field configuration for the SENS_RES frame according to the NFC Forum Digital Protocol Technical Specification.
Values:
-
enumerator NRF_NFCT_SENSRES_NFCID1_SIZE_SINGLE
Single size NFCID1 (4 bytes).
-
enumerator NRF_NFCT_SENSRES_NFCID1_SIZE_DOUBLE
Double size NFCID1 (7 bytes).
-
enumerator NRF_NFCT_SENSRES_NFCID1_SIZE_TRIPLE
Triple size NFCID1 (10 bytes).
-
enumerator NRF_NFCT_SENSRES_NFCID1_SIZE_DEFAULT
Default size. Use this option to leave NFCID1 size unchanged.
-
enumerator NRF_NFCT_SENSRES_NFCID1_SIZE_SINGLE
-
enum nrf_nfct_sensres_bit_frame_sdd_t
‘Bit frame SDD’ NFC field configuration for the SENS_RES frame according to the NFC Forum Digital Protocol Technical Specification.
Values:
-
enumerator NRF_NFCT_SENSRES_BIT_FRAME_SDD_00000
SDD pattern 00000.
-
enumerator NRF_NFCT_SENSRES_BIT_FRAME_SDD_00001
SDD pattern 00001.
-
enumerator NRF_NFCT_SENSRES_BIT_FRAME_SDD_00010
SDD pattern 00010.
-
enumerator NRF_NFCT_SENSRES_BIT_FRAME_SDD_00100
SDD pattern 00100.
-
enumerator NRF_NFCT_SENSRES_BIT_FRAME_SDD_01000
SDD pattern 01000.
-
enumerator NRF_NFCT_SENSRES_BIT_FRAME_SDD_10000
SDD pattern 10000.
-
enumerator NRF_NFCT_SENSRES_BIT_FRAME_SDD_00000
-
enum nrf_nfct_sensres_platform_config_t
‘Platofrm Config’ NFC field configuration for the SENS_RES frame according to the NFC Forum Digital Protocol Technical Specification.
Values:
-
enumerator NRF_NFCT_SENSRES_PLATFORM_CONFIG_T1T
SENS_RES ‘Platform Config’ field (b4-b1) value for Type 1 Tag platform. SENS_RES ‘Platform Config’ field (b7-b6) value for any platform except Type 1 Tag platform.
-
enumerator NRF_NFCT_SENSRES_PLATFORM_CONFIG_OTHER
-
enumerator NRF_NFCT_SENSRES_PLATFORM_CONFIG_T1T
-
enum nrf_nfct_selres_t
Bit masks for SEL_RES NFC frame configuration.
Values:
-
enumerator NRF_NFCT_SELRES_CASCADE_MASK
SEL_RES Cascade field bit mask.
-
enumerator NRF_NFCT_SELRES_PROTOCOL_MASK
SEL_RES Protocol field bit mask.
-
enumerator NRF_NFCT_SELRES_CASCADE_MASK
-
enum nrf_nfct_selres_protocol_t
Protocol NFC field (bits b7 and b6) configuration for the SEL_RES frame according to the NFC Forum Digital Protocol Technical Specification.
Values:
-
enumerator NRF_NFCT_SELRES_PROTOCOL_T2T
Type 2 Tag platform.
-
enumerator NRF_NFCT_SELRES_PROTOCOL_T4AT
Type 4A Tag platform.
-
enumerator NRF_NFCT_SELRES_PROTOCOL_NFCDEP
NFC-DEP Protocol.
-
enumerator NRF_NFCT_SELRES_PROTOCOL_NFCDEP_T4AT
NFC-DEP Protocol and Type 4A Tag platform).
-
enumerator NRF_NFCT_SELRES_PROTOCOL_T2T
-
enum nrf_nfct_modulation_ctrl_t
Modulation output configuration.
Values:
-
enumerator NRF_NFCT_MODULATION_CTRL_INVALID
Invalid configuration. Defaults to the same behavior as NRF_NFCT_MODULATION_CTRL_INTERNAL.
-
enumerator NRF_NFCT_MODULATION_CTRL_INTERNAL
Use internal modulator only.
-
enumerator NRF_NFCT_MODULATION_CTRL_GPIO
Transmit output digital modulation signal to a GPIO pin.
-
enumerator NRF_NFCT_MODULATION_CTRL_INTERNAL_GPIO
Use internal modulator and transmit output digital modulation signal to a GPIO pin.
-
enumerator NRF_NFCT_MODULATION_CTRL_INVALID
Functions
-
NRF_STATIC_INLINE void nrf_nfct_task_trigger(NRF_NFCT_Type *p_reg, nrf_nfct_task_t task)
Function for activating a specific NFCT task.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
task – [in] Task to be activated.
-
NRF_STATIC_INLINE uint32_t nrf_nfct_task_address_get(NRF_NFCT_Type const *p_reg, nrf_nfct_task_t task)
Function for returning the address of a specific NFCT task register.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
task – [in] Task.
- Returns
Task address.
-
NRF_STATIC_INLINE void nrf_nfct_event_clear(NRF_NFCT_Type *p_reg, nrf_nfct_event_t event)
Function for clearing a specific event.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
event – [in] Event.
-
NRF_STATIC_INLINE bool nrf_nfct_event_check(NRF_NFCT_Type const *p_reg, nrf_nfct_event_t event)
Function for retrieving the state of the NFCT event.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
event – [in] Event to be checked.
- Return values
true – The event has been generated.
false – The event has not been generated.
-
NRF_STATIC_INLINE uint32_t nrf_nfct_event_address_get(NRF_NFCT_Type const *p_reg, nrf_nfct_event_t event)
Function for returning the address of a specific NFCT event register.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
event – [in] Event.
- Returns
Address.
-
NRF_STATIC_INLINE void nrf_nfct_shorts_enable(NRF_NFCT_Type *p_reg, uint32_t short_mask)
Function for enabling selected shortcuts.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
short_mask – [in] Mask of shortcuts.
-
NRF_STATIC_INLINE void nrf_nfct_shorts_disable(NRF_NFCT_Type *p_reg, uint32_t short_mask)
Function for disabling selected shortcuts.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
short_mask – [in] Mask of shortcuts.
-
NRF_STATIC_INLINE uint32_t nrf_nfct_shorts_get(NRF_NFCT_Type const *p_reg)
Function for retrieving the enabled shortcuts.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns
Flags of the currently enabled shortcuts.
-
NRF_STATIC_INLINE void nrf_nfct_shorts_set(NRF_NFCT_Type *p_reg, uint32_t short_mask)
Function for setting shortcuts.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
short_mask – [in] Shortcut mask.
-
NRF_STATIC_INLINE void nrf_nfct_int_enable(NRF_NFCT_Type *p_reg, uint32_t mask)
Function for enabling the selected interrupts.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Mask of interrupts to be enabled.
-
NRF_STATIC_INLINE uint32_t nrf_nfct_int_enable_check(NRF_NFCT_Type const *p_reg, uint32_t mask)
Function for checking if the specified interrupts are enabled.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Mask of interrupts to be checked.
- Returns
Mask of enabled interrupts.
-
NRF_STATIC_INLINE uint32_t nrf_nfct_int_enable_get(NRF_NFCT_Type const *p_reg)
Function for retrieving the information about enabled interrupts.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns
The flags of the enabled interrupts.
-
NRF_STATIC_INLINE void nrf_nfct_int_disable(NRF_NFCT_Type *p_reg, uint32_t mask)
Function for disabling the selected interrupts.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Mask of interrupts to be disabled.
-
NRF_STATIC_INLINE void nrf_nfct_mod_ctrl_pin_set(NRF_NFCT_Type *p_reg, uint32_t mod_ctrl_pin)
Function for configuring the NFCT modulation control pin.
If a given signal is not needed, pass the NRF_NFCT_MOD_CTRL_PIN_NOT_CONNECTED value instead of its pin number.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
mod_ctrl_pin – [in] Modulation control pin.
-
NRF_STATIC_INLINE uint32_t nrf_nfct_mod_ctrl_pin_get(NRF_NFCT_Type const *p_reg)
Function for getting the modulation control pin selection.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns
Modulation control pin selection.
-
NRF_STATIC_INLINE void nrf_nfct_modulation_output_set(NRF_NFCT_Type *p_reg, nrf_nfct_modulation_ctrl_t mod_ctrl)
Function for setting the modulation output. It enables the output to a GPIO pin which can be connected to a second external.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
mod_ctrl – [in] Modulation control field configuration.
-
NRF_STATIC_INLINE nrf_nfct_modulation_ctrl_t nrf_nfct_modulation_output_get(NRF_NFCT_Type const *p_reg)
Function for getting the modulation output configuration.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns
The configured modulation output.
-
NRF_STATIC_INLINE uint32_t nrf_nfct_error_status_get(NRF_NFCT_Type const *p_reg)
Function for getting the NFCT error status.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns
The NFCT error status flags, defined in nrf_nfct_error_status_t.
-
NRF_STATIC_INLINE void nrf_nfct_error_status_clear(NRF_NFCT_Type *p_reg, uint32_t error_flag)
Function for clearing the NFCT error status.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
error_flag – [in] Error flags to be cleared, defined in nrf_nfct_error_status_t.
-
NRF_STATIC_INLINE uint32_t nrf_nfct_rx_frame_status_get(NRF_NFCT_Type const *p_reg)
Function for getting the NFC frame reception status.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns
The flags of the NFC frame reception status, defined in nrf_nfct_rx_frame_status_t.
-
NRF_STATIC_INLINE void nrf_nfct_rx_frame_status_clear(NRF_NFCT_Type *p_reg, uint32_t framestatus_flags)
Function for clearing the NFC frame reception status.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
framestatus_flags – [in] Status flags to be cleared, defined in nrf_nfct_rx_frame_status_t.
-
NRF_STATIC_INLINE nrf_nfct_tag_state_t nrf_nfct_tag_state_get(NRF_NFCT_Type const *p_reg)
Function for getting the NFC tag state.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Return values
NRF_NFCT_TAG_STATE_DISABLED – NFC tag is disabled.
NRF_NFCT_TAG_STATE_RAMP_UP – NFC tag is ramping up.
NRF_NFCT_TAG_STATE_IDLE – NFC tag is activated and idle.
NRF_NFCT_TAG_STATE_RECEIVE – NFC tag is receiving data.
NRF_NFCT_TAG_STATE_FRAME_DELAY – Frame Delay Timer of the NFC tag is counting ticks since the last symbol of the last received frame.
NRF_NFCT_TAG_STATE_TRANSMIT – NFC tag is transmitting data.
-
NRF_STATIC_INLINE nrf_nfct_sleep_state_t nrf_nfct_sleep_state_get(NRF_NFCT_Type const *p_reg)
Function for getting the NFC tag sleep state during the automatic collision resolution.
The returned value is the last state before the autimatic collision resolution started.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Return values
NRF_NFCT_SLEEP_STATE_IDLE – NFC tag was in IDLE state before the automatic collision resolution started.
NRF_NFCT_SLEEP_STATE_SLEEP_A – NFC tag was in SLEEP_A state before the automatic collision resolution started.
-
NRF_STATIC_INLINE uint8_t nrf_nfct_field_status_get(NRF_NFCT_Type const *p_reg)
Function for getting the status of the external NFC field detection.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns
The NFC field detection status. Status bits can be checked by using nrf_nfct_field_state_t.
-
NRF_STATIC_INLINE uint16_t nrf_nfct_frame_delay_min_get(NRF_NFCT_Type const *p_reg)
Function for getting the minimum Frame Delay Time value.
This is the minimum value for Frame Delay Timer. It controls the shortest time between the last symbol of the last received frame and the start of the transmission of a new TX frame.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns
The minimum Frame Delay Time value in 13.56-MHz clock ticks.
-
NRF_STATIC_INLINE void nrf_nfct_frame_delay_min_set(NRF_NFCT_Type *p_reg, uint16_t frame_delay_min)
Function for setting the minimum Frame Delay Time value.
This is the minimum value for Frame Delay Timer. It controls the shortest time between the last symbol of the last received frame and the start of the transmission of a new TX frame.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
frame_delay_min – [in] Minimum Frame Delay Time value in 13.56-MHz clock ticks.
-
NRF_STATIC_INLINE uint32_t nrf_nfct_frame_delay_max_get(NRF_NFCT_Type const *p_reg)
Function for getting the maximum Frame Delay Time value.
This is the maximum value for Frame Delay Timer. It controls the longest time between the last symbol of the last received frame and the start of the transmission of a new TX frame. If no transmission starts before the Frame Delay Timer timeout, NRF_NFCT_ERROR_FRAMEDELAYTIMEOUT_MASK is set.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns
The maximum Frame Delay Time value in 13.56-MHz clock ticks.
-
NRF_STATIC_INLINE void nrf_nfct_frame_delay_max_set(NRF_NFCT_Type *p_reg, uint32_t frame_delay_max)
Function for setting the maximum Frame Delay Time value.
This is the maximum value for Frame Delay Timer. It controls the longest time between the last symbol of the last received frame and the start of the transmission of a new TX frame. If no transmission starts before the Frame Delay Timer timeout, NRF_NFCT_ERROR_FRAMEDELAYTIMEOUT_MASK is set.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
frame_delay_max – [in] Maximum Frame Delay Time value in 13.56-MHz clock ticks.
-
NRF_STATIC_INLINE nrf_nfct_frame_delay_mode_t nrf_nfct_frame_delay_mode_get(NRF_NFCT_Type const *p_reg)
Function for getting the Frame Delay Mode configuration.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns
The configured Frame Delay Mode.
-
NRF_STATIC_INLINE void nrf_nfct_frame_delay_mode_set(NRF_NFCT_Type *p_reg, nrf_nfct_frame_delay_mode_t frame_delay_mode)
Function for setting the NFC Frame Delay Mode configuration.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
frame_delay_mode – [in] Frame Delay Mode configuration.
-
NRF_STATIC_INLINE uint8_t *nrf_nfct_rxtx_buffer_get(NRF_NFCT_Type const *p_reg)
Function for getting the pointer to the NFCT RX/TX buffer.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns
The configured pointer to the receive or transmit buffer.
-
NRF_STATIC_INLINE void nrf_nfct_rxtx_buffer_set(NRF_NFCT_Type *p_reg, uint8_t *p_rxtx_buf, uint16_t max_txrx_len)
Function for setting the the NFCT RX/TX buffer (address and maximum length).
Note
Buffer for the NFC RX/TX data is used by EasyDMA and must be located in RAM.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
p_rxtx_buf – [in] Pointer to the receive or transmit buffer.
max_txrx_len – [in] Maximum receive or transmit length in bytes (size of the RAM buffer for EasyDMA).
-
NRF_STATIC_INLINE uint16_t nrf_nfct_max_rxtx_length_get(NRF_NFCT_Type const *p_reg)
Function for getting the NFCT RX/TX maximum buffer length.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns
The configured maximum receive or transmit length in bytes (size of the RX/TX buffer for EasyDMA).
-
NRF_STATIC_INLINE uint8_t nrf_nfct_tx_frame_config_get(NRF_NFCT_Type const *p_reg)
Function for getting the flags for NFC frame transmission configuration.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns
The flags of the NFCT frame transmission configuration, defined in nrf_nfct_tx_frame_config_t.
-
NRF_STATIC_INLINE void nrf_nfct_tx_frame_config_set(NRF_NFCT_Type *p_reg, uint8_t flags)
Function for setting up the flags of the NFC frame transmission configuration.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
flags – [in] Flags for NFCT TX configuration. Use nrf_nfct_tx_frame_config_t for setting.
-
NRF_STATIC_INLINE uint16_t nrf_nfct_tx_bits_get(NRF_NFCT_Type const *p_reg)
Function for getting the length of the configured transmission frame.
Note
NFC frames do not have to consist of full bytes only, therefore data amount for transmission is configured in number of bits.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns
Number of bits to be sent excluding CRC, parity, SoF, and EoF.
-
NRF_STATIC_INLINE void nrf_nfct_tx_bits_set(NRF_NFCT_Type *p_reg, uint16_t tx_bits)
Function for setting up the NFC frame transmission.
Set the number of TX bits excluding CRC, parity, SoF, and EoF.
Note
Source of data for transmission is set by using nrf_nfct_rxtx_buffer_set.
Note
NFC frames do not have to consist of full bytes only, therefore data amount for transmission is configured in number of bits.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
tx_bits – [in] Overall number of bits to be sent.
-
NRF_STATIC_INLINE uint8_t nrf_nfct_rx_frame_config_get(NRF_NFCT_Type const *p_reg)
Function for getting the flags of the NFC frame reception configuration.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns
The flags for NFCT frame reception configuration, defined in nrf_nfct_rx_frame_config_t.
-
NRF_STATIC_INLINE void nrf_nfct_rx_frame_config_set(NRF_NFCT_Type *p_reg, uint8_t flags)
Function for setting up the NFC frame reception.
Note
Destination for the received data is set using nrf_nfct_rxtx_buffer_set.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
flags – [in] NFCT RX configuration flags. Use nrf_nfct_rx_frame_config_t for setting the desired configuration.
-
NRF_STATIC_INLINE uint16_t nrf_nfct_rx_bits_get(NRF_NFCT_Type const *p_reg, bool crc_excluded)
Function for getting the number of bits received from the NFC poller.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
crc_excluded – [in] Flag for excluding CRC size from calculation.
- Returns
Number of received bits including or excluding CRC, and excluding parity and SoF/EoF framing.
-
NRF_STATIC_INLINE nrf_nfct_sensres_nfcid1_size_t nrf_nfct_nfcid1_get(NRF_NFCT_Type const *p_reg, uint8_t *p_nfcid1_buf)
Function for getting the NFCID1 (NFC tag identifier).
Note
This function always returns the full configuration of the NFCID1 setting (10 bytes), regardless of the NFCID1 size. The NFCID1 size can be configured using nrf_nfct_sensres_nfcid1_size_set or nrf_nfct_nfcid1_set.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
p_nfcid1_buf – [out] Pointer to a buffer for the NDFCID1 parameter. The NFCID1 values are in little endian order, that is: |NFCID1_3RD_LAST|NFCID1_2ND_LAST|NFCID1_LAST|.
- Returns
Configured NFCID1 length
-
NRF_STATIC_INLINE void nrf_nfct_nfcid1_set(NRF_NFCT_Type *p_reg, uint8_t const *p_nfcid1_buf, nrf_nfct_sensres_nfcid1_size_t nfcid1_size)
Function for setting the NFCID1 (NFC tag identifier).
Note
This function also configures the NFCIDSIZE field in the SENSRES register of the NFCT peripheral.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
p_nfcid1_buf – [in] Pointer to the buffer with NDFCID1 bytes.
nfcid1_size – [in] Size of the NFCID1 in bytes.
-
NRF_STATIC_INLINE bool nrf_nfct_autocolres_is_enabled(NRF_NFCT_Type const *p_reg)
Function for getting the setting for the automatic collision resolution.
The automatic collision resolution mechanism as defined in ISO 14443-3 and NFC Forum Digital Protocol Technical Specification 2.0, section 6.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Return values
true – If automatic collision resolution is enabled.
false – If automatic collision resolution is disabled.
-
NRF_STATIC_INLINE void nrf_nfct_autocolres_enable(NRF_NFCT_Type *p_reg)
Function for enabling the automatic collision resolution.
The automatic collision resolution mechanism as defined in ISO 14443-3 and NFC Forum Digital Protocol Technical Specification 2.0, section 6.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
-
NRF_STATIC_INLINE void nrf_nfct_autocolres_disable(NRF_NFCT_Type *p_reg)
Function for disabling the automatic collision resolution.
The automatic collision resolution mechanism as defined in ISO 14443-3 and NFC Forum Digital Protocol Technical Specification 2.0, section 6.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
-
NRF_STATIC_INLINE nrf_nfct_sensres_nfcid1_size_t nrf_nfct_sensres_nfcid1_size_get(NRF_NFCT_Type const *p_reg)
Function for getting the NFCID1 size from the SENS_RES frame configuration.
The SENS_RES frame is handled automatically by the NFCT hardware.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns
NFCID1 (tag identifier) size.
-
NRF_STATIC_INLINE void nrf_nfct_sensres_nfcid1_size_set(NRF_NFCT_Type *p_reg, nrf_nfct_sensres_nfcid1_size_t nfcid1_size)
Function for setting the NFCID1 (tag identifier) size.field in the SENS_RES frame configuration.
See also
Note
The SENS_RES frame is handled automatically by the NFCT hardware.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
nfcid1_size – [in] NFCID1 (tag identifier) size.
-
NRF_STATIC_INLINE nrf_nfct_sensres_bit_frame_sdd_t nrf_nfct_sensres_bit_frame_sdd_get(NRF_NFCT_Type const *p_reg)
Function for getting the Bit Frame SDD field from the SENS_RES frame configuration.
The SENS_RES frame is handled automatically by the NFCT hardware.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns
The Bit Frame SDD field configuration.
-
NRF_STATIC_INLINE void nrf_nfct_sensres_bit_frame_sdd_set(NRF_NFCT_Type *p_reg, nrf_nfct_sensres_bit_frame_sdd_t bit_frame_sdd)
Function for setting the Bit Frame SDD field in the SENS_RES frame configuration.
Note
The SENS_RES frame is handled automatically by the NFCT hardware.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
bit_frame_sdd – [in] The Bit Frame SDD field configuration.
-
NRF_STATIC_INLINE nrf_nfct_sensres_platform_config_t nrf_nfct_sensres_platform_config_get(NRF_NFCT_Type const *p_reg)
Function for getting the Platform Config field from the SENS_RES frame configuration.
The SENS_RES frame is handled automatically by the NFCT hardware.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns
The Platform Config field configuration.
-
NRF_STATIC_INLINE void nrf_nfct_sensres_platform_config_set(NRF_NFCT_Type *p_reg, nrf_nfct_sensres_platform_config_t platform_config)
Function for setting the Platform Config field in the SENS_RES frame configuration.
Note
The SENS_RES frame is handled automatically by the NFCT hardware.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
platform_config – [in] The Platform Config field configuration.
-
NRF_STATIC_INLINE bool nrf_nfct_selres_cascade_check(NRF_NFCT_Type const *p_reg)
Function for checking the CASCADE bit of the SEL_RES frame.
The CASCADE bit in the SEL_RES register is handled automatically by the NFCT hardware and indicates the status of the NFCID1 read operation to the NFC poller according to the NFC Forum Digital Protocol Speficiation 2.0, section 6.8.2.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Return values
true – If NFCID1 read procedure is not complete.
false – If NFCID1 read procedure is complete.
-
NRF_STATIC_INLINE nrf_nfct_selres_protocol_t nrf_nfct_selres_protocol_get(NRF_NFCT_Type const *p_reg)
Function for getting the Protocol field in the SEL_RES frame.
The SEL_RES frame is handled automatically by the NFCT hardware.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns
Value of the Protocol field in the SEL_RES frame.
-
NRF_STATIC_INLINE void nrf_nfct_selres_protocol_set(NRF_NFCT_Type *p_reg, nrf_nfct_selres_protocol_t sel_res_protocol)
Function for setting the Protocol field in the SEL_RES frame configuration.
The SEL_RES frame is handled automatically by the NFCT hardware.
- Parameters
p_reg – [in] Pointer to the structure of registers of the peripheral.
sel_res_protocol – [in] Value of the Protocol field in the SEL_RES frame.
-
NRF_NFCT_CRC_SIZE