Hi,
SAM BA 2.18 is not working via USB (Target Port). It connects without making any changes via UART (Debug Port). Just to be specific, it is giving me an error of invalid chip ID. But I'm using SAMD21J18A (Xplained Pro board) so I suppose I do not have to make any changes and also it worked for UART so the same code should work for USB as well!