Off-topic: Why no compiler warning for this?

Peter Dufault dufault at hda.com
Thu Oct 16 07:32:38 UTC 2014


When I have time I will try it.

More on-topic for the MPC5554 and why that code is irrelevant anyway: That snippet was derived from hacking a Freescale sample application as a prototype.  The code is building up a bit-mask for channel interrupts that spans more than one register, plus the channel indices are not consecutive with a gap at 32 through 63 (maybe for eTPUC on another member of the family or something, I don't know).

The chip has a second interface as well: there are per-channel registers that collect such control bits (interrupts, DMA, etc) and you enable the facility by setting a bit in the per-channel register.  Those per-channel control registers are indexed by the channel numbers 0 through 31 (eTPUA) and 64 through 95 (eTPUB) without any machinations.  I think the "bulk" registers used by the snippet are more for disabling everything at once.

The MPC55xx is well thought out in my opinion.  Complicated, but well thought out.
 
On Oct 15, 2014, at 09:43 , Gedare Bloom <gedare at rtems.org> wrote:

> You might like to read http://blog.regehr.org/archives/963

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




More information about the users mailing list