cancel
Showing results for 
Search instead for 
Did you mean: 

Active Halt mode

mizevel
Associate II
Posted on November 23, 2009 at 04:53

Active Halt mode

4 REPLIES 4
mizevel
Associate II
Posted on May 17, 2011 at 15:05

Hello

I'm trying to have the MCU in Active Halt mode and have it wake up by external interrupt or 512msec timeout.

I'm using a REva starter kit with:

- a REva motherboard v3.3 with RLink

- a REva STM8S208RB daughter board.

- Windows XP, Service Pack 3

- Ride Ver. 7.24.09.0251

- RKit-STM8 Ver. 2.24.09.0238

activated for 16K code.

I did the following:

during initialization of the clock -

CLK_DeInit();

CLK_HSIPrescalerConfig(CLK_PRESCALER_HSIDIV1);

CLK_FastHaltWakeUpCmd(ENABLE);

CLK->ICKR |= CLK_ICKR_LSIEN;

while (((CLK->ICKR) && 0x02) == 0)

_nop_();

Enabled interrupt from external push button, the interrupt does a XOR on output I/O pin.

just before the main loop of the application:

AWU_LSICalibrationConfig(128000);

AWU_Init(AWU_TIMEBASE_512MS ); //AWU_TIMEBASE_NO_IT);

somewhere at the main loop I put the halt command - ''_halt_();''

when the debugger reaches the command I get ''no response from the DTC, terminating debug session''.

I figured the debugger might have lost communication with the MCU, so I tried running the MCU without the debugger but there is no response when I do an external interrupt (can't see the port change value).

It would have been great if the MCU can wake up from the Active Halt mode using internal interrupt from a timer, but if I understand correctly the timers are not functioning in that mode, so AWU will have to be used. other modes just take to much power.

appreciate any help

best regards

Igal

mozra27
Associate II
Posted on May 17, 2011 at 15:05

Hi Mizevel,

Yes the timer is not working in halt mode, only AWU or externals interrupt can wakeup the MCU from Halt mode. You can try using wait for interrupt mode''_wfi_()'' in this case the timer continue working.

Concerning your case ''lost communication'' it is necessary to have the full software;)

Regards

mozra

[ This message was edited by: mozra27 on 19-11-2009 14:58 ]

mizevel
Associate II
Posted on May 17, 2011 at 15:05

Hi Mozra

What you mean to say is that I have to buy the Ride debugger in order to debug Halt mode?

if so why does the application doesn't work also when I just download it to the STM8 and have it run freely (I put XOR on an IO pin so it will change state every time it wakes up from AWU, but nothing happens)?

Thanks

Igal

mizevel
Associate II
Posted on May 17, 2011 at 15:05

The new RKit-STM8 version 2.26.09.0317 fixed the problem