Annex Dual Radio Timer
The dual radio feature requires a free running timer to enable synchronization of both transceiver together. The user must initialize this timer in their BSP and provide functions to control it.
- Timer configuration:
Counter Up mode
Auto-reload preload disabled
20.48 MHz tick frequency
Generate interruption at end of period
The function pointers below are part of the swc_hal_t structure. They need to be set to use the dual radio feature.
typedef struct swc_hal {
swc_radio_hal_t radio_hal[WPS_RADIO_COUNT]; /*!< Radio HAL */
void (*context_switch)(void); /*!< Context switch function pointer */
#if (WPS_RADIO_COUNT == 2)
void (*timer_start)(void); /*!< Radio timer start interface. */
void (*timer_stop)(void); /*!< Radio timer stop interface. */
void (*timer_set_period)(uint16_t period); /*!< Radio timer set period interface. */
void (*timer_set_max_period)(void); /*!< Radio timer set max period interface. */
void (*disable_timer_irq)(void); /*!< Disable Multi radio interrupt source */
void (*enable_timer_irq)(void); /*!< Enable Multi radio interrupt source */
uint32_t timer_frequency_hz; /*!< Frequency of the multi radio timer in Hz. */
#endif
} swc_hal_t;
timer_start
This function starts the free running timer.
timer_stop
This function stops the free running timer.
timer_set_period
This function set the number of ticks required before an interrupt request is triggered.
disable_timer_irq
This function disables the timer’s interrupt requests.
enable_timer_irq
This function enables the timer’s interrupt requests.