Question
stm8s active halt mode PA1 port pin issue
Posted on December 28, 2012 at 12:18
hello,
following is the short details about the objective of the program..and their after the problem what i am facing... I am using stm8s005c6t6 controller and we are using capacitive based power supply (lm7805) regulator is connected at the unregulated dc to get the 5v supply. I have connected PORTA pin 1 to drive the relay. Since relay takes 30mA of current....so when ever relay has to be switched i send the controller to active halt mode with master frequecy set to LSI 128khz and AWU with delay of 0.5S...and in the interrupt routine of AWU i will first switch off the relay and then switch the frequency to again HSI-16mhz. Problem:- when i set PA1 and goes into active halt mode, PA1 automatically goes to zero...and after AWU wakeup interrupt...PA1 come back to high state...if i use any other port instead of PA1 it works fine...but the issue is only with PA1.....i am not able to understand the problem....so finally i am using wfi() instruction instead of active halt...and then it works... can any one suggest me the cause of the problem or any other kind of solution... thanks in advance.... #stm8s-active-halt-mode