Programming Custom SAMD21 board through Native USB

Hello to the community,

I have built a custom board based on Arduino Zero (using same MCU SAMD21G18A). I am able to program the board using the J-Link Edu debugger and using Atmel Studio 7. However, My aim is to do the programming using Arduino IDE and Native USB port and bootloader (do not want to use debugger and EDBG chip). I read other similar questions but couldn't solve the problem.

Here is what I did:

  1. Open Atmel Studio 7 and choose device programming. Got the correct device signature and voltage=3.2v (I don't get 3.3V but should be fine I guess)

  2. Download this bootloader: ArduinoCore-samd/samd21_sam_ba.bin at master · arduino/ArduinoCore-samd · GitHub

  3. Changed the BOOTPROT fuse to 0x07 so that I can program the bootloader.

  4. Programmed the bootloader and changed the fuse to 0x02.

  5. Not I connect the USB_P and USB_N of SAMD21 directly to the D+ and D- of micro USB port and GND is common.

  6. Let the Vbus and Id pin not connected. I am powering the MCU separately through the FTDI chip from the laptop.

  7. Connected the micro USB to the laptop.

  8. Now the Windows 10 OS says not able to identify the USB device. No port is coming in the device manager.

Is there something I am missing? I will be very thankful if anyone can help me out.

These are the things which I feel could be the issue:

  1. My reset is pulled up but I do not use any button to connect it to ground.

  2. I read this this in the arduino-core github: SAM_BA_BOTH_INTERFACES for enabling both USB and USART interfaces.

I am not sure if the bootloader I am using has enabled both interfaces.

Thank you. I will be happy to answer any other queries.

Try using the bootloader from one of the SAMD21 boards that doesn't have an EDBG interface, like the mkrzero or M0:

Thank you for the response! I tried both the bootloaders without the EDBG, but sadly same results.
Could reset be the issue? Do I need to pull it up externally through a resistor?

Do you have some schematics of your board?
On the reset should be a 10k pullup resistor.
Like the MKR Zero: