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.