This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

USE NRF21540 with NRF52832

Hi,

I use library NRF21540.c to config to control NRF21540, to amplifier the radio of nrf52832.

This is my define:

#ifndef NRF21540_USE_GPIO_MANAGEMENT
#define NRF21540_USE_GPIO_MANAGEMENT 1
#endif

#define NRF21540_ANTSEL_PIN 26
#define NRF21540_MODE_PIN   28
#define NRF21540_TXEN_PIN   28
#define NRF21540_RXEN_PIN   27
#define NRF21540_PDN_PIN    24
#define NRF21540_TIMER_NO 3
#define NRF21540_LNA_GPIOTE_CHANNEL_NO 0
#define NRF21540_PA_GPIOTE_CHANNEL_NO 1
#define NRF21540_INTERRUPT_PRIORITY 0
#define NRF21540_PDN_GPIOTE_CHANNEL_NO 2
#define NRF21540_PDN_PPI_CHANNEL_NO 3
#define NRF21540_TIMER_CC_PD_PG_CHANNEL_NO 1
#define NRF21540_TIMER_CC_START_TO_PDN_UP_CHANNEL_NO 0
#define NRF21540_TRX_PPI_CHANNEL_NO 2
#define NRF21540_USER_PPI_CHANNEL_NO 4

This is my call in main():

    nrf21540_init();
    nrf21540_ant_set(NRF21540_ANT1);
    nrf21540_pwr_mode_set(NRF21540_PWR_MODE_A);
    nrf21540_tx_set(NRF21540_EXECUTE_NOW,NRF21540_EXEC_MODE_NON_BLOCKING);

The code was build ok, but when run, it get stuck:

And when I ignore this (by uncheck HardFault), it comes as this:

I run on ble_app_template.

Any advices for my case? Tks.

Related