This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

identifier "APP_IRQ_PRIORITY_MID" is undefined using spi_5W_master and softdevice

I am trying to update an older application use the spi_5W_master and receive the error: (SDK11, using S210 softdevice)

:RTE\nRF_Drivers\nRF51422_xxAC\spi_5W_master.c(346): error:  #20: identifier "APP_IRQ_PRIORITY_MID" is undefined

I've traced it to app_util_platform.h  where the following is a part of the file definitions:

#ifndef SOFTDEVICE_PRESENT
    APP_IRQ_PRIORITY_HIGHEST = 0,
#endif
    APP_IRQ_PRIORITY_HIGH    = 1,
#ifndef SOFTDEVICE_PRESENT
    APP_IRQ_PRIORITY_MID     = 2,
#endif
    APP_IRQ_PRIORITY_LOW     = 3
} app_irq_priority_t;

If the softdevice is defined (which it is) APP_IRQ_PRIORITY_MID is not defined.

in spi_5W_master.c the following is present :

    NVIC_SetPriority(p_spi_instance->irq_type, APP_IRQ_PRIORITY_MID);

In the previous spi master, it was set to low if a softdevice was present.

Parents
  • Hi,

    What SDK version is that app_util_platform.h file from? This is the default from SDK 11:

    /**@brief The interrupt priorities available to the application while the SoftDevice is active. */
    typedef enum
    {
    #ifdef SOFTDEVICE_PRESENT
        APP_IRQ_PRIORITY_HIGHEST = _PRIO_SD_HIGH,
    #else
        APP_IRQ_PRIORITY_HIGHEST = _PRIO_APP_HIGH,
    #endif
        APP_IRQ_PRIORITY_HIGH    = _PRIO_APP_HIGH,
    #ifndef SOFTDEVICE_PRESENT
        APP_IRQ_PRIORITY_MID     = _PRIO_SD_LOW,
    #else
        APP_IRQ_PRIORITY_MID     = _PRIO_APP_MID,
    #endif
        APP_IRQ_PRIORITY_LOW     = _PRIO_APP_LOW,
        APP_IRQ_PRIORITY_LOWEST  = _PRIO_APP_LOWEST,
        APP_IRQ_PRIORITY_THREAD  = _PRIO_THREAD     /**< "Interrupt level" when running in Thread Mode. */
    } app_irq_priority_t;

    Best regards,
    Jørgen

Reply
  • Hi,

    What SDK version is that app_util_platform.h file from? This is the default from SDK 11:

    /**@brief The interrupt priorities available to the application while the SoftDevice is active. */
    typedef enum
    {
    #ifdef SOFTDEVICE_PRESENT
        APP_IRQ_PRIORITY_HIGHEST = _PRIO_SD_HIGH,
    #else
        APP_IRQ_PRIORITY_HIGHEST = _PRIO_APP_HIGH,
    #endif
        APP_IRQ_PRIORITY_HIGH    = _PRIO_APP_HIGH,
    #ifndef SOFTDEVICE_PRESENT
        APP_IRQ_PRIORITY_MID     = _PRIO_SD_LOW,
    #else
        APP_IRQ_PRIORITY_MID     = _PRIO_APP_MID,
    #endif
        APP_IRQ_PRIORITY_LOW     = _PRIO_APP_LOW,
        APP_IRQ_PRIORITY_LOWEST  = _PRIO_APP_LOWEST,
        APP_IRQ_PRIORITY_THREAD  = _PRIO_THREAD     /**< "Interrupt level" when running in Thread Mode. */
    } app_irq_priority_t;

    Best regards,
    Jørgen

Children
Related