Hello,
I'm playing around with the sleep/suspend feature of the U12, and noticed that the SW2 1V8 supply is remaining high when the processor goes to sleep. I thought at first that the processor was getting stuck in Sleeping2 state. However upon inspection I've found that the Asleep Power Supply State (0x0C) register has the DCDC2 bit set high (0x108002), counter to what the datasheet says it should be.
The bit is read only so I can't change it. Am I missing something? Can the DCDC2 not be disabled?
Thanks,
Red.
XS1-U12: DCDC2 (analogue supply) & Power when Asleep
-
- Member++
- Posts: 20
- Joined: Wed Feb 04, 2015 10:14 am
XS1-U12: DCDC2 (analogue supply) & Power when Asleep
Last edited by Redrat on Thu Jun 23, 2016 9:55 am, edited 1 time in total.
-
- Respected Member
- Posts: 347
- Joined: Wed Jan 27, 2016 5:21 pm
Hi RedRat - 1V8 is kept alive to keep the wake-up mechanisms running.
It shouldn't be taking a lot of power.
Cheers,
Henk
It shouldn't be taking a lot of power.
Cheers,
Henk
-
- Member++
- Posts: 20
- Joined: Wed Feb 04, 2015 10:14 am
Hi Henk,
Thanks for the answer.
So is the datasheet incorrect for the Asleep register?
Thanks,
Red
Thanks for the answer.
So is the datasheet incorrect for the Asleep register?
Thanks,
Red
-
- Respected Member
- Posts: 347
- Joined: Wed Jan 27, 2016 5:21 pm
Hi Redrat,
Yes, that looks like a mistake in the data sheet.
Cheers,
Henk
Yes, that looks like a mistake in the data sheet.
Cheers,
Henk
-
- Member++
- Posts: 20
- Joined: Wed Feb 04, 2015 10:14 am
Hello,
We're having trouble getting the power consumption of the u12 down when it's asleep. Is there an app-note or guide for low power as the datasheet is a bit ambiguous?
So far changes from default we make are; for the sleep power state we disable the clock to the XCore Tile, set DCDC 1 & 2 to PFM modulation.
However the u12 continues to draw ~4mA when asleep.
Thanks,
Red
We're having trouble getting the power consumption of the u12 down when it's asleep. Is there an app-note or guide for low power as the datasheet is a bit ambiguous?
So far changes from default we make are; for the sleep power state we disable the clock to the XCore Tile, set DCDC 1 & 2 to PFM modulation.
However the u12 continues to draw ~4mA when asleep.
Thanks,
Red
-
- Respected Member
- Posts: 347
- Joined: Wed Jan 27, 2016 5:21 pm
Hi - you will need to switch the silicon oscillator on, make sure that that goes to 32 KHz on sleep, and then switch the bias circuit and the crystal oscillator off.
Cheers,
Henk
Cheers,
Henk
-
- Member++
- Posts: 20
- Joined: Wed Feb 04, 2015 10:14 am
Hi Henk,
That's reduced the power consumption, however it is no longer entering sleep mode properly (our software pwm driven led continues to blink instead of shutting off). Here's the sleep function code:
That's reduced the power consumption, however it is no longer entering sleep mode properly (our software pwm driven led continues to blink instead of shutting off). Here's the sleep function code:
Code: Select all
unsigned da[1];
char dc[1];
//asleep power state
read_periph_32(usb_tile,6,0x0c,1,da);
da[0] |= 0x4300; // dcdc set to pfm + disable xcore clock
write_periph_32(usb_tile,6,0x0c,1,da);
//set to 32kh
dc[0]=3;
write_periph_8(usb_tile,4,1,1,dc);
//select silicon osc
dc[0]=1;
write_periph_8(usb_tile,4,0,1,dc);
//reset xcore
dc[0]=3;
write_periph_8(usb_tile,4,0,1,dc);
//disable bias and crystal
dc[0]=0;
write_periph_8(usb_tile,4,2,1,dc);
// init sleep
read_periph_32(usb_tile,6,0,1,da);
da[0]|=2;
write_periph_32(usb_tile,6,0,1,da);
while(1);
-
- Respected Member
- Posts: 347
- Joined: Wed Jan 27, 2016 5:21 pm
Hi Redrat,
I haven't got hardware to try it here, but from memory the problem is that switching oscillators is not a reliable process; it may cause the PLL to chase and cause the chip to get clocks too close together.
- when you switch the oscillator from an external Crystal oscillator to the 20 MHz Si- Oscillator, you have to issue a reset to the XCORE (bit 1 of register 0x00 of the oscillator peripheral).
- Early on in main, you check whether you are running on the Si Osc, and if so, you progress to do the rest of your switching off actions as before.
So the reset actions form two halves: one half switches you to the silicon oscillator, the other causes you to go to sleep in low power mode.
Cheers,
Henk
I haven't got hardware to try it here, but from memory the problem is that switching oscillators is not a reliable process; it may cause the PLL to chase and cause the chip to get clocks too close together.
- when you switch the oscillator from an external Crystal oscillator to the 20 MHz Si- Oscillator, you have to issue a reset to the XCORE (bit 1 of register 0x00 of the oscillator peripheral).
- Early on in main, you check whether you are running on the Si Osc, and if so, you progress to do the rest of your switching off actions as before.
So the reset actions form two halves: one half switches you to the silicon oscillator, the other causes you to go to sleep in low power mode.
Cheers,
Henk
-
- Member++
- Posts: 20
- Joined: Wed Feb 04, 2015 10:14 am
Hi Henk,
Thanks for all the help, but I'm still having trouble with switching it to the 32khz clock;
It'll sleep and wake fine on the 20Mhz clock, but it won't go to sleep if I attempt to switch it to the 32khz. I've tried switching it at various points in the process; before switching to the on-sil, after switching, after the reset, ect. But every time the chip won't reset or sleep properly. I've added idle loops to wait for the oscillator to stabilise first but those haven't helped.
I'm using register I.2 On-silicon-oscillator control and writing 3 to it (tried 2 as well). Is this correct?
I've also had a look at the a-series support on git and tried to dissect it, but I'm not sure where it switches to 32khz. I also noticed that it checks if the clock speed falls within range of the on-sil before switching it to 20mhz, is that perhaps the problem I'm having with switching to 32kz?
Thanks,
Red
Thanks for all the help, but I'm still having trouble with switching it to the 32khz clock;
It'll sleep and wake fine on the 20Mhz clock, but it won't go to sleep if I attempt to switch it to the 32khz. I've tried switching it at various points in the process; before switching to the on-sil, after switching, after the reset, ect. But every time the chip won't reset or sleep properly. I've added idle loops to wait for the oscillator to stabilise first but those haven't helped.
I'm using register I.2 On-silicon-oscillator control and writing 3 to it (tried 2 as well). Is this correct?
I've also had a look at the a-series support on git and tried to dissect it, but I'm not sure where it switches to 32khz. I also noticed that it checks if the clock speed falls within range of the on-sil before switching it to 20mhz, is that perhaps the problem I'm having with switching to 32kz?
Thanks,
Red
-
- Respected Member
- Posts: 347
- Joined: Wed Jan 27, 2016 5:21 pm
Hi Redrat,
The switch to the 32 kHz is automatic; if the right bit is set; bit 0 of the general control register.
You cannot switch is to 32 kHz yourself, since it isn't fast enough to feed the PLL.
Cheers,
Henk
The switch to the 32 kHz is automatic; if the right bit is set; bit 0 of the general control register.
You cannot switch is to 32 kHz yourself, since it isn't fast enough to feed the PLL.
Cheers,
Henk