This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Incorrect PDC address definitions in ATSAM3S4.h file

While using Keil MDK-ARM and uVision, version 4.53, I have found a bug in the processor's header file, namely, AT91SAM3S4.H for Atmel's SAM3S microcontroler family.

This bug has to do with PDC register's definition.
The header file defines a structure named "Pdc", which describes the PDC's common register mapping for all peripherals, which is supposed to bind to the corresponding peripheral's PDC offset address, which is always at offset 100hex from the peripheral's base address.

The problem is that the "Pdc" structure that is declared in this header file contains, besides the PDC's registers definition, a "Reserved1" field at the top of the structure, which also provides this 100hex bytes offset, as if this structure was intended to point to the peripheral's base address.
However, when the PDC's pointers are declared, they are declared pointing to the exact PDC address, causing the "Pdc" structure to be misaligned, due to the "Reserved1" field, which provides an additional 100hex bytes offset, besides the offset given during the definition.