Not able to upload to custom SAMD21 board through FTDI USB-Serial

Hi,

I am trying to program a custom SAMD21G18 board based on the Arduino Zero. I'm using an FT2232 connected to the SAMDs sercom4 on ports PB10 and PB11, and I wish to program the microcontroller through it. I have burnt the bootloader using an Atmel Ice, and with it, I can upload sketches, but when I try to upload through USB it says this:

PORTS {COM3, COM4, COM5, } / {COM3, COM4, COM5, } => {}
Uploading using selected port: COM5
C:\Users\***\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0-arduino3/bossac.exe -i -d --port=COM5 -U true -i -e -w -v C:\Users\***\AppData\Local\Temp\arduino_build_285677/main.ino.bin -R 
Set binary mode
No device found on COM5
Send auto-baud
Set binary mode
An error occurred while uploading the sketch

I've tried programming it by setting the board to Arduino Zero, MKR Zero, and a custom board, but to no avail. I am also double-pressing the reset button to enter the bootloader mode before I upload. I have also verified with an oscilloscope that the SAMD21 is being sent data.

I know that the serial port works, as I can both receive and transmit data with the Serial plotter.

Would be great if someone has any suggestions, thanks for the help!

Bump

Never mind, I figured it out myself. I had the Serial port connected to PB10 and PB11 which are using SERCOM4. I therefore had to modify the bootloader by changing it from

#define BOOT_USART_MODULE                 SERCOM0
#define BOOT_USART_BUS_CLOCK_INDEX        PM_APBCMASK_SERCOM0
#define BOOT_USART_PER_CLOCK_INDEX        GCLK_CLKCTRL_ID_SERCOM0_CORE_Val
#define BOOT_USART_PAD_SETTINGS           UART_RX_PAD3_TX_PAD2
#define BOOT_USART_PAD3                   PINMUX_PA11C_SERCOM0_PAD3
#define BOOT_USART_PAD2                   PINMUX_PA10C_SERCOM0_PAD2
#define BOOT_USART_PAD1                   PINMUX_UNUSED
#define BOOT_USART_PAD0                   PINMUX_UNUSED
#define BOOT_USART_MODULE                 SERCOM4
#define BOOT_USART_BUS_CLOCK_INDEX        PM_APBCMASK_SERCOM4
#define BOOT_USART_PER_CLOCK_INDEX        GCLK_CLKCTRL_ID_SERCOM4_CORE_Val
#define BOOT_USART_PAD_SETTINGS           UART_RX_PAD3_TX_PAD2
#define BOOT_USART_PAD3                   PINMUX_PB11D_SERCOM4_PAD3
#define BOOT_USART_PAD2                   PINMUX_PB10D_SERCOM4_PAD2
#define BOOT_USART_PAD1                   PINMUX_UNUSED
#define BOOT_USART_PAD0                   PINMUX_UNUSED

in board_definitions_arduino_zero.h.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.