Topic : Active Halt mode

Forum : ST7/STM8

Original Post
Post Information Post
November 15, 2009 - 5:01pm
Guest

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

Replies
Post Information Post
+1
0
-1
November 23, 2009 - 8:19am
Guest

The new RKit-STM8 version 2.26.09.0317 fixed the problem