Skip to content
Snippets Groups Projects
  • Glenn Ruben Bakke's avatar
    24258cf0
    nrf: Return immediatly from mp_hal_delay_us if 0us is given · 24258cf0
    Glenn Ruben Bakke authored
    After nrfx 1.0.0 a new macro was introduced to do a common
    hardware timeout. The macro function triggers a counter of
    retries or a timeout in us. However, in many cases, like in
    nrfx_adc.c the timeout value is set to 0, leading to a infinite
    loop in mp_hal_delay_us. This patch prevents this from happening.
    
    Path of error:
    nrfx_adc.c -> NRFX_WAIT_FOR -> NRFX_DELAY_US -> mp_hal_delay_us.
    24258cf0
    History
    nrf: Return immediatly from mp_hal_delay_us if 0us is given
    Glenn Ruben Bakke authored
    After nrfx 1.0.0 a new macro was introduced to do a common
    hardware timeout. The macro function triggers a counter of
    retries or a timeout in us. However, in many cases, like in
    nrfx_adc.c the timeout value is set to 0, leading to a infinite
    loop in mp_hal_delay_us. This patch prevents this from happening.
    
    Path of error:
    nrfx_adc.c -> NRFX_WAIT_FOR -> NRFX_DELAY_US -> mp_hal_delay_us.