0

I am currently working on a project using an Arduino Uno (rev3) board. Eventually I might let it run independantly from Arduino and that got me thinking how the whole programming and bootloader stuff works.

Here is what I know/assume so far:

  1. The board has two chips: The ATmega328 (main chip) and the ATmega16u2 (used as a USB-to-serial bidge).

  2. The firmware of the ATmega16u2 can be changed by activating DFU-mode and using e.g. DFU-Programmer. The Arduino can then be recognized as a HDI / Midi device but is no longer programmable.

  3. When programming the ATmega328, the chip is being reset and on restart the bootloader will load and write the new program via its serial connection and the ATmega16u2-bridge. The ISP-interface of the chip is not used for uploading the new program. Who is initiating the reset in the first place?

  4. The Arduino can be used as a ISP-Programmer to program other external chips. For that some firmware is loaded onto the AATmega328 an the ISP-pins of the chip to be programmed are connected to the one on the Arduino board. Then the Arduino-IDE is configured to use the Atmega328 as a programmer rather than reprogram it.

I hope, at least most of what I have written is correct. My questions then are:

If I put a new/blank AVR onto my board, how does the bootloader get onto that chip? How does the "Burn Bootloader" command work?

Is it possible to upload a hex file to the ATmega328 WITHOUT uploading a bootloader first? Can this be done by using speciaf firmware on the ATmega16u2?

Thanks!

Johannes

4

1 回答 1

1

ISP 编程器(ArduinoISP 或诸如 USBasp 之类的分立编程器)可用于对 AVR 的闪存、EEPROM、熔丝位和锁定位进行编程,而无需预先存在引导加载程序。它使用设备上的 SPI 引脚向设备发送命令以操作非易失性存储内容。

ATmega16U2 只有 UART 连接到 '328;如果没有 '328 上的引导加载程序,就无法使用 UART 进行编程。

于 2014-04-12T19:06:09.497 回答