Skip to main content
Denis Gottardello
Associate III
January 3, 2019
Question

Can someone explain this error?

  • January 3, 2019
  • 1 reply
  • 512 views

   NVIC->ICER[ 0 ] = 0xFFFFFFFF ;

   NVIC->ICER[ 1 ] = 0xFFFFFFFF ;

the second line emits this warning:

array subscript is above array bounds

Can someone explain?

    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    January 3, 2019

    >>Can someone explain?

    Bad compiler logic? Overzealous warning regime?

    /**
     \ingroup CMSIS_core_register
     \defgroup CMSIS_NVIC Nested Vectored Interrupt Controller (NVIC)
     \brief Type definitions for the NVIC Registers
     @{
     */
     
    /**
     \brief Structure type to access the Nested Vectored Interrupt Controller (NVIC).
     */
    typedef struct
    {
     __IOM uint32_t ISER[8U]; /*!< Offset: 0x000 (R/W) Interrupt Set Enable Register */
     uint32_t RESERVED0[24U];
     __IOM uint32_t ICER[8U]; /*!< Offset: 0x080 (R/W) Interrupt Clear Enable Register */
     uint32_t RSERVED1[24U];
     __IOM uint32_t ISPR[8U]; /*!< Offset: 0x100 (R/W) Interrupt Set Pending Register */
     uint32_t RESERVED2[24U];
     __IOM uint32_t ICPR[8U]; /*!< Offset: 0x180 (R/W) Interrupt Clear Pending Register */
     uint32_t RESERVED3[24U];
     __IOM uint32_t IABR[8U]; /*!< Offset: 0x200 (R/W) Interrupt Active bit Register */
     uint32_t RESERVED4[56U];
     __IOM uint8_t IP[240U]; /*!< Offset: 0x300 (R/W) Interrupt Priority Register (8Bit wide) */
     uint32_t RESERVED5[644U];
     __OM uint32_t STIR; /*!< Offset: 0xE00 ( /W) Software Trigger Interrupt Register */
    } NVIC_Type;

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..