The "official" software is also called SAM-BA, and is a large complicated TCL/TK application. ![]() Once you have the SAM-BA bootloader started, and can talk to it either through the native USB port directly to the SAM3X8E, or via the programming port with the ATMEGA16U2 acting as a USB-to-serial adapter, you need some software that sends your binary to the chip in an appropriate format. Of course, in addition to these methods, you can use JTAG or SWD to program the chip directly, but this requires a JTAG or SWD programmer and extra connections which is more of a pain. But little is lost so it doesn't really matter. Since we will not be using Arduino's code, this method will not work with mBed (without extra effort at least). The second is using the native port - when you compile an Arduino program it links in extra code which monitors for a 1200 baud rate on the native port's USB serial port and reboots into the SAM-BA bootloader so it acts identically to the programming port. The first is to use the programming port - when the ATMEGA16U2's USB serial port is opened and closed at 1200 baud it asserts the ERASE pin. To reset the chip without having to press the button, there are two software methods. The SAM3X8E can be programmed via either communication channel. The UART is connected to an interface chip on the Due - an ATMEGA16U2, which provides the "programming" port on the Due. Either of those can be used to program the chip. Once the SAM-BA bootloader is running it starts a USB CDC (USB serial) device up on the serial port (the "native USB" port on the Due), and also monitors its UART pins for connections. This can be done by pressing the erase button on the Due, or via software (described later). The SAM3X8E comes with a factory-programmed ROM containing a bootloader called SAM-BA which is run when the ERASE pin is asserted during a reset. The Arduino Due actually has two methods for programming the chip. The Arduino Due does have an interface chip that is used for programming, but it is not loaded with the mBed interface firmware so it must be programmed in a different way. Traditional mBed boards feature an "interface chip" which provides the USB Mass Storage interface to the computer to receive your program binary, and then programs the target chip (e.g. As far as I can tell all existing mBed platforms only support USB Full Speed (12 MHz). The main reason is that the SAM3X8E is one of the very few (perhaps only?) chips that supports USB High Speed (480 MHz). You might ask why I would want to do this, given the huge range of cheaper mBed platforms that already exist. That chip is a Cortex M3 which runs at 84 MHz with 512 kB of flash and 100 kB of SRAM. ![]() ![]() This page is documentation of my efforts to add mBed support for the Arduino Due board, which is based on the Atmel SAM3X8E chip.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |