You copied the Doc URL to your clipboard.

config_check FAIL with NUMIRQ, IRQDIS or IRQLVL on Cortex-M33

Article ID: 250479135

Published date: 21 Sep 2018

Last updated: -

Applies to: Cortex-M33

Problem/Question

Why does the config_check test for Cortex-M33 sometimes report unexpected NUMIRQ and IRQLVL mismatches?

Scenario

This knowledge article is relevant to designers who have licensed the Cortex-M33 RTL and who are configuring the processor and running the Integration Kit (IK) tests.

Cortex-M33 supports a configurable number of interrupts that are specified by NUMIRQ and IRQDIS. The value of NUMIRQ specifies the interrupt number of the highest numbered interrupt line, IRQ[NUMIRQ-1]. All interrupt lines from IRQ[0] to IRQ[NUMIRQ-1] are implemented in the hardware unless they are explicitly removed by the bit pattern specified for IRQDIS.

The IK includes a config_check test that compares the actual RTL configuration in simulation against an expected configuration that you have described. The tests for the configuration of NUMIRQ, IRQDIS and IRQLVL can produce unexpected error messages in some circumstances.

Answer

The check for NUMIRQ can report the wrong value for NUMIRQ. However, this error only happens when there is a real reported mismatch on IRQDIS on the preceding lines. For example:

      IRQDIS missmatch at: 1 -     -    FAIL
      NUMIRQ        : 31 , expected 32    FAIL

The NUMIRQ test compares the expected number of IRQ lines against the sum of the actual number of IRQ lines implemented, plus the expected number of disabled IRQ lines. If the actual IRQDIS pattern does not exactly match the expected IRQDIS pattern, the mismatches are reported individually, and as shown. However, if the actual number and expected number of IRQDIS lines do not match, this mismatch also causes a false message about NUMIRQ.

The check for IRQLVL can report an incorrect value of ffffffff.

      IRQLVL        : ffffffff    (Expected 3)    -    FAIL

The IRQLVL test identifies the implemented number of IRQLVL bits by writing all 1s to NVIC_IPR0 and reading back the value to see how many bits are implemented. NUMIRQ must be at least 1, so IRQ[0] is always supported by NUMIRQ. However, if you disable IRQ[0] using IRQDIS, the value that is read back from NVIC_IPR0 is zero, which the test reports as a default failure value of -1, or 0xffffffff.

Although you can disable IRQ[0] by using IRQDIS, some of the IK tests rely on IRQ[0]. As a result, you will need to make some adjustments to the source code of the tests so that they use a different IRQ. Tests affected include 'interrupt', 'itm_trace' and 'sleep'.

Cortex-M33 is generally used in situations that require one or more interrupts, and therefore the minimum configurable value for NUMIRQ is 1 rather than 0. However, you can implement Cortex-M33 without regular interrupts, by using IRQDIS to remove all interrupt lines that are implied by NUMIRQ. But in such an implementation, it is not possible to successfully run the IK tests that require the presence of an interrupt line.

Workaround

No workaround.

Example

No example.

Related Information

None.

Was this page helpful? Yes No