Why can't I see the Registers in a Peripheral?
This is likely caused by the peripheral being powered-off (disabled) in the SYSCTRL register. This is the default state of most peripherals after a reset of the chip.
It is the responsibility of the application to power-on peripherals that it is using (except for those that are permanently powered, such a NVIC and SYSCTRL).
During debug, a peripherals powered state is displayed in various ways:
- In the "Peripherals" and "Memory" views the entry for the peripipheral is shaded (light-blue in XP, dark-blue in Vista).
- In the "Peripherals" and "Memory" views the tooltip for the peripheral will end with 'Disabled'.
- In the SYSCTRL register, the peripherals power bit will be set to RUNMODE_POWEROFF.
During debbug, SYSCTRL can be used to power-on individual peripherals by setting RUNMODE_POWERON in the appropriate peripheral control field:
- View the SYSCTL peripheral, by opening the "Peripherals" view, scrolling down to SYSCTRL and checking the checkbox. This will open a view of the SYSCTRL peripheral in the "Memory" window.
In the "SYSCTRL<Peripheral>" Rendering, scroll to the 'RCGCn' register.
- Tip: This can be laborious, so you can apply a filter to the view, by right-clicking and selecting 'Add Filter'. Enter 'RCGC' and just the registers beginning with that string are displayed, together with any fields.
- Find the appropriate control bit, and change it to RUNMODE_POWERON.
- The Peripheral will be enabled, and the views will be updated.
Example showing enabling the GPIOA peripheral
- Open the Peripheral View
- Show the SYSCTRL peripheral
- Set the GPIOA field to RUNMODE_POWERON
- GPIOA is now enabled in the Peripheral view
- The GPIOA peripheral and its registers