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

    Do you have a Win10 computer around that you can test with to see if the problem is related to the operating system?

    All my PC's are updated to Win10, so I am not able to double check this on Win7 unfortunately. 

    Best regards
    Torbjørn

  • Hi,

    Thank you for your reply.

    I am still using windows 7 and I managed to let the USB work with your usbd_ble_uart example, the data sent from the device received at PC, but I still have a problem to receive the data sent from PC to the device.

    I set a Breakpoint on the beginning of the event handler ( cdc_acm_user_ev_handler) and it never triggers.

    as I said:

    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.

    I am facing this problem with Nordic's dongle and another custom device based on nRF52840

    please can you tell what the problem is !?

    BR

    JK

Reply
  • Hi,

    Thank you for your reply.

    I am still using windows 7 and I managed to let the USB work with your usbd_ble_uart example, the data sent from the device received at PC, but I still have a problem to receive the data sent from PC to the device.

    I set a Breakpoint on the beginning of the event handler ( cdc_acm_user_ev_handler) and it never triggers.

    as I said:

    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.

    I am facing this problem with Nordic's dongle and another custom device based on nRF52840

    please can you tell what the problem is !?

    BR

    JK

Children
No Data
Related