Skip to main content
Kunihiko Higashi
Associate
October 6, 2017
Question

STM32L4: Debug is NOT possible when PCROP is activated

  • October 6, 2017
  • 2 replies
  • 724 views
Posted on October 06, 2017 at 06:57

Hello,

When I enable PCROP for an area of Flash by Option byte, Debugger does not work.

It seems that Debugger has hanged up.

I use IAR EWARM as IDE.

Is it PCROP's specification that Debug is NOT possible when PCROP is activated ?

I think 

Debug work well when PCROP is activated.

But I'm not sure it is correct or not.

Could you tell me it is

PCROP's

specification or not?

If it is not 

PCROP's 

specification,

Can you guess why 

Debugger has hanged up when I

enable PCROP?

Thanks in advance,

K.Higashi

    This topic has been closed for replies.

    2 replies

    Tilen MAJERLE
    ST Employee
    October 6, 2017
    Posted on October 06, 2017 at 07:22

    Dear

    kunihiko_higashi

    ‌,

    please check application noteAN4758, section 2.4.5.

    Best regards,

    Tilen

    Kunihiko Higashi
    Associate
    October 9, 2017
    Posted on October 09, 2017 at 03:48

    Dear Tilen MAJERLE,

    Thank you for your reply.

    I checked AN4758, but I could not solve the problem yet.

    So, let me explain the problem more details.

    The following is the problem....

    I'm using Nucleo-L476RG and EWARM as IDE.

    In order to set PCROP, I execute the program below.

         HAL_FLASHEx_OBProgram()   // for setting Option byte

         HAL_FLASH_OB_Launch()       // for executing option byte loading

    Then, Break instruction does not work.

    It seems that Debugger(EWARM) has hanged up, so I must do forced termination to Debugger.

    I don't understand why debugger has hanged up.

    Do I need any missing functions to solve the above problem?

    Thanks in advance,

    K. Higashi