Please enable JavaScript to view this site.

winIDEA Help

Version: 9.21.296

How to Suspend Peripheral devices

In this topic:

Suspend peripherals while stopped

Initialization scripts

 

 

Introduction

This chapter describes how to suspend peripheral devices. You can do this by using of:

Suspend peripherals while stopped (recommended), or

Initialization scripts.

 

 

Suspend peripherals while stopped

number1

Enable the Hardware | CPU Options | Reset | At Initialization | Suspend peripherals while stopped.

 

number2

Suspend all used peripherals via "..." button.

When this option is checked, selected peripheral functions (e.g., timers) are stopped when the application is stopped. Peripheral functions can be selected via the button ThreeDots. It is generally recommended that this option is checked, as this results in more predictable behavior of the debugged application when using these peripheral functions.

Refer to the microcontroller and architecture reference manuals for details.

 

i-icon

This option, including its peripherals list, is available for specific microcontrollers only. If not supported, the option is greyed out.

 

suspend-peripherals

 

If the option is not supported (greyed out), you can perform suspending peripheral devices by initialization scripts.

 

 

Initialization scripts

i-icon

Use of initialization scripts for suspending peripheral devices is the alternative solution; if possible, use the first option.

 

The initialization scripts for suspending peripheral devices are downloaded in the Examples directory. Note that the downloaded scripts are not available for all devices. Each initialization file contains specific microcontroller configuration, which directly affects the application behavior being debugged. Initialization file configures suspend control of the peripheral modules.

 

Warning_orange

The script may have to enable access to the peripheral to configure it, which may result in misbehaving of the application. Inspect the script to be sure of what it does.

 

 

number2

Check the Synchronize selected cores (stop/run) when possible via Hardware | CPU Options | Debugging.

 

number3

Check Synchronize this core via Hardware | CPU Options | Cores .

For all cores you want to be a part of synchronization.

 

Number4

Add an initialization script via Initialize | Initialization before Debug session | Custom | Add from workspace folder.

The initialization file is being executed by the debugger after every debug reset respectively before the debug download takes place.

 

The peripheral modules can be suspended along with the cores. To suspend the peripheral modules on a suspend signal, you need to enable some of them before they can be configured. Some peripheral modules are enabled out of reset but not all.

To summarize, for a predictable application behavior (from user point of view) in conjunction with the connected debugger, certain microcontroller logic and modules have to be pre-configured before the application can be debugged.

 

 

 

Copyright © 2024 TASKING