[SOLVED] STM32 - Generic Error when start debugging

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] STM32 - Generic Error when start debugging

    Hi

    I have a problem with a virgin STM32-F446VE.

    I want to download a programm and get always a message "Active read protected STM32 detected. ..."
    The debugger does not work, I get the following message:


    Studio Output:


    I tested do reset the STM32 with JLinkSTM32, but it does not work.


    But JLink.exe seems to work fine.


    Please...has anyone a solution do get it running with debugger for me?
  • Hi,


    which version of the J-Link software does SEGGER Embedded Studio use?
    Could you please update to the most recent version of the J-Link software & documentation pack and check if ES uses this version?

    If the Message Box does appear again, could you please take a screenshot of the complete ES session and the J-Link control panel (which opens by clicking the green J-Link icon in the tray area)?


    Best regards,
    Niklas
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hi,

    this Icon, which is located in the tray area of the Windows taskbar, next to the clock.


    Could you please take a screenshot like "ES1.JPG", with the J-Link control panel in the top right?


    Best regards,
    Niklas
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Ah...Ok, I've found it.

    Log is here:
    SEGGER J-Link V6.10c DLL Log
    DLL Compiled: Sep 28 2016 18:45:15
    Logging started @ 2016-09-30 20:59


    T0D94 000:573 JLINK_ReadMemU32(0xE000EFF0, 0x0001 Items, ...) - Data: 0x0000000D
    T0D94 000:574 JLINK_ReadMemU32(0xE000EFF4, 0x0001 Items, ...) - Data: 0x000000E0
    T0D94 000:575 JLINK_ReadMemU32(0xE000EFF8, 0x0001 Items, ...) - Data: 0x00000005
    T0D94 000:576 JLINK_ReadMemU32(0xE000EFFC, 0x0001 Items, ...) - Data: 0x000000B1
    T0D94 000:577 JLINK_ReadMemU32(0xE000EFE0, 0x0001 Items, ...) - Data: 0x0000000C
    T0D94 000:578 JLINK_ReadMemU32(0xE000EFE4, 0x0001 Items, ...) - Data: 0x000000B0
    T0D94 000:579 JLINK_ReadMemU32(0xE000EFE8, 0x0001 Items, ...) - Data: 0x0000000B
    T0D94 000:580 JLINK_ReadMemU32(0xE000EFEC, 0x0001 Items, ...) - Data: 0x00000000
    T0D94 000:581 JLINK_ReadMemU32(0xE000EFD0, 0x0001 Items, ...) - Data: 0x00000004
    T0D94 000:582 JLINK_WriteU32(0xE000EDFC, 0x01000000) - DEMCR
    T0D94 000:583 JLINK_ReadMemU32(0xE0001FF0, 0x0001 Items, ...) - Data: 0x0000000D - DWT_CID[0]
    T0D94 000:584 JLINK_ReadMemU32(0xE0001FF4, 0x0001 Items, ...) - Data: 0x000000E0 - DWT_CID[1]
    T0D94 000:585 JLINK_ReadMemU32(0xE0001FF8, 0x0001 Items, ...) - Data: 0x00000005 - DWT_CID[2]
    T0D94 000:586 JLINK_ReadMemU32(0xE0001FFC, 0x0001 Items, ...) - Data: 0x000000B1 - DWT_CID[3]
    T0D94 000:587 JLINK_ReadMemU32(0xE0001FE0, 0x0001 Items, ...) - Data: 0x00000002 - DWT_PID[0]
    T0D94 000:588 JLINK_ReadMemU32(0xE0001FE4, 0x0001 Items, ...) - Data: 0x000000B0 - DWT_PID[1]
    T0D94 000:589 JLINK_ReadMemU32(0xE0001FE8, 0x0001 Items, ...) - Data: 0x0000003B - DWT_PID[2]
    T0D94 000:590 JLINK_ReadMemU32(0xE0001FEC, 0x0001 Items, ...) - Data: 0x00000000 - DWT_PID[3]
    T0D94 000:591 JLINK_ReadMemU32(0xE0001FD0, 0x0001 Items, ...) - Data: 0x00000004 - DWT_PID4
    T0D94 000:592 JLINK_ReadMemU32(0xE0002FF0, 0x0001 Items, ...) - Data: 0x0000000D - FP_CID[0]
    T0D94 000:593 JLINK_ReadMemU32(0xE0002FF4, 0x0001 Items, ...) - Data: 0x000000E0 - FP_CID[1]
    T0D94 000:594 JLINK_ReadMemU32(0xE0002FF8, 0x0001 Items, ...) - Data: 0x00000005 - FP_CID[2]
    T0D94 000:595 JLINK_ReadMemU32(0xE0002FFC, 0x0001 Items, ...) - Data: 0x000000B1 - FP_CID[3]
    T0D94 000:596 JLINK_ReadMemU32(0xE0002FE0, 0x0001 Items, ...) - Data: 0x00000003 - FP_PID[0]
    T0D94 000:597 JLINK_ReadMemU32(0xE0002FE4, 0x0001 Items, ...) - Data: 0x000000B0 - FP_PID[1]
    T0D94 000:598 JLINK_ReadMemU32(0xE0002FE8, 0x0001 Items, ...) - Data: 0x0000002B - FP_PID[2]
    T0D94 000:599 JLINK_ReadMemU32(0xE0002FEC, 0x0001 Items, ...) - Data: 0x00000000 - FP_PID[3]
    T0D94 000:600 JLINK_ReadMemU32(0xE0002FD0, 0x0001 Items, ...) - Data: 0x00000004 - FP_PID4
    T0D94 000:601 JLINK_ReadMemU32(0xE0000FF0, 0x0001 Items, ...) - Data: 0x0000000D - ITM_CID[0]
    T0D94 000:602 JLINK_ReadMemU32(0xE0000FF4, 0x0001 Items, ...) - Data: 0x000000E0 - ITM_CID[1]
    T0D94 000:603 JLINK_ReadMemU32(0xE0000FF8, 0x0001 Items, ...) - Data: 0x00000005 - ITM_CID[2]
    T0D94 000:604 JLINK_ReadMemU32(0xE0000FFC, 0x0001 Items, ...) - Data: 0x000000B1 - ITM_CID[3]
    T0D94 000:605 JLINK_ReadMemU32(0xE0000FE0, 0x0001 Items, ...) - Data: 0x00000001 - ITM_PID[0]
    T0D94 000:606 JLINK_ReadMemU32(0xE0000FE4, 0x0001 Items, ...) - Data: 0x000000B0 - ITM_PID[1]
    T0D94 000:607 JLINK_ReadMemU32(0xE0000FE8, 0x0001 Items, ...) - Data: 0x0000003B - ITM_PID[2]
    T0D94 000:608 JLINK_ReadMemU32(0xE0000FEC, 0x0001 Items, ...) - Data: 0x00000000 - ITM_PID[3]
    T0D94 000:609 JLINK_ReadMemU32(0xE0000FD0, 0x0001 Items, ...) - Data: 0x00000004 - ITM_PID4
    T0D94 000:610 JLINK_ReadMemU32(0xE000ED00, 0x0001 Items, ...) - Data: 0x410FC241 - CPUID
    T0D94 000:611 JLINK_ReadMemU32(0xE0002000, 0x0001 Items, ...) - Data: 0x00000261
    T0D94 000:612 JLINK_ReadMemU32(0xE0001000, 0x0001 Items, ...) - Data: 0x40000001 - DWT_CTRL
    T0D94 000:613 JLINK_ReadMemU32(0xE0001000, 0x0001 Items, ...) - Data: 0x40000001 - DWT_CTRL
    T0D94 000:741 JLINK_ReadMemU32(0xE0001000, 0x0001 Items, ...) - Data: 0x40000001 - DWT_CTRL
    T0D94 000:743 JLINK_ReadMemU32(0xE0002000, 0x0001 Items, ...) - Data: 0x00000261
    T0D94 001:041 JLINK_Reset() -- Type: 0
    T0D94 002:361 JLINK_Halt()
    T0D94 002:385 JLINK_ReadMemU32(0x00000000, 0x0001 Items, ...) - Data: 0x00000000
    T0D94 002:387 JLINK_WriteU32(0xE0002000, 0x00000003)
    T0D94 002:388 JLINK_WriteU32(0xE000EDFC, 0x010007F1) - DEMCR
    T0D94 002:389 JLINK_WriteU32(0xE0001000, 0x00000001) - DWT_CTRL
    T0D94 002:390 JLINK_WriteU32(0xE0001004, 0x00000000) - DWT_CYCCNT
    T0D94 002:390 JLINK_WriteU32(0xE000ED30, 0x00000008)
    T0D94 002:391 JLINK_ReadMemU32(0xE0001038, 0x0001 Items, ...) - Data: 0x00000200 - DWT_FUNC[1]
    T0D94 002:392 JLINK_WriteU32(0xE0001038, 0x00000300) - DWT_FUNC[1]
    T0D94 002:393 JLINK_ReadMemU32(0xE0001038, 0x0001 Items, ...) - Data: 0x00000300 - DWT_FUNC[1]
    T0D94 002:394 JLINK_WriteU32(0xE0001038, 0x00000200) - DWT_FUNC[1]
    T0D94 002:656 JLINK_WriteMem(0x08000000, 0x017C Bytes, ...) - Data: 00 00 02 20 41 03 00 08 ... - In flash
    T0D94 002:661 JLINK_WriteMem(0x0800017C, 0x02A8 Bytes, ...) - Data: 80 B4 00 AF 16 4A 16 4B ... - In flash
    T0D94 002:663 JLINK_WriteMem(0x08000424, 0x0BA0 Bytes, ...) - Data: 80 B5 82 B0 00 AF 1F 4B ... - In flash
    T0D94 002:665 JLINK_WriteMem(0x08000FC4, 0x0074 Bytes, ...) - Data: 54 65 72 6D 69 6E 61 6C ... - In flash
    T0D94 003:645 JLINK_ReadMemU32(0xE0001004, 0x0001 Items, ...) - Data: 0x7BF480FE - DWT_CYCCNT
    T0D94 004:034 JLINK_GoEx(MaxEmulInsts = -1, Flags = 0x01)
    T0D94 004:658 JLINK_ReadMemU32(0xE0001004, 0x0001 Items, ...) - Data: 0x7BF480FE - DWT_CYCCNT
    T0D94 005:672 JLINK_ReadMemU32(0xE0001004, 0x0001 Items, ...) - Data: 0x7BF480FE - DWT_CYCCNT
    T0D94 006:687 JLINK_ReadMemU32(0xE0001004, 0x0001 Items, ...) - Data: 0x7BF480FE - DWT_CYCCNT
    T0D94 007:700 JLINK_ReadMemU32(0xE0001004, 0x0001 Items, ...) - Data: 0x7BF480FE - DWT_CYCCNT
    T0D94 008:715 JLINK_ReadMemU32(0xE0001004, 0x0001 Items, ...) - Data: 0x7BF480FE - DWT_CYCCNT
    T0D94 009:729 JLINK_ReadMemU32(0xE0001004, 0x0001 Items, ...) - Data: 0x7BF480FE - DWT_CYCCNT
    T0D94 010:742 JLINK_ReadMemU32(0xE0001004, 0x0001 Items, ...) - Data: 0x7BF480FE - DWT_CYCCNT
    T0D94 011:756 JLINK_ReadMemU32(0xE0001004, 0x0001 Items, ...) - Data: 0x7BF480FE - DWT_CYCCNT
    T0D94 012:770 JLINK_ReadMemU32(0xE0001004, 0x0001 Items, ...) - Data: 0x7BF480FE - DWT_CYCCNT
    And here is a screenshot from JLink-Panel, I hope it is helpfully.

    The post was edited 1 time, last by White_Fox ().

  • Hi,


    thanks for providing the log file.
    However, it seems like you (accidentally?) cropped the log - for example no device is selected in the log, but the J-Link Control panel shows that "STM32F407VE" has been selected.
    Could you please provide a J-Link log file of a SEGGER embedded Studio (ES) session?


    Best regards,
    Niklas
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Oh right...to different sessions, wrong controller. Here are the error message and control panel with the right selected target cpu.


    This is the Log taken from control panel.
    JLink Control Panel Log.txt

    Here is the Embedded Studio Log:
    JLinkLog.txt

    Please, tell me if you need more informations.
    Im really hope you can help me...

    PS: Is a hardware error probable?
    I have checked it quickly first, but who knows...

    The post was edited 1 time, last by White_Fox ().