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 6

Perhaps the most important piece of ControlSUITE are the header files. Header files enable easy access to not only registers, but individual bit fields within registers. This makes reading or programming a register as simple as modifying a member of a structure. For example to turn on the clock to the McBSP Module type: SysCtrlRegs.PCLKCR0.bit.MCBSPENCLK = 1; or to read which modules had their clock enabled type: my_variable = SysCtrlRegs.PCLKCR0.all; How it works: Header files (*.h) define a series of structures which correspond to each module’s register set. Each header file declares a section where each module’s top level structure will reside. In the associated linker command file for the header files, each section gets linked against the memory for that peripheral. This in effect unions the register structure on top of the actual register space such that when an access is made in the structure, it points to the right spot in the memory map.

PTM Published on: 2013-01-08