Skip to main content
andy239955_stm1
Associate III
January 22, 2008
Question

FYI: this is what happens when you accidentally set HLFCYA

  • January 22, 2008
  • 2 replies
  • 728 views
Posted on January 22, 2008 at 10:08

FYI: this is what happens when you accidentally set HLFCYA

    This topic has been closed for replies.

    2 replies

    16-32micros
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 12:22

    Hi Andy,

    You should pay attention that this mode is not allowed and is used to reduce power when operating from HSI or HSE onlya nd not using the PLL. You can refer to the reference Manual, page 31, Here below as well.

    STOne-32

    andy239955_stm1
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 12:22

    I accidentally set HLFCYA, flash access control half cycle access enable.

    All program accesses after that returned 0, at least when using HSI+PLL as the system clock.

    This first showed up as a breakpoint being hit out of order. When I continued running after the breakpoint the processor executed code sequentially until the PC wrapped around to 0.

    It took me a while to note that the disassembly window was showing 0 for all opcodes, while looking at flash directly via the memory window showed the correct program code.