Slide 1 Slide 2 Slide 3 Slide 4 Slide 5 Slide 6 Slide 7 Slide 8 Slide 9 Slide 10 Slide 11 Slide 12 Slide 13 Slide 14 Slide 15 Slide 16 Slide 17 Slide 18 Slide 19 Slide 20 Slide 21 Slide 22 Slide 23 Product List
Topic 8 ControlSUITE Slide 15

Instead of accessing registers using the structured register access mechanism, the designer is going to use these hardware register macros shown here. The way to use one of these is to type in hardware reg, then type in a peripheral base address. These are not just addresses like hex 800 or something like that; these are defines that can be found in the hardware underscore memmap file that is in the include directory of MWare. Then, add that to a register offset to get the actual address that one wants to access. So the peripheral register offsets can be found in the hardware underscore peripheral name header file that can also be found in the include directory of MWare. As shown here, in the first access, one is actually doing a 32-bit access. The 32-bit accesses all look like this with the hardware reg with no post fix. In the second line, the designer is actually doing only a 16-bit access, so one will see hardware reg and then that “h” after the hardware reg, so that “h” stands for half word. There is also another macro, the hw reg with a “b” after that, and that stands for byte access. All of these macro definitions can be found in the hardware underscore types header file, also in the include directory of MWare.

PTM Published on: 2013-01-08