클럭이 없거나 전원이 꺼진 경우 주변 장치의 레지스터 접근

기술노트 160909

아키텍처:

ARM

컴포넌트:

debugger

업데이트:

2018-02-28 오전 1:50

Introduction

Accessing registers in an unclocked or powered-down peripheral unit, in C-SPY, might give unexpected results.

Discussion

Accessing registers in an unclocked or powered-down peripheral unit during debugging might cause unexpected behavior. Incorrect data can be read, writes might have unexpected results or no effect. In some cases, writes or reads might cause the CPU to reset or the debug connection might be lost.

The exact behavior in such cases depends on the device implementation.

Just displaying the peripheral memory address range in the Memory window or displaying the peripheral registers in the Registers window can be enough to cause these effects.

Using custom Register groups

One way to view some registers, while avoiding accessing unclocked or powered-down peripheral registers, is to create an application-specific register group. To do that, choose View > Registers > Register User Groups Setup during a debug session. Create a User Register Group with only the registers that can be accessed without issues.

Note that you can create a combined group that contains registers from any predefined register group (for example a combination of UART and GPIO registers).

Conclusion

If accessing registers in an unclocked, powered-down or otherwise disabled peripheral unit leads to crashes or to a change in program behavior, you must take steps to avoid this. Consider these alternatives:

  • Avoid accessing the registers.
  • Ensure that the peripheral unit is enabled when C-SPY accesses register contents, for example by enabling the peripheral unit via a C-SPY macro.

For information on C-SPY macros and Register User Groups, choose Help > C-SPY Debugging guide.

All product names are trademarks or registered trademarks of their respective owners.

죄송하지만, 당사 사이트에서는 Internet Explorer를 지원하지 않습니다.보다 편안한 사이트를 위해 Chrome, Edge, Firefox 등과 같은 최신 브라우저를 사용해 주시길 부탁드립니다.