Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DTM and Radio Test - Fix EGU configuration #12058

Merged
merged 2 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions samples/bluetooth/direct_test_mode/src/dtm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1100,8 +1100,7 @@ static void errata_191_handle(bool enable)
static void radio_ppi_clear(void)
{
nrfx_gppi_channels_disable(BIT(dtm_inst.ppi_radio_start));
nrf_egu_event_clear(DTM_EGU,
nrf_egu_event_address_get(DTM_EGU, DTM_EGU_EVENT));
nrf_egu_event_clear(DTM_EGU, DTM_EGU_EVENT);

/* Break connection from timer to radio to stop transmit loop */
nrfx_gppi_event_endpoint_clear(dtm_inst.ppi_radio_start,
Expand Down Expand Up @@ -1184,10 +1183,8 @@ static void dtm_test_done(void)
static void radio_start(bool rx, bool force_egu)
{
if (IS_ENABLED(CONFIG_FEM) || force_egu) {
nrf_egu_event_clear(DTM_EGU,
nrf_egu_event_address_get(DTM_EGU, DTM_EGU_EVENT));
nrf_egu_task_trigger(DTM_EGU,
nrf_egu_task_address_get(DTM_EGU, DTM_EGU_TASK));
nrf_egu_event_clear(DTM_EGU, DTM_EGU_EVENT);
nrf_egu_task_trigger(DTM_EGU, DTM_EGU_TASK);
} else {
/* Shorts will start radio in RX mode when it is ready */
nrf_radio_task_trigger(NRF_RADIO, rx ? NRF_RADIO_TASK_RXEN : NRF_RADIO_TASK_TXEN);
Expand Down
3 changes: 1 addition & 2 deletions samples/peripheral/radio_test/src/radio_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,7 @@ static int fem_configure(bool rx, nrf_radio_mode_t mode,
static void radio_start(bool rx, bool force_egu)
{
if (IS_ENABLED(CONFIG_FEM) || force_egu) {
nrf_egu_task_trigger(RADIO_TEST_EGU,
nrf_egu_task_address_get(RADIO_TEST_EGU, RADIO_TEST_EGU_TASK));
nrf_egu_task_trigger(RADIO_TEST_EGU, RADIO_TEST_EGU_TASK);
} else {
nrf_radio_task_trigger(NRF_RADIO, rx ? NRF_RADIO_TASK_RXEN : NRF_RADIO_TASK_TXEN);
}
Expand Down
Loading