PIC32MZ2048EFM100 sleep mode

General discussion on mikroC PRO for PIC32.
Post Reply
Author
Message
edprog
Posts: 37
Joined: 27 Jan 2016 19:58

PIC32MZ2048EFM100 sleep mode

#1 Post by edprog » 26 Mar 2019 16:06

Hi

I am designing a low powered instrument and using the PIC32MZ. I have read mixed reviews about how hard it is to get the SLEEP function to work properly and that it is difficult to get very low power consumption. Is it better to design a hardware power off/on which the PIC is able control shutdown? If so does anyone have suitable circuit?

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: PIC32MZ2048EFM100 sleep mode

#2 Post by stefan.filipovic » 03 Apr 2019 11:27

Hi,

I'm sending you an example entering to Sleep mode and waking-up using WatchDog timer which is controlled by an external interrupt on RD0 bit.

If you'd like to continue code execution from the point where the "wait" command was executed you will need to replace __Lib_System_MZ_EF.emcl file, which you can find in the attachment, with an existing emcl file from the following path:
c:\Users\Public\Documents\Mikroelektronika\mikroC PRO for PIC32\Uses\
Please make a backup of the old one emcl file in the case something unexpected happens.

If just an MCU reset as a wake-up from sleep mode suits your needs, you should not do steps above.

I'd wrote this example for PIC32MZ2048EFH144, but it should work well with EFM100 too.

Please let me know does it works.

Kind regards,
Attachments
SleepMZ.zip
(358.64 KiB) Downloaded 92 times
Stefan Filipović

Post Reply

Return to “mikroC PRO for PIC32 General”