Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Wrong ESB resources defined in nRF5 SDK

Hi

I figured out, that the macros in nrf_esb_resources.h are wrong.

/**
 * @defgroup nrf_esb_resources ESB resources
 * @{
 * @ingroup nrf_esb
 */

#ifndef ESB_ALTERNATIVE_RESOURCES
    #define ESB_PPI_CHANNELS_USED    0x00000007uL /**< PPI channels used by ESB (not available to the application). */
    #define ESB_TIMERS_USED          0x00000004uL /**< Timers used by ESB. */
    #define ESB_SWI_USED             0x00000001uL /**< Software interrupts used by ESB. */
#else
    #define ESB_PPI_CHANNELS_USED    0x00000700uL /**< PPI channels used by ESB (not available to the application). */
    #define ESB_TIMERS_USED          0x00000001uL /**< Timers used by ESB. */
    #define ESB_SWI_USED             0x00000002uL /**< Software interrupts used by ESB. */
#endif

/** @} */

You can find the used resources (PPI, TIMER and SWI) of the ESB library in Enhanced ShockBurst User Guide.

But in nrf_esb_resources.h, PPI Channels 0, 1 and 2 are defined (0x7), instead of Channel 10, 11, 12 and 13 (0x3C00). PPI Channels 7, 8, 9 are obsolete?

The same with the timers. TIMER_2 is reserved, but TIMER_2 and TIMER_3 are used. In relation to this post (ESB obsolete macro), where the workaround with NRF_ESB_BUGFIX_TIMER  is not necessary anymore, TIMER_3 could also be removed.

/**
 * @defgroup nrf_esb_resources ESB resources
 * @{
 * @ingroup nrf_esb
 */

#define ESB_PPI_CHANNELS_USED    0x00003C00uL /**< PPI channels used by ESB (not available to the application). */
#define ESB_TIMERS_USED          0x00000004uL /**< Timers used by ESB. */
#define ESB_SWI_USED             0x00000001uL /**< Software interrupts used by ESB. */

/** @} */

Related