PIC16LF15376 Sleep and interrupt issues

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
kkrause
Flowcode v5 User
Posts: 8
Joined: Fri Apr 17, 2009 7:04 pm
Has thanked: 1 time

PIC16LF15376 Sleep and interrupt issues

Post by kkrause »

I have some hardware using a PIC16LF15376 which sleeps for 64 seconds, then is meant to be woken by a pulse from a TPL5000 wake timer IC on RB0. Some measurements are made etc., then back to sleep and repeat...
I have noticed the following issues:

1) Programming INT on B0 (default pin): No wake up from Sleep or idle; no interrupt when awake (i.e. Sleep commented out).
2) Programming IOC (either polarity) on B0: No wake-up from sleep or idle; no interrupt when awake. (I also tried IOC on some other pins - no good either)
3) Programming interrupt on Timer0: Wakes from IDLE - but not from SLEEP; interrupts when sleep/idle disabled.

The way to enable idle mode when the sleep command is issued is to set CPUDOZE to 0xa0

The pulse coming from the TPL5000 wake timer is a clean, full swing (0 to 3v3) pulse, 31.25mS wide.
My design is really meant to rely on this pulse, therefore a working INT on B0 is preferred. Timer0 via idle mode would work for me, but uses more power.
My clock is HF INTOSC @32MHZ, 8MHz set to appear at CLKOUT - one observation: CLKOUT is suspended in sleep mode - contrary to what the datasheet states.
Any thoughts?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PIC16LF15376 Sleep and interrupt issues

Post by Benj »

Hello,

Looking at the datasheet I wonder if enabling the peripheral interrupts would make any difference. Looking at the block diagram it suggests it's not required but it's worth a go to see if it improves things.

Using a C icon add this to the start of your program.

Code: Select all

st_bit(INTCON,PEIE);
This is automatically done for most interrupts but not for the INT or IOC interrupts.

kkrause
Flowcode v5 User
Posts: 8
Joined: Fri Apr 17, 2009 7:04 pm
Has thanked: 1 time

Re: PIC16LF15376 Sleep and interrupt issues

Post by kkrause »

Hi,
Thanks for the advice. Unfortunately, it hasn't changed anything.
I'm doing a board respin anyway, and this issue is tempting me to change the PIC for something else - maybe the 16LF1937
In the meantime, there may be an issue with the MCU itself - I'll try to modify the board so I can assign an IOC pin other than B0 - or replace the PIC.

Thanks and regards,
Kevin

Post Reply