Is the CMSIS-DAP also shown in the Windwos "devices and printers" page?
With USB-Direct programmer you are using the built-in bootloader to flash the MCU. To enter the bootloader you have to close the jumpers J2 and set jumper J3 to 2-3 (input select to USB). Board has to be plugged in using the other USB connector (CN3) and a device called USBVCOM should be shown in Windows. Powercycle or reset might be needed. Probably also change J4 to select the other USB port as power source.
I guess one of the bold is wrong.
Thanks for the help, so now I have the jumpers as follows:
J2 closed, J3 2-3, J4 2-3, and USB plugged in via CN3. USBVCOM shows up in the device manager.
However I still get the following error when I enter debug mode on Keil.
My Keil project settings are as follows:
And when I go on the CMSIS-DAP settings I see the following:
I then tried to use both the MCU and USB Direct tools to flash my .hex file but they failed to open the COM port (I set this to 4 as that's what it was before when I was using CN2 to connect).
Sorry for the probably stupid questions!
For debugging with Keil, you have to keep J2 open, J4 1-2 (power select) and connect the board via CMSIS DAP Connector (CN2).
If J2 is closed the MCU enters the internal bootloader and you can't flash/debug it from Keil. J2 open is normal operation.
USB Direct: Uses the internal bootloader and is basically used for flashing during production or recovering the MCU.
In your case COM4 for the USBVCOM is most likely not correct, because it is a different device COM4 is your debugger, COM5 (I guess) your MCUs bootloader. Properties of USBVCOM should show the correct number.
Thank you for clarifying the difference between using the bootloader methods of loading code on. Since I am trying to develop using PDL to learn more about the device I need to use Keil to load and debug my code.
The current state of the jumpers is: J1 = Open, J2 = Open. J4 = 1-2. J3 = 2-3 (though I have tried 1-2 as well with no luck!), and I connect using CN2. The device appears in Device Manager however the same error messages appear in Keil when I go to debug or load code onto my development board.
Just to test if it is the CMSIS-DAP/driver or USB-passthrough of the VM, causing the problem. Can you install the J-Link OB firmware on the onboard debugger?
After the firmware update, use the default jumper settings and after connecting the device there should be a J-Link connected to the PC.
You have to select J-Link as debugger in the Keil Project settings. And then please try to debug the MCU again.
Thank you for the help - I have sorted the issue. I was running in a VM and for some reason although the CMSIS-DAP device was showing in device manager the communication to it wasn't great. The solution was to install Windows 10 on a partition and it works fine through there. Thanks for all your help in this matter.