unable to debug nrf52840 USB CDC ACM built on BLE client application

I'm facing an issue to debug nrf52840 using usb cdc acm application on top of ble client application . Same result when using Fanstel based on nrf52840 connected via usb to the host as well.

  1. In most cases resetting the target force a recovery after flashing the application. - Why the target needs recovery ?
  2. When running the debugger it returns with exception, 

Core registers:

Disassembly viewer:

Using Cortex-Debug extension for vscode. launch.jason as follows:

{
    "version": "0.2.0",
    "configurations": [


        {
            "name": "Cortex Debug",
            "cwd": "${workspaceRoot}",
            "executable": "${workspaceRoot}/_build/nrf52840_xxaa.out",
            "request": "launch",
            "type": "cortex-debug",
            "servertype": "jlink",
            "device": "nrf52",
            "interface": "swd",
            "serialNumber": "",
            "armToolchainPath": "/usr/local/gcc-arm-none-eabi-6-2017-q2-update/bin",
            "svdFile": "${workspaceRoot}/modules/nrfx/mdk/nrf52840.svd",
        }
    ]
}

When I use BLE client application or USB CDC ACM application, the debugger runs without any problems



Please help !
Parents
  • Hi

    What debugger are you using exactly to debug this device? Does it support the voltage(s) you're running these boards at, and does it power the boards, or is the reason they are crashing when you remove the USB that the board/dongle no longer have enough power to run? As to why the USB port fails to open I'm not sure unfortunately. How exactly are you trying to open the USB port, and what do you see in the program/terminal you open it in?

    Best regards,

    Simon

Reply
  • Hi

    What debugger are you using exactly to debug this device? Does it support the voltage(s) you're running these boards at, and does it power the boards, or is the reason they are crashing when you remove the USB that the board/dongle no longer have enough power to run? As to why the USB port fails to open I'm not sure unfortunately. How exactly are you trying to open the USB port, and what do you see in the program/terminal you open it in?

    Best regards,

    Simon

Children
  • I'm using JLINK + Olimex ARM-JTAG 20-10 adapter , that connected to the target via SWD interface.

    The Dongle target is powered by the USB, I'm not using any external power.

    I'm opening the port using Putty on my Linux machine.- 

    I find the port using the command " ls  /dev/ttyACM* ".

    When the application is running (with no debugger) the host recognize the port with no issues,

    Else, I get this error message when trying to open it. 

    Do you think that my problem comes it low voltage when the debagging is activated? could you please elaborate more about it? and how could I test it? 

Related