[SOLVED] VCP problem with J-Link on STM NUCLEO-F103RB

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

  • [SOLVED] VCP problem with J-Link on STM NUCLEO-F103RB

    VCP problem with J-Link on STM NUCLEO-F103RB


    Hello,


    I use different Nucleo boards reflashed with Segger Jlink.
    I have a problem with some Nucleo-F103RB boards.
    The virtual Com port does not seen to work properly.
    It works correct with STLink VCP, with Segger Jlink VCP, sometimes wrong characters are echoed back from the board.


    I have monitored the TX and RX Pin at CN3 on the debugger part,
    it seems that the idle level of the TX pin is wrong (low instead of high) an the first positive pulse of the tx signal varies.
    However if the lenght of the first positive pulse of the TX pin is long enough, charcter is received ok,
    if it is to short, wrong character is received.
    I send 'a'=0x61 charcter, sometimes i get 'X' back.


    attached two scope pictures, one with receive ok.



    best regards
    Images
    • TX_Error.png

      26 kB, 800×503, viewed 324 times
    • TX_OK.png

      26.46 kB, 800×503, viewed 331 times
  • Hello,

    Thank you for your inquiry.
    Such an issue is not known to us.
    Could you provide an example project for reproduction purposes?
    An elf file + sources or information on what character is being send out would be sufficient.

    Best regards,
    Nino
    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.
  • Hello,


    I have to say sorry,


    it is a problem with the default USART GPIO Pin configuration generated by CubeMx 5.2.1.


    Immediately after the USART RX Gpio Pin configuration the STM32F103 pulls its RX Pin low.
    Changing GPIO_InitStruct.Mode to GPIO_MODE_INPUT solves the problem.


    GPIO_InitStruct.Pin = USART_RX_Pin;
    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
    // GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
    GPIO_InitStruct.Pull = GPIO_PULLUP;
    HAL_GPIO_Init(USART_RX_GPIO_Port, &GPIO_InitStruct);


    Even with the wrong Configuration the program works with STLINK.
    ( i can measure ~2.3V on RX idle, that means STLINK pulls RX pin high and STM32F103 pulls low, STLINK wins).
    With JLink the RX Pin is low, that means Jlink does not push high (perhaps only pullup), STM32F103 pulls low, STM32F103 wins)


    this lead me to the wrong assumption, that Jlink has a problem.


    Thanks and best regards
  • Hello,

    Great to hear that you are up and running again.
    We will consider this thread as solved now.

    Best regards,
    Nino
    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.