2017-10-24 08:43 PM
Hello Team,
This is Shivananda from Robert BOSCH. we are using SPC584Cx/SPC58ECx 32-bit MCU family (Chorus 4M).
we need to implement a feature when system in stanbymode, after 5 hours self wakeup of system should happen.
Hope using Timer/Counter concept we need to achieve 5 hours count and also using '
Smart Standby Wakeup unit� (SSWU) we can Wakeup the system.
As per reference manual I have this information
IRCOSC is also the system clock available during the STANDBY and it is placed in
STANDBY power domain.
Is it possible to implement this feature in Chorus4M???? if Pls can anyone help me in this to implement this feature.
- I need Register details which are required to achieve this
1. How to run timer in stanbymode and which and how to enable clock to run the timer.
2. After 5 hrs. of time how can I wakeup the system( which registers need to program).
Thanks and Regards,
Shiva
9739636666
#standbymode #automotive #sleep-wakeup #lowpower-sleep2017-10-25 12:47 AM
Hello Shivananda ,
To wakeup after few hours, i would use RTC Clock to trigger a wakeup.
Even if SSWU is more complicated than STANDBY SPC56 , we have some Example in SPC56 Family (SPC5Studio)
SPC560Dxx OS-Less STANDBY SRAM Test Application for Discovery
SPC560Dxx_RLA RTC Test Application for Discovery
Anyway, I am asking to the application team is such application is existing on Chorus 4M.
Best regards
Erwan
2017-10-25 03:57 AM
Thank you Erwan.
Pls let me know any use case( code) is available to achieve above functionality.
Requirement is System need to self wakeup after 5 hours. Is it possible?
2017-10-25 04:52 AM
Yes, with RTC you can put 5 hours you have just find the good Compare Value register
(RTC_APIVAL)
Best regards
Erwan
2017-10-25 11:31 PM
Yvin.Erwan
Thanks for the input.
I gone through the RTC chapter. By using set of registers in RTC we can achieve this.
But I have3 questions.
1. How to enable RTC in Standby mode or default it is enabled ?
2. Which is the clock source for RTC and How to configure it (which are the registers need to program)?
3. Is there link between RTC and SSWU? After 5 hours system needs to wakeup according to this RTC interrupt will trigger SSWU for system wakeup? I have attached the image which shows the relation.
2017-10-31 03:04 PM
Hello Shiva ,
After checking the RM , there is no PCTL associated on SPC58 Family
I think that RTC is not switched off in Low Power Mode. (STANDBY or STOP mode)
i will answer you next monday.
check the Chapter 96 for the specific registers for RTC
Best Regards
Erwan
2017-11-01 08:54 PM
Yvin.Erwan
I started coding I have put ???? in where I need support. Pls see the below code.
/* MCU registers to enable RTC */
??????
/* Clock configuration to RTC in stanbymode */
/*--------------------------------- STANDBY configuration ------------------------------------*/ PMCDIG.MISC_CTRL_REG.B.SIRC_ENB = 0; // Enable SIRC in running modes LPRCOSC.CTL.B.LPRCON_STDBY = 1; // Enable SIRC in STANDBY /*WAKEUP registers program */ WKPU.WRER.R |= 0x02; /* Enable Wakeup1 which is connected to RTC module */ /*RTC module configuration */ RTC_API.RTCS.B.RTCF = 1; // Clear the RTC flag by writing 1 RTC_API.RTCC.B.CNTEN = 0; // reset the counter RTC_API.RTCC.R = 0x80009001; //start RTC counter :CNTEN = 1 , APIEN= 1 , CLKSE = 01 , TRIG_EN = 1 used, Trigger enabled */ RTC_API.RTCVAL.R = 0x0009C400; // T=5sec OR /* In these two registers which one we should use ?????? */ RTC_API.APIVAL.R = 0x00001000; // API period =25msec /* Interrupt Handling */??????????
2017-11-06 02:43 AM
Hello Shiva ,
i have checked the IP RTC between SPC56 and SPC58
it is the same IP
1) Check the applicationSPC560Dxx_RLA RTC Test Application for Discovery
2) After init your RTC IP , Enable the interruption
INTC_PSR(SPC_RTC0_INT_NUMBER) = SPC5_RTC0_IRQ_PRIORITY;�?�?
3) Serve your interrupt
/** * @brief RTC interrupt handler. * * @isr */ IRQ_HANDLER(SPC_RTC0_HANDLER) { IRQ_PROLOGUE(); spc5xx_serve_rtc_interrupt(&RTCD1) IRQ_EPILOGUE(); } �?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?
Best regards
Erwan
________________ Attachments : rtc_lld.h.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyKp&d=%2Fa%2F0X0000000b67%2Fao5uMCQr4XIjVL9gvpPWRBqEYhq1KrmOpTaTHAxwxuQ&asPdf=falsertc_lld.c.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyL4&d=%2Fa%2F0X0000000b6A%2Frm_20OqRVf3HCILMyytShgulYkHCpH6zg3FbUGWbDFU&asPdf=false