Skip to main content

Why do I get an error when trying to read a peripheral register? - Knowledgebase / TRACE32 PowerView - Lauterbach Support

Why do I get an error when trying to read a peripheral register?

Authors list

This usually happens when the peripheral module is accessed before its clock has been enabled.

Many microcontrollers disable peripheral clocks by default to reduce power consumption. If TRACE32 (or the application) accesses registers of a peripheral whose clock is not running, the access may result in a bus error. In TRACE32, this is typically indicated by question marks (?) instead of a register value.

Depending on the processor architecture, such an invalid access can also have more severe consequences. The access may cause a bus stall, blocking further memory accesses and potentially leaving the processor unresponsive until a reset is performed.

Therefore, before accessing a peripheral module or its registers, make sure that:

  • The peripheral clock is enabled.

  • The peripheral module has been properly initialized.

  • Any required power or reset control settings for the module are configured correctly.

After the peripheral is enabled and accessible, its registers can be safely read or modified.

Helpful Unhelpful

4 of 6 people found this page helpful

Add a comment

ID-0
To prove you are a human, please tell us the text you see in the CAPTCHA image