0

I would like to create a custom Arduino board based on the Arduino Due. Upon looking at the Due's schematics under the documentation tab there are some stuff that i do not need and removed them. the last thing that i want removed is the ATMEGA16U2. This part just takes so many components that i want it removed.

I would like to build my code using the arduino IDE and with the 16u2 gone i do not know a way how to upload my codes.

This seems to be possible since under the documentations there is a native usb port of the due that is directly connected to the SAM3X8E,

from here on out im lost what how do i upload my code to the same sam3x8E

Special tools that i have that might be usefull:

  • J-link EDU Mini

  • USB to UART

My Current draft schematics:

enter image description here

8
  • 1
    Since you have USB you just connect it to your computer. As long as the flash is blank (use the erase button) it will enter the BOSSA bootloader at powerup and you can use the Arduino IDE to upload the code as normal (or the bossac command line tool)
    – Majenko
    Dec 16, 2019 at 16:37
  • @Majenko thank you good sir, the erase button is handled by the 16u2 and without it how will i erase the flash? which means i basically can upload only 1 code and thats it, which is kinda not ideal
    – Jack
    Dec 16, 2019 at 16:44
  • 2
    You add a button (or a jumper) to your schematic.
    – Majenko
    Dec 16, 2019 at 16:45
  • @Majenko wait what ?? "Opening and closing the Native port at 1200bps" from the documentation can be done by shorting PC0 ? or im misunderstanding, can you elaborate from where to where will the jumper be connected?
    – Jack
    Dec 16, 2019 at 17:19
  • 1
    There are two ways of entering the bootloader: 1. Wipe the flash with the ERASE button (or trigger from 16U2). 2. Open the native port at 1200 baud. The latter is only possible if you have first programmed the board with a sketch with that ability in it. The most sure-fire way is to include the erase button. It should be there in the schematics already - did you erase the erase button?
    – Majenko
    Dec 16, 2019 at 17:25

1 Answer 1

1

Since you have USB you just connect it to your computer. As long as the flash is blank (use the erase button) it will enter the BOSSA bootloader at powerup and you can use the Arduino IDE to upload the code as normal (or the bossac command line tool).

There are two ways of entering the bootloader:

  1. Wipe the flash with the ERASE button (or trigger from 16U2).
  2. Open the native port at 1200 baud.

The latter is only possible if you have first programmed the board with a sketch with that ability in it. The most sure-fire way is to include the erase button.

You can either provide a physical button (as shown in the existing schematics) or a simple jumper that can be shorted when erasing is needed.

4
  • By the way, does the reset pin (PC0) need to be pulled down ?
    – Jack
    Dec 16, 2019 at 17:57
  • To erase? I can't remember. You'll have to check the datasheet.
    – Majenko
    Dec 16, 2019 at 18:26
  • 1
    It has internal pull-down resistor about 100k. So it can be left unconnected for normal operations.
    – KIIV
    Dec 16, 2019 at 22:04
  • @KIIV thanks for that !
    – Jack
    Dec 17, 2019 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.