Rtos problem

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi there

I am using psoc5 lp cy8c5888lti-lp097, i m able to to take my micro controller to hibernate with the help of code example which is available in Psoc creator.
I took my controller to hibernate without watchdog reset but when I am trying with WDT interrupt it reset and my code start again. I have scheduler,FreeRtos,USB,LED which i use as a heartbeat. Do i need to stop any specific interrupt or any specific settings. may be I am missing with something. below is my hibernate function it is working fine but i believe there is something which is consuming power because before hibernate my current reading is 0.033 mA and is hibernate it is 0.007 mA but in code exaple it shows 0.000 mA.

I believe i am missing with some task or interrupt or something which i need to stop before entering to hibernate.

And i want to use my this function with WDT interrupt. i use CyWdtStart(CYWDT_1024_TICKS,CYWDT_LPMODE_DISABLED);  it is still not working with my code but working absolutely fine with my code example. same API.

void Jump2Hibernate()

{  

    CyWdtClear();

    /* Prepare system clocks for the Hibernate mode */

    StopSchedulerALL();

    vTaskEndScheduler();

    //CySysTickClear();

    CySysTickDisableInterrupt();

    CyPmSaveClocks();   

    /* Switch to the Hibernate Mode */

    CyPmHibernate();

    /* Restore clocks' configuration */

    CyPmRestoreClocks();

    CySoftwareReset();

}

I am doing software reset coz i want to start my code from the beginning. if i don't do this I am not able to have an access to my USB.

Regards

Abhishek

0 Likes
1 Solution
0 Likes
3 Replies
Anonymous
Not applicable

Hi- Actually, if you have enabled WDT, you need to clear WDT before WDT time out through out the application to prevent WDT reset (not just in Jump2Hibernate ). Is that being done? For low power in Hibernate - refer the guidelines in :

http://www.cypress.com/documentation/application-notes/an77900-psoc-3-and-psoc-5lp-low-power-modes-a...

0 Likes
Anonymous
Not applicable

hi bmah

Thanks for your time and reply. i did try WDT Clear before entering to Jump2Hibernate function but i guess it is not working as my device is not in hibernate mode i am sure because i tried this in hibernate code example in that it is working fine with WDT but in my code i think it is not going in hibernate mode fully. Im using RTOS, USB Uart, Scheduler.  I am in doubt that there is something else also i need to stop before entering to Hibernate and I am not able to find that.

Thanks for the document which you shared with me, I already read that doc.I did acc to that also.

0 Likes

Hi Abhishek,

Pls refer to Power Management_Hibernate trying with watchdog timer

Thanks,
Shanmathi

0 Likes