[ABANDONED] Conditions for which J-LINK communication may be lost

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

  • [ABANDONED] Conditions for which J-LINK communication may be lost

    Good day,
    I'm developing an application on a board with the STM32F746 using the emWin library from ST (version 5.32).
    Lately, probably due to a bug in the firmware, the board freeze and the J-link miss the communication without entering in the hard fault handler. ?(
    The j-link log is in the attached file JLINK1.txt.
    To restart the system I need to reconnect and sometimes it is necessary to power-off/on the board because the j-link is unable to reconnect (see file JLINK2.txt).


    Could indicate what are the conditions that can lead to a loss of connection as well as lack of power?


    Actually I use the MPU configured as follow:


    Source Code

    1. static void MPU_Config (void) { MPU_Region_InitTypeDef MPU_InitStruct;
    2. /* Disable the MPU */ HAL_MPU_Disable();
    3. /* Configure the MPU attributes for SDRAM */ MPU_InitStruct.Enable = MPU_REGION_ENABLE; MPU_InitStruct.BaseAddress = 0xC0000000; MPU_InitStruct.Size = MPU_REGION_SIZE_16MB; MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS; MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE; MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE; MPU_InitStruct.Number = MPU_REGION_NUMBER0; MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL1; MPU_InitStruct.SubRegionDisable = 0x00; MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE;
    4. HAL_MPU_ConfigRegion(&MPU_InitStruct);
    5. /* Configure the MPU attributes for FLASH MEMORY */ MPU_InitStruct.Enable = MPU_REGION_ENABLE; MPU_InitStruct.BaseAddress = 0x08000000; MPU_InitStruct.Size = MPU_REGION_SIZE_512KB; MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS; MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; MPU_InitStruct.IsCacheable = MPU_ACCESS_CACHEABLE; MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE; MPU_InitStruct.Number = MPU_REGION_NUMBER1; MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; MPU_InitStruct.SubRegionDisable = 0x00; MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE;
    6. HAL_MPU_ConfigRegion(&MPU_InitStruct); /* Configure the MPU attributes for internal SRAM2 (16k for DMA transfers)*/ MPU_InitStruct.Enable = MPU_REGION_ENABLE; MPU_InitStruct.BaseAddress = 0x2004C000; MPU_InitStruct.Size = MPU_REGION_SIZE_16KB; MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS; MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE; MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE; MPU_InitStruct.Number = MPU_REGION_NUMBER2; MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL1; MPU_InitStruct.SubRegionDisable = 0x00; MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE;
    7. HAL_MPU_ConfigRegion(&MPU_InitStruct);
    8. /* Enable the MPU */ HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT);}




    Thank You very much in advance.
    Simone

    Files
    • JLINK1.txt

      (5.38 kB, downloaded 278 times, last: )
    • JLINK2.txt

      (4.15 kB, downloaded 293 times, last: )
  • Hi Simone,


    are you using low power modes in your application?


    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.
  • No, the processor is always in full power mode at maximum speed.
    I also noted a problem with a swipe list in a menu.. the system crash if the DCACHE is disabled!?!? ?( . Also in this case it is impossible to debug the error because the jlink loses the communication.



    Tell me if You need some other informations / source code.
    Thanks.
  • Hi,

    Could you please provide a J-Link logfile of a failing session?
    What you provided is not a J-Link logfile but some IAR log output.

    J-Link logfile:
    wiki.segger.com/J-Link_DLL#Enable_J-Link_Log_File


    Best regards
    Alex
    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.