• No results found

Address info now removed from frame header, since already

7.2.3 PAL-API Changes

In order to reduce code size and to taylor the actually included functionality of the PAL according to the user application needs, the PAL-API has been updated. The API changes within the PAL-API mainly affect the functions handling transceiver interrupts.

7.2.3.1 TRX IRQ Initialization

7.2.3.1.1 Releaes 2.4.x

The initialization of transceiver interrupts has been changed from release 2.4.x:

void pal_trx_irq_init(trx_irq_hdlr_idx_t trx_irq_num, FUNC_PTR trx_irq_cb)

The implementation comprised of exactly one function for interrupt initialization, which required an ID for the actual interrupt number.

7.2.3.1.2 Releaes 2.5.x

Since most applications do not require all transceiver interrupts, this approach has been changed starting from release 2.5.x. The focus here is clearly on reduced footprint. Each single transceiver interrupt is initialized with a dedicated initializiation function. The original parameter specifying the dedicated transceiver interrupt is not used anymore. Furthermore only required transceiver interrupts are included into the code based on additional build switches that can be used.

The following functions are provided starting from release 2.5.x: Initialization of main transceiver interrupt:

void pal_trx_irq_init(FUNC_PTR trx_irq_cb)

Initialization of transceiver timestamp interrupt (only available if ENABLE_TSTAMP is used):

void pal_trx_irq_init_tstamp(FUNC_PTR trx_irq_cb)

Initialization of additionally required transceiver interrupts for MEGA-RF single chips:

void pal_trx_irq_init_rx_end(FUNC_PTR trx_irq_cb) void pal_trx_irq_init_tx_end(FUNC_PTR trx_irq_cb) void pal_trx_irq_init_cca_ed(FUNC_PTR trx_irq_cb)

Initialization of further optional transceiver interrupts for MEGA-RF single chips (only available if ENABLE_ALL_TRX_IRQS is used):

void pal_trx_irq_init_ami(FUNC_PTR trx_irq_cb) void pal_trx_irq_init_batmon(FUNC_PTR trx_irq_cb) void pal_trx_irq_init_awake(FUNC_PTR trx_irq_cb) void pal_trx_irq_init_pll_lock(FUNC_PTR trx_irq_cb) void pal_trx_irq_init_pll_unlock(FUNC_PTR trx_irq_cb) void pal_trx_irq_init_aes_ready(FUNC_PTR trx_irq_cb)

For more information see file PAL/Inc/pal.h and the corresponding pal_irq.c file for each platform implementation.

7.2.3.2 TRX IRQ Enabling and Disabling

7.2.3.2.1 Releaes 2.4.x

Enabling and disabling of transceiver interrupts has been changed from release 2.4.x:

inline void pal_trx_irq_enable(trx_irq_hdlr_idx_t trx_irq_num) inline void pal_trx_irq_disable(trx_irq_hdlr_idx_t trx_irq_num)

The implementation comprised of exactly one inline function for enabling or disabling transceiver interrupts, which required an ID for the actual interrupt number.

7.2.3.2.2 Releaes 2.5.x

Since most applications do not require all transceiver interrupts, this approach has been changed starting from release 2.5.x. Both the main transceiver interrupt and the timestamp interrupt are now enabled or disable by using a macro. The original parameter specifying the dedicated transceiver interrupt is not used anymore.

The following macros are provided starting from release 2.5.x: Enabling and disabling of the main transceiver interrupt:

#define pal_trx_irq_en() (ENABLE_TRX_IRQ()) #define pal_trx_irq_dis() (DISABLE_TRX_IRQ())

Enabling and disabling of the transceiver timestamp interrupt (only available if ENABLE_TSTAMP is used):

#define pal_trx_irq_en_tstamp() (ENABLE_TRX_IRQ_TSTAMP()) #define pal_trx_irq_dis_tstamp() (DISABLE_TRX_IRQ_TSTAMP())

Please note that the macro above are only available for non-single chip transceivers, since in single chip transceivers (MEGA_RF platforms) there is no separation between enabling/disabling transceiver interrupts at the transceiver, and setting/clearing the IRQ mask at the MCU. Therefore the transceiver interrupts in single chips are enabled/disabled by setting the MCU IRQ mask.

For more information see file PAL/Inc/pal.h and the corresponding pal_config.h file for each platform implementation.

7.2.3.3 TRX IRQ Flag Clearing

7.2.3.3.1 Releaes 2.4.x

Clearing the interrupt flag of transceiver interrupts has been changed from release 2.4.x:

inline void pal_trx_irq_flag_clr(trx_irq_hdlr_idx_t trx_irq_num)

The implementation comprised of exactly one inline function for clearing the transceiver interrupt flag, which required an ID for the actual interrupt number.

7.2.3.3.2 Releaes 2.5.x

Since most applications do not require all transceiver interrupts, this approach has been changed starting from release 2.5.x. Each single transceiver interrupt flag is cleared using a macro. The original parameter specifying the dedicated transceiver interrupt is not used anymore. Furthermore only required transceiver interrupts are included into the code based on additional build switches that can be used.

The following macros are provided starting from release 2.5.x: Clearing the main transceiver interrupt flag:

#define pal_trx_irq_flag_clr() (CLEAR_TRX_IRQ())

Clearing the transceiver timestamp interrupt flag (only available if ENABLE_TSTAMP is used):

#define pal_trx_irq_flag_clr_tstamp() (CLEAR_TRX_IRQ_TSTAMP())

Clearing of additionally required transceiver interrupt flags for MEGA-RF single chips:

#define pal_trx_irq_flag_clr_rx_end() (CLEAR_TRX_IRQ_RX_END()) #define pal_trx_irq_flag_clr_tx_end() (CLEAR_TRX_IRQ_TX_END()) #define pal_trx_irq_flag_clr_cca_ed() (CLEAR_TRX_IRQ_CCA_ED())

Clearing of further optional transceiver interrupt flags for MEGA-RF single chips (only available if ENABLE_ALL_TRX_IRQS is used):

#define pal_trx_irq_flag_clr_ami() (CLEAR_TRX_IRQ_AMI()) #define pal_trx_irq_flag_clr_batmon() (CLEAR_TRX_IRQ_BATMON()) #define pal_trx_irq_flag_clr_awake() (CLEAR_TRX_IRQ_AWAKE() #define pal_trx_irq_flag_clr_pll_lock() (CLEAR_TRX_IRQ_PLL_LOCK()) #define pal_trx_irq_flag_clr_pll_unlock()

CLEAR_TRX_IRQ_PLL_UNLOCK())

For more information see PAL/Inc/pal.h file and the corresponding pal_config.h file for each platform implementation

8 Toolchain

The following sections describe the used toolchain for the development and build process and how the provided example applications can be built.