This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

USB issue

Hi,

I am using the NRF52840 with the usbd_ble_uart example using the latest SDK.nRF5SDK160098a08e2.

My computer (windows 7)  recognize the NRF52840 as a nRF52 USB CDC BLE Demo (COM51) and everything seems ok.

But when I use  a serial port program as YAT, Hercules or PuTTY to send message over USB to/from the device, the USB user interrupt is not working.

I saw an instruction to set the #define APP_USBD_CONFIG_EVENT_QUEUE_ENABLE to 0 and to delete the app_usbd_event_queue_process() function from the main loop and I did so, but this didn't help, the interrupt is not triggering.

Besides what is the baud rate of the USB ? I didn't find where I can change the baud rate.

I am stuck with this.

Please help

Best Regards

JK

Parents
  • Hi 

    The usbd_ble_uart example will not send anything until you send the newline character. Typically you have to enter ctrl + enter in your terminal program to send this. 

    Secondly, I believe you need to be connected to a BLE central device in order to see the data being sent. 

    Besides what is the baud rate of the USB ? I didn't find where I can change the baud rate.

    The baudrate is not really relevant when using USB, since the USB interface has a much higher bandwidth than normal UART baudrates. This means it doesn't matter what baudrate you configure the CDC comport to on the Windows side. 

    Best regards
    Torbjørn

  • Hi Torbjørn,

    Thank you for your reply.

    My device shall communicate with PC throw USB or throw BLE USB dongle, that's why I chose this specific example.

    I already modified this example where the cdc_acm_user_ev_handler and the nus_data_handler to not send the data over, instead to call some message parsing function of mine.

    so I don't need a central to check the USB, I am setting a breakpoint in the begining of cdc_acm_user_ev_handler and it's not triggering when I send something from a serial port program from PC.

    Best Regards

    JK

  • Hi JK

    I showed your trace to our USB developer, but he claimed it was hard to get enough information from a terminal trace alone. Do you have a USB sniffer available so you can do a proper USB trace?

    Have you been able to test this on Windows 10?

    Best regards
    Torbjørn

  • Hi,

    I managed to let it work, the nrf52840 communicate successfully with PC throw USB.

    But I still have a problem.

    The device works fine if I am using terminals: Docklight or puTTY.

    The device not working with terminals: Hercules or YAT.

    I am developing both sides the FW for the device and a PC SW App, and I am not managing to communicate with the board yet.

    can you please suggest a COMPORT driver for my PC App ( the code responsible for initialize opening the COMPORT and to actually communicate) ?

    and why it's not working whith Hercules or YAT Apps ?

    BR

    JK

  • Hi 

    Sorry for the slow response, it has been a busy time lately, despite the Covid situation. 

    Are you still having issues getting communication to work?

    If so please let me know if you have any updates to share, and I will set aside some time to look into this.

    Best regards
    Torbjørn

  • Hi,

    Thanks for you reply

    yea I managed to let it work.

    I just switch controls the DTR output pin, on Hercules app -> Serial Mode I choose : Data.

    And it worked.

    BR

    JK

  • Hi JK

    I am glad to hear you found a solution to the problem. I will close this case then. 

    Best regards
    Torbjørn

Reply Children
No Data
Related