Since the nRF52 does not have the VDD_PA signal that the nRF51 has, what is the recommended method for connecting an external power amplifier that needs TX and RX enable signals?
Since the nRF52 does not have the VDD_PA signal that the nRF51 has, what is the recommended method for connecting an external power amplifier that needs TX and RX enable signals?
@John Chinnick: What about using FORK on the PPI channels that do the task radio start and on the event that use the event radio ended(Or use your own PPI channel) and use those FORK or PPI channel to trigger tasks on GPIOTE ?
You now can have 2 GPIOTE tasks to SET and CLR on same pin.
I was thinking this might be a solution. I wanted to confirm that the application has access to the radio PPI channels when the softdevice is active. I was also wondering if there were other options to consider.
Hi Hung Bui,
Can you provide an example for this?
Thanks.
I hope it's not too late for a comment on this. I've been working with the PA_LNA assist in the current versions of the soft device and noticed substantial differences between the timing of these signals and the actual timing of the RF transmission. In addition the events do not coincide with the transmit sequence in the reference manual. Because of this I did code to put the radio events on PPI channels so I could compare their timing relative to the RF burst. The radio event end points show up in the nrf52 header file and also the registers section under radio in the reference manual, so you can play around with any combination of these for your custom solution. You should init your gpiote solution IMMEDIATELY after the softdevice is started and before you start config'ing advertising.
You can put the solution on any available ppi channel, gpiote channel and port pin.
Also, you will note in my function I use the API to config and start the ppi solution. You should always use the API to do this if you run a soft device. Elsewhere on this site people show writing to the ppi registers directly. Do not write to the register directly when running a soft device. It won't work.
static void gpiote_sdtask_init(void)
{
NRF_GPIOTE->CONFIG[2] =((GPIOTE_CONFIG_MODE_Task << GPIOTE_CONFIG_MODE_Pos) |(20 << GPIOTE_CONFIG_PSEL_Pos) |(GPIOTE_CONFIG_POLARITY_Toggle << GPIOTE_CONFIG_POLARITY_Pos) |(GPIOTE_CONFIG_OUTINIT_Low << GPIOTE_CONFIG_OUTINIT_Pos));
sd_ppi_channel_assign(2, &(NRF_RADIO->EVENTS_READY), &(NRF_GPIOTE->TASKS_SET[2]));
sd_ppi_channel_assign(3, &(NRF_RADIO->EVENTS_DISABLED), &(NRF_GPIOTE->TASKS_CLR[2]));
sd_ppi_channel_enable_set(PPI_CHEN_CH2_Msk);
sd_ppi_channel_enable_set(PPI_CHEN_CH3_Msk);
}