Skip to main content
Visitor II
July 7, 2020
Question

LCD registers doesn't updated properly after wake up from active-halt mode in STM8L152R6 and STM8L052C6

  • July 7, 2020
  • 0 replies
  • 478 views

I am using STM8L152R6T6 and STM8L052C6 for my project.

The code wakes up from active-halt mode by RTC wake up interrupt. There is some LCD display memory (LCD_RAM) updates in RTC wake up interrupt routine.

The CPU executes this update function and some other functions. And after goes to active-halt mode again.

Although the CPU executes update function, there is not any change on display or LCD registers when i look in debug.

If I reduce system clock speed by using clock divider, problem doesn't occured. And also, when I added to code some dummy delay, this is solving the problem. BTW, I am using HSI (16 MHz)

I want to solve this problem officially, not by putting dummy delay to the code or reduce system clock speed. For instance wait for a flag.

Do you have any idea, or solution about this problem?

You can see and analyze the demo code in attachment.

    This topic has been closed for replies.