[SOLVED] Segger VCOM used as debug port

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

  • [SOLVED] Segger VCOM used as debug port

    Hi,
    I'm using a jLink EDU debugger with my stm32f411re mcu; I recently discovered the VCOM feature and I'm wondering if I use it as a debug UART for my firmware instead of use a hw UART from mcu. In other words I'd like to print on this VCOM port debug message from my code and see them on a PC. Is it possible or the VCOM feature have another issue ?
    Regards
  • Hello,

    Thank you for your inquiry.
    Could you provide your J-Link EDU serial number for reference?
    In what context are you using the J-Link? I wonder as you registered with a company name.

    Generally all our current J-Link debug probes come with a VCOM feature.

    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,

    Please note that the J-Link EDU must not be used in a commercial environment as this would violate the licensing terms.
    As you registered with your company e-mail address we have to assume that this project is violating the license terms.
    Please understand that under this circumstances we can't provide the requested information.
    See here for more information about licensing:
    segger.com/products/debug-probes/j-link/models/j-link-edu/

    Do you have some other commercial J-Link at your disposal?

    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.
  • Neither the Wiki nor the J-Link manual says how to access this feature from the firmware side.

    ie, how does the embedded target code send stuff to the "VCOM", and how does the embedded target code receive stuff from the "VCOM" :?:
  • Oh, I see - it's here:



    So you just connect it to the Target's hardware UART pins.

    Which answers the OP question:

    DUrbano wrote:

    I'm wondering if I use it as a debug UART for my firmware instead of use a hw UART from mcu
    No - you can't do that.

    That page says you can't do JTAG simultaneously (because it steals one of the pins) - but, presumably, you can still do SWD debugging ?
  • Correct, VCOM can be used in combination with SWD as target interface, only.
    For further / detailed information regarding VCOM, please refer to the following wiki-article:
    wiki.segger.com/Using_J-Link_VCOM_functionality

    Best regards
    Erik
    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.
  • SEGGER - Erik wrote:

    For further / detailed information regarding VCOM, please refer to the following wiki-article:
    wiki.segger.com/Using_J-Link_VCOM_functionality
    That's the article I linked earlier!

    It really doesn't answer my questions:

    • It focuses entirely on the host end - It's not at all clear how the feature is actually used at the Target end;
    • It's not very clear that you still have full use of SWD debug;
    • It says nothing about JTAG.
  • First, thanks for your feedback.

    We always highly appreciate users feedback because it helps us to improve our software, products and of course also our documentations.


    Regarding1:
    The target side is 100% up to the customer.
    All data send from the target to the Rx pin of the J-Link is forwarded to the Rx of the VCOM port.
    All data received from the Tx of the VCOM port are forwarded by the J-Link via the Tx pin to the target.
    What the target does with the data received via J-Link Tx pin is up the user.
    What the target send to the J-Link Rx pin is also up to the user.

    Regarding2:

    Not sure what you mean with "full use" SWD. SWD does either work or it does not.
    As the article says that you can use VCOM with SWD, it implicitly says that SWD does work.
    If there would be any limitations (e.g. speed), they would be mentioned.


    Regarding3:
    Yes, because JTAG is not supported (SWD only).
    It also does not mention all other interfaces (e.g. cJTAG, ICSP, FINE, C2) because "SWD only" implicitly says that all other target interfaces are not supported.

    Right now, we had no inquiry regarding the points you mentioned although many of our customers are already using the VCOM successfully for years.
    We do not see the necessity to extend / change the article at this moment but I added this to our "To Be Reviewed" list.

    Thanks,
    Erik
    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.