Regression in IRQ_DIRECT_CONNECT behavior from NCS 1.7 to 1.9.1

I have an applications that was using NCS 1.7.1 in its west manifest.  I am going through the process of upgrading to 1.9.1

My application using zero latency IRQs and sets the config:

CONFIG_ZERO_LATENCY_IRQS=y
This work OK in in 1.7.1 but I get a static assertion failure in 1.9.1  
C:/ELI/machine_mailbox/nrf/lib/nrf_modem_lib/nrf_modem_os.c: In function 'read_task_create':
C:/ELI/machine_mailbox/zephyr/include/toolchain/gcc.h:61:36: error: static assertion failed: "Invalid interrupt priority. Values must not exceed IRQ_PRIO_LOWEST"
   61 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
      |                                    ^~~~~~~~~~~~~~
C:/ELI/machine_mailbox/zephyr/include/arch/arm/aarch32/irq.h:97:2: note: in expansion of macro 'BUILD_ASSERT'
   97 |  BUILD_ASSERT((flags_p & IRQ_ZERO_LATENCY) || \
      |  ^~~~~~~~~~~~
C:/ELI/machine_mailbox/zephyr/include/arch/arm/aarch32/irq.h:127:2: note: in expansion of macro '_CHECK_PRIO'
  127 |  _CHECK_PRIO(priority_p, flags_p) \
      |  ^~~~~~~~~~~
C:/ELI/machine_mailbox/zephyr/include/irq.h:112:2: note: in expansion of macro 'ARCH_IRQ_DIRECT_CONNECT'
  112 |  ARCH_IRQ_DIRECT_CONNECT(irq_p, priority_p, isr_p, flags_p)
      |  ^~~~~~~~~~~~~~~~~~~~~~~
C:/ELI/machine_mailbox/nrf/lib/nrf_modem_lib/nrf_modem_os.c:334:2: note: in expansion of macro 'IRQ_DIRECT_CONNECT'
  334 |  IRQ_DIRECT_CONNECT(NRF_MODEM_APPLICATION_IRQ,
      |  ^~~~~~~~~~~~~~~~~~
[4/22] Building C object modules/nrf/lib/nrf_modem_lib/CMakeFiles/..__nrf__lib__nrf_modem_lib.dir/nrf_modem_lib.c.obj
ninja: build stopped: subcommand failed.
The issue is :
    IRQ_DIRECT_CONNECT(NRF_MODEM_APPLICATION_IRQ,
               NRF_MODEM_APPLICATION_IRQ_PRIORITY,
               rpc_proxy_irq_handler, UNUSED_FLAGS);
in nrf_modem_os.c
NRF_MODEM_APPLICATION_IRQ is set to a value of 6 in in both version.   Maybe this has something to do w/ Zephyr changing how it checks priorities at build time?
Setting NRF_MODEM_APPLICATION_IRQ to 5  pass the assertion check.    Can someone at Nordic take a look?
Parents Reply
  • Sorry, I should have be more clear.

    in nrf_modem_os.c  in 1.9.1:

    this is what is used to set the proirity.

    NRF_MODEM_APPLICATION_IRQ_PRIORITY

    This is set in nrfxlib 1.9.1:

    /nrfconnect/sdk-nrfxlib/blob/main/nrf_modem/include/nrf_modem_platform.h

    and is hard coded to a value of 6 (which is the value I have to manually patch).

    In nrf_modem_os.c  2.0.0

    This symbol is defined:

    #define APPLICATION_IRQ_PRIORITY IRQ_PRIO_LOWEST

    which is used here:

    IRQ_DIRECT_CONNECT(APPLICATION_IRQ, APPLICATION_IRQ_PRIORITY,
    rpc_proxy_irq_handler, UNUSED_FLAGS);

    on line 371.

    This configuration builds correctly

     

    What I trying to achieve is to simply add 1.9.1 to my manifest and have a clean build.     I don't think the change was ported into 1.9.1

    Thanks,

    Eli

Children
Related