Apr 03, 2020
12:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 03, 2020
12:29 AM
Hi
I use TC277 DC-Step where I have two cores running and want to put Core1 in idle state by itself.
After calling Mcu_SetMode(MCU_IDLE) from Core1, the core doesn't gets into idle state. I confirmed this by looking at REQSLP flag.
What could be that I'm missing here to put the core in IDLE state?
Thanks!
Sivakumar M.
I use TC277 DC-Step where I have two cores running and want to put Core1 in idle state by itself.
After calling Mcu_SetMode(MCU_IDLE) from Core1, the core doesn't gets into idle state. I confirmed this by looking at REQSLP flag.
What could be that I'm missing here to put the core in IDLE state?
Thanks!
Sivakumar M.
- Tags:
- IFX
4 Replies
Apr 03, 2020
05:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 03, 2020
05:42 AM
Here is a code snippet where CPU1 places itself in IDLE mode
/** \brief Idle Mode and Sleep Mode Request * In Idle Mode or Sleep Mode, these bits are cleared in response to an
* interrupt for the CPU, or when bit 15 of the corresponding CPU Watchdog
* Timer register (bit WDTCPUxSR.TIM[15]) changes from 0 to 1. In Standby
* Mode, these bits are cleared on wake-up. REQSLP maybe written only when
* either CPU or Safety ENDINIT bits are set to 0. CPU ENDINIT bit has to
* be set back after REQSLP is written for the mode transition to take place.
* In case of Safety ENDINIT, the mode transition will be issued immediately
* and does not wait till Safety ENDINIT is set back to 1 again.
*/
typedef enum
{
pmcsrx_reqslp_RequestRunMode = 0, /**< \brief Request CPU Run Mode */
pmcsrx_reqslp_RequestIdleMode = 1, /**< \brief Request CPU Idle Mode */
pmcsrx_reqslp_RequestSleepMode = 2, /**< \brief Request System Sleep Mode */
pmcsrx_reqslp_RequestStandbyMode = 3, /**< \brief Request System Standby Mode */
} PMCSRx_REQSLP_enum;
int core1_main (void)
{
IfxCpu_enableInterrupts();
/*
* !!WATCHDOG1 IS DISABLED HERE!!
* Enable the watchdog in the demo if it is required and also service the watchdog periodically
* */
IfxScuWdt_disableCpuWatchdog (IfxScuWdt_getCpuWatchdogPassword ());
uint16 cpu1Password = IfxScuWdt_getCpuWatchdogPassword();
/* Cpu sync event wait*/
IfxCpu_emitEvent(&cpuSyncEvent);
IfxCpu_waitEvent(&cpuSyncEvent, 1);
while (1)
{
IfxScuWdt_clearCpuEndinit(cpu1Password);
SCU_PMCSR1.B.REQSLP = pmcsrx_reqslp_RequestIdleMode;
IfxScuWdt_setCpuEndinit(cpu1Password);
}
return (1);
}
Apr 17, 2020
02:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 17, 2020
02:56 AM
Hi cwunder,
Currently the driver what I have is based on AUTOSAR. So I couldn't find some functions from your code snippet..
If you tell me where the following functions are located (filename), that would be helpful.
function names: IfxCpu_enableInterrupts, IfxCpu_emitEvent, IfxCpu_waitEvent, IfxScuWdt_clearCpuEndinit.
Could you also tell me the driver name and version, that you have used in your code snippet?
Thanks!
Siva.
Currently the driver what I have is based on AUTOSAR. So I couldn't find some functions from your code snippet..
If you tell me where the following functions are located (filename), that would be helpful.
function names: IfxCpu_enableInterrupts, IfxCpu_emitEvent, IfxCpu_waitEvent, IfxScuWdt_clearCpuEndinit.
Could you also tell me the driver name and version, that you have used in your code snippet?
Thanks!
Siva.
Apr 17, 2020
07:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 17, 2020
07:21 AM
Those functions are from the iLLD (Infineon Low Level Device Drivers), available on MyICP.
Apr 20, 2020
03:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 20, 2020
03:28 AM
Thanks!
I got access to the iLLDs from https://www.infineon.com/cms/en/product/promopages/aurix-development-studio/#cE
I got access to the iLLDs from https://www.infineon.com/cms/en/product/promopages/aurix-development-studio/#cE
This widget could not be displayed.