MPC55xx Warning for Undefined Behavior

Peter Dufault dufault at hda.com
Mon Oct 13 19:22:31 UTC 2014


On Oct 13, 2014, at 13:07 , Peter Dufault <dufault at hda.com> wrote:

> but the upper limit of loop is #defined to 479:
> 
>  #if MPC55XX_CHIP_FAMILY == 555
>    #define MPC55XX_IRQ_MAX 307U
>  #elif MPC55XX_CHIP_FAMILY == 556
>    #define MPC55XX_IRQ_MAX 360U
>  #elif MPC55XX_CHIP_FAMILY == 567
>    #define MPC55XX_IRQ_MAX 479U
>  #else
>    #error "unsupported chip type"
>  #endif
> 
> The code will go on and step on a reserved area.

This looks like an issue in the header.  I downloaded the MPC5674F Reference Manual and it does specify 479 interrupt request sources.  See table 9-2, INTC Memory Map

Base + (0x0040–0x0219)  INTC_PSRn—INTC priority select registers 2 0–479 

Peter
-----------------
Peter Dufault
HD Associates, Inc.      Software and System Engineering




More information about the devel mailing list