I would like to set a gpio pin on Radio RX Ready and clear it on Radio Disable all via PPI. Below is my code. I only get the pin to change levels when the OUT task polarity is set to NRF_GPIOTE_POLARITY_TOGGLE. Why is this? I'm using the Set & Clear tasks explicitly, with nothing connected to the OUT task so my expectation is that this field shouldn't make a difference in operations but it does.
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
static const struct gpio_dt_spec test_pin = GPIO_DT_SPEC_GET(DT_ALIAS(test_pin), gpios);
nrfx_gpiote_init(0);
static uint8_t gpiote_channel;
nrfx_gpiote_channel_alloc(&gpiote_channel);
static const nrfx_gpiote_output_config_t output_config = {
.drive = NRF_GPIO_PIN_S0S1,
.input_connect = NRF_GPIO_PIN_INPUT_DISCONNECT,
.pull = NRF_GPIO_PIN_NOPULL,
};
const nrfx_gpiote_task_config_t task_config = {
.task_ch = gpiote_channel,
.polarity = NRF_GPIOTE_POLARITY_TOGGLE,
.init_val = 1,
};
nrfx_gpiote_output_configure(test_pin.pin, &output_config, &task_config);
nrfx_gpiote_out_task_enable(test_pin.pin);
nrf_ppi_channel_t ppi_channels[2];
nrfx_ppi_channel_alloc(&ppi_channels[0]);