AN4989 Rev 3
87/118
AN4989
Debug through hardware exploration
117
8
Debug through hardware exploration
As a complement to software instrumentation, a user facing a non-working system may take
great advantage to monitor STM32 pin states (GPIO or clock among others) with external
tools such as oscilloscopes or logic analyzers.
This chapter presents the possibilities offered by STMicroelectronics hardware kits and
integrates a complete tutorial to setup the microcontroller clock output (MCO)
8.1
Easy pinout probing with STMicroelectronics hardware kits
All STMicroelectronics hardware kits presented in
offers easy
pinout access thanks to their Morpho or ARDUINO
®
connectors.
The coverage of the pinout by the connectors depends on the board itself as well as on the
MCU type. In most cases, a large number of GPIOs are covered.
In order to use this coverage at best, the user is advised to study the board schematics that
show the connections between the MCU pins and the connectors. In association with the
schematics, the board user manual presents the jumper and solder bridge configurations
that modify the routing of pins to connectors.
8.2 Microcontroller
clock output (MCO)
This feature allows to output one or more internal clock to one or more pins in order to
enable measurement through an external tool, typically an oscilloscope.
It can be useful in debug context in order to check that clock settings is as per expectation
and help to investigate potential error in clock tree initialization code.
8.2.1 Configuration with STM32CubeMX
In STM32CubeMX, MCO stands for master clock output. It is enabled by ticking the Master
Clock Output option in the RCC section as shown in
Figure 66. MCO pin selection in STM32CubeMX
This allocates a pin labeled RCC_MCO.
Содержание STM32 Series
Страница 46: ...Connecting to the board AN4989 46 118 AN4989 Rev 3 Figure 30 Keil hotplug step2 ...
Страница 91: ...AN4989 Rev 3 91 118 AN4989 Debug through hardware exploration 117 Figure 69 STM32F4 F7 dual MCO capabilities ...
Страница 103: ...AN4989 Rev 3 103 118 AN4989 Managing DBGMCU registers 117 Figure 78 Generator Options debug MCU in STM32CubeIDE ...