hi we have designed a board with nrf52840 with nrf21540.and we have designed it to communicate it with spi .Is the spi example for nrf21540 is available in sdk . if not where am i able to get the firmware example for nrf21540
hi we have designed a board with nrf52840 with nrf21540.and we have designed it to communicate it with spi .Is the spi example for nrf21540 is available in sdk . if not where am i able to get the firmware example for nrf21540
i found a radio test example(pca10112) in sdk. how can i use this to implement that in our application code. and what that radio test example do
i found a radio test example(pca10112) in sdk. how can i use this to implement that in our application code. and what that radio test example do
Hi,
There is planned future support in NCS, for now there is a driver in nRF5SDK at \driver_ext\nrf21540\
No spi example is available yet. The DTM and Radio test example supports the nRF21540.
Akshay19 said:what that radio test example do
regards
Jared
hi,
i used that driver nrf21540.c and .h from radio test example and i used those files in ble perepheral / ble_blinky example. i called the functions from nrf21540.c file like this in main()
int main(void)
{
// Initialize.
log_init();
// leds_init();
timers_init();
// buttons_init();
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);
power_management_init();
ble_stack_init();
gap_params_init();
gatt_init();
services_init();
advertising_init();
conn_params_init();
// Start execution.
NRF_LOG_INFO("Blinky example started.");
advertising_start();
// Enter main loop.
for (;;)
{
idle_state_handle();
}
}
but when i call the nrf21540_tx_set(); the code is not advertising.
or should i call this nrf21540_tx_set & nrf21540_rx_set in any radio events
this is my pin map
#define NRF21540_RXEN_PIN NRF_GPIO_PIN_MAP(1,13)
#define NRF21540_TXEN_PIN NRF_GPIO_PIN_MAP(1,10)
#define NRF21540_PDN_PIN NRF_GPIO_PIN_MAP(1,02)
#define NRF21540_MODE_PIN NRF_GPIO_PIN_MAP(0,29)
#define NRF21540_ANTSEL_PIN NRF_GPIO_PIN_MAP(0,02)
#define NRF21540_CS_PIN NRF_GPIO_PIN_MAP(1,04)
#define NRF21540_MOSI_PIN NRF_GPIO_PIN_MAP(0,25)
#define NRF21540_MISO_PIN NRF_GPIO_PIN_MAP(1,06)
#define NRF21540_CLK_PIN NRF_GPIO_PIN_MAP(0,24)
where to call those tx and rx set function
im using gpio not spi
pls reply
Hi,
The Softdevice doesn't support the driver yet. It's meant to be used with the more lower level application such as radio test etc.
regards
Jared
Hi @Akshay
Hope you are doing well! Are you able to solve this nrf21540 with nrf5 SDK?
Thanks in Advance!