background image

Implementation

Blink the LED D110:

CPU0 runs within the endless loop in 

Cpu0_Main.c

. Before it starts a toggle cycle, it waits 

for approximately 4 million CPU ticks (equals to 0x400000).

If the CPU0 is set to idle state, the code execution is halted and the CPU clock is disabled. 
This stops the toggling of the LED. 

Set/Return to/from Idle state:

The interrupt service routine defined in 

SCU_Power_Down_Idle.c

controls the CPU0, which 

alternates between run state and idle state. The static variable 

setIdle

helps to identify the 

next state of the CPU0, whether it remains in run state or is set into idle state.

If the CPU0 is in idle state and the STM interrupt event occurs then the CPU returns to run 
state.

The function 

IfxStm_Timer_acknowledgeTimerIrq()

is used to acknowledge the interrupt 

request and set the next compare value for the next interrupt event. The function can be 
found in the header 

IfxStm_Timer.h

.

6

2020-01-17

Copyright © Infineon Technologies AG 2020. All rights reserved.

Содержание SCU Power Down Idle 1

Страница 1: ...AURIX TC2xx Microcontroller Training V1 0 0 SCU_Power_Down_Idle_1 Power saving in CPU idle mode Please read the Important Notice and Warnings at the end of this document...

Страница 2: ...asks to perform and power consumption needs to be reduced In this example the System Timer periodically generates interrupts every two seconds In the Interrupt Service Routine the CPU0 is switched bet...

Страница 3: ...mption modes The Idle is specific to each CPU whereas the Sleep and Standby modes influence the complete system The System Timer STM is a free running 64 bit counter which can be used for timing appli...

Страница 4: ...Hardware setup This code example has been developed for the board KIT_AURIX_TC297_TFT_BC Step 4 2020 01 17 Copyright Infineon Technologies AG 2020 All rights reserved...

Страница 5: ...s Set the rate in Hz that refers to interrupt events per second Define the priority for the interrupt range from 0 to 255 Define the provider for interrupt service request as CPU0 CPU1 CPU2 or DMA Spe...

Страница 6: ..._Down_Idle c controls the CPU0 which alternates between run state and idle state The static variable setIdle helps to identify the next state of the CPU0 whether it remains in run state or is set into...

Страница 7: ...pilation and flashing the device verify the behavior of the LED Check if LED D110 1 is blinking equals to Run Mode or remains on off equals to Idle Mode 1 7 2020 01 17 Copyright Infineon Technologies...

Страница 8: ...www infineon com aurix expert training AURIX Development Studio is available online https www infineon com aurixdevelopmentstudio Use the Import function to get access to more code examples For questi...

Страница 9: ...the product for the intended application and the completeness of the product information given in this document with respect to such application For further information on the product technology deliv...

Отзывы: