diff --git a/nrf_802154/common/include/nrf_802154_config.h b/nrf_802154/common/include/nrf_802154_config.h index e170af7aba..736f03255a 100644 --- a/nrf_802154/common/include/nrf_802154_config.h +++ b/nrf_802154/common/include/nrf_802154_config.h @@ -386,16 +386,6 @@ extern "C" { #define NRF_802154_ACK_TIMEOUT_ENABLED 1 #endif -/** - * @def NRF_802154_ACK_TIMEOUT_DEFAULT_TIMEOUT - * - * The default timeout in microseconds (us) for the ACK timeout feature. - * - */ -#ifndef NRF_802154_ACK_TIMEOUT_DEFAULT_TIMEOUT -#define NRF_802154_ACK_TIMEOUT_DEFAULT_TIMEOUT 7000 -#endif - /** * @def NRF_802154_PRECISE_ACK_TIMEOUT_DEFAULT_TIMEOUT * diff --git a/nrf_802154/driver/src/mac_features/ack_generator/nrf_802154_ack_data.c b/nrf_802154/driver/src/mac_features/ack_generator/nrf_802154_ack_data.c index 1ad102e847..219e848346 100644 --- a/nrf_802154/driver/src/mac_features/ack_generator/nrf_802154_ack_data.c +++ b/nrf_802154/driver/src/mac_features/ack_generator/nrf_802154_ack_data.c @@ -120,8 +120,8 @@ static int8_t extended_addr_compare(const uint8_t * p_first_addr, const uint8_t // Compare extended address in two steps to prevent unaligned access error. for (uint32_t i = 0; i < EXTENDED_ADDRESS_SIZE / sizeof(uint32_t); i++) { - first_addr = *(uint32_t *)(p_first_addr + (i * sizeof(uint32_t))); - second_addr = *(uint32_t *)(p_second_addr + (i * sizeof(uint32_t))); + first_addr = *(const uint32_t *)(p_first_addr + (i * sizeof(uint32_t))); + second_addr = *(const uint32_t *)(p_second_addr + (i * sizeof(uint32_t))); if (first_addr < second_addr) { @@ -148,8 +148,8 @@ static int8_t extended_addr_compare(const uint8_t * p_first_addr, const uint8_t */ static int8_t short_addr_compare(const uint8_t * p_first_addr, const uint8_t * p_second_addr) { - uint16_t first_addr = *(uint16_t *)(p_first_addr); - uint16_t second_addr = *(uint16_t *)(p_second_addr); + uint16_t first_addr = *(const uint16_t *)(p_first_addr); + uint16_t second_addr = *(const uint16_t *)(p_second_addr); if (first_addr < second_addr) { diff --git a/nrf_802154/driver/src/nrf_802154_debug_gpio.c b/nrf_802154/driver/src/nrf_802154_debug_gpio.c index 5b0cf0e13d..8166072f19 100644 --- a/nrf_802154/driver/src/nrf_802154_debug_gpio.c +++ b/nrf_802154/driver/src/nrf_802154_debug_gpio.c @@ -78,15 +78,15 @@ static void radio_event_gpio_toggle_init(void) nrf_ppi_channel_endpoint_setup(NRF_PPI, (nrf_ppi_channel_t)PPI_DBG_RADIO_EVT_END, - (uint32_t)&NRF_RADIO->EVENTS_END, + nrf_radio_event_address_get(NRF_RADIO, NRF_RADIO_EVENT_END), nrf_gpiote_task_address_get(NRF_GPIOTE, NRF_GPIOTE_TASK_OUT_0)); nrf_ppi_channel_endpoint_setup(NRF_PPI, (nrf_ppi_channel_t)PPI_DBG_RADIO_EVT_DISABLED, - (uint32_t)&NRF_RADIO->EVENTS_DISABLED, + nrf_radio_event_address_get(NRF_RADIO, NRF_RADIO_EVENT_DISABLED), nrf_gpiote_task_address_get(NRF_GPIOTE, NRF_GPIOTE_TASK_OUT_1)); nrf_ppi_channel_endpoint_setup(NRF_PPI, (nrf_ppi_channel_t)PPI_DBG_RADIO_EVT_READY, - (uint32_t)&NRF_RADIO->EVENTS_RXREADY, + nrf_radio_event_address_get(NRF_RADIO, NRF_RADIO_EVENT_RXREADY), nrf_gpiote_task_address_get(NRF_GPIOTE, NRF_GPIOTE_TASK_OUT_2)); nrf_ppi_channel_enable(NRF_PPI, (nrf_ppi_channel_t)PPI_DBG_RADIO_EVT_END); diff --git a/nrf_802154/zephyr/Kconfig.nrfxlib b/nrf_802154/zephyr/Kconfig.nrfxlib index 984e734f44..f137972860 100644 --- a/nrf_802154/zephyr/Kconfig.nrfxlib +++ b/nrf_802154/zephyr/Kconfig.nrfxlib @@ -89,4 +89,15 @@ config NRF_802154_CCAIDLE_TO_TXEN_EXTRA_TIME_US configuration macro of the nRF 802.15.4 Radio Driver. Please refer to the documentation of that macro. +config NRF_802154_ACK_TIMEOUT_CUSTOM_US + int "nRF 802.15.4 ACK timeout" + default 0 + range 0 2000 + help + Set the custom value of ACK timeout in the nRF 802.15.4 Radio Driver module. + It is not recommended to change this setting for anything but testing purposes. + Setting this value too low will cause the Radio Driver to never receive ACK frames + and setting it too high will increase current consumption. Set this value to 0 to + use the default and recommended value of the ACK timeout. + endif # NRF_802154_RADIO_DRIVER || NRF_802154_SERIALIZATION