You copied the Doc URL to your clipboard.

Why does the Cortex-M4 Integration Kit fail with different numbers of interrupts?

Information in this article applies to:

  • Cortex-M4


Why does the Cortex-M4 Integration Kit fail when there are more than 32 interrupts, or when there is a smaller, non-power-of-2 number of interrupts? Or on data value matching? Or with WICLINES < 4?


This knowledge article is of interest to designers who have licensed the Cortex-M4 processor RTL and are designing a chip that includes the processor.

Cortex-M4 versions up to r0p1-03rel1 (current at the time of writing this article) have the Integration Kit is set up to allow only specific numbers of interrupts: 1, 2, 4, 8, 16, 24 or 32. The Cortex-M4 can support any number of interrupts from 1 to to 240 (INTISR[239:0] ).

The testbench in the Integration Kit includes hardware to toggle external interrupt inputs by using a GPIO port. The GPIO is 32 bits wide, and as a result, only the first 32 bits, INTISR[31:0], can be toggled in the existing testbench.

The number of interrupts that are implemented in the Cortex-M4 is set by the NUM_IRQ parameter. The Integration Kit includes a constant, EXPECTED_NUMIRQ, which is defined in the IKConfig.h file. The implementation tests against the EXPECTED_NUMIRQ parameter by using the GPIO pins. If you set EXPECTED_NUMIRQ to more than 32, three of the tests will fail.

The three tests that fail are:

  • config_check - fails with an error message.

  • interrupt - fails with an error message.

  • speed_indicative - hangs indefinitely.

The interrupt test also fails if WICLINES is set to less than four.

The config_check test also fails with DATAVADDR1 matching included.


The testbench has a limited visibility of interrupts and it can only test interrupts that are driven by the GPIO pins. However, it should still be possible to test the actual number of interrupts against the expected number of interrupts.

The interrupt and config_check tests are also incorrectly configured to cover non-default cases of DATAVADDR1 matching and WIC_LINES.

The attached zipped tar file M4IK_update.tgz  contains updated versions of the three failing test programs. You can replace the original three failing programs in the ./tests/. directory with these updated versions:

    cp config_check_update.c config_check.c

    cp interrupt_update.c interrupt.c

    cp speed_indicative_update.c speed_indicative.c
    make clean


The tests can now be rerun to give correct results for all valid numbers of interrupts and the other settings mentioned above.





Related Information


Was this page helpful? Yes No