diff --git a/drivers/at86rf215/Kconfig b/drivers/at86rf215/Kconfig index 063bd09ab2..2c6686fe68 100644 --- a/drivers/at86rf215/Kconfig +++ b/drivers/at86rf215/Kconfig @@ -38,6 +38,17 @@ config AT86RF215_TRIM_VAL 26 MHz the best. For more information Refer Table 6-25 TRIM in Datasheet +config AT86RF215_RESET_PULSE_WIDTH_US + int "Width of the reset pulse (µs)" + range 16 1000 + default 16 + help + If your board design includes a filtering capacitor on the reset line, this raises + the rise time of the reset pulse. + To accommodate for this, select a larger reset pulse width here. + + If unsure, leave this at the default value of 16 µs. + choice prompt "Default Modulation" diff --git a/drivers/at86rf215/at86rf215_internal.c b/drivers/at86rf215/at86rf215_internal.c index 01b04c9e2f..0592d787a2 100644 --- a/drivers/at86rf215/at86rf215_internal.c +++ b/drivers/at86rf215/at86rf215_internal.c @@ -49,7 +49,7 @@ int at86rf215_hardware_reset(at86rf215_t *dev) /* trigger hardware reset */ gpio_clear(dev->params.reset_pin); - xtimer_usleep(AT86RF215_RESET_PULSE_WIDTH_US); + xtimer_usleep(CONFIG_AT86RF215_RESET_PULSE_WIDTH_US); gpio_set(dev->params.reset_pin); xtimer_usleep(AT86RF215_RESET_DELAY_US); diff --git a/drivers/at86rf215/include/at86rf215_internal.h b/drivers/at86rf215/include/at86rf215_internal.h index 9b08f85397..35da96345a 100644 --- a/drivers/at86rf215/include/at86rf215_internal.h +++ b/drivers/at86rf215/include/at86rf215_internal.h @@ -22,6 +22,7 @@ #include #include "at86rf215.h" #include "at86rf215_registers.h" +#include "board.h" #ifdef __cplusplus extern "C" { @@ -30,7 +31,9 @@ extern "C" { /** * @brief Minimum reset pulse width (tRST) in µs */ -#define AT86RF215_RESET_PULSE_WIDTH_US (16U) +#ifndef CONFIG_AT86RF215_RESET_PULSE_WIDTH_US +#define CONFIG_AT86RF215_RESET_PULSE_WIDTH_US (16U) +#endif /** * @brief The typical transition time to TRX_OFF after reset (tPOWERON) in µs