Skocz do zawartości

Jak zaprogramować ATmega32u2


Pomocna odpowiedź

Jeśli nie masz wgranego bootloadera do programowania przez interfejs inny niż ISP, to potrzebujesz zwykły programator. Albo JTAG. ISP teraz kosztują koło 10-15 PLN. Jeden koniec łączysz z PC, drugi z mikrokontrolerem i odpalasz odpowiednią aplikację na PC.

Eee, 32u2 powinien mieć wbudowany bootloader do USB, można go programować przez USB przez dfu-util. ZTCP trzeba nacisnąć reset przez dłuższy czas, żeby wprowadzić chip w tryb bootloadera, ale sprawdź w nocie katalogowej.

7 godzin temu, deshipu napisał:

Eee, 32u2 powinien mieć wbudowany bootloader do USB, można go programować przez USB przez dfu-util. ZTCP trzeba nacisnąć reset przez dłuższy czas, żeby wprowadzić chip w tryb bootloadera, ale sprawdź w nocie katalogowej.

Czy dobrze rozumiem, ze podłączam mikrokontroler przez USB do komputera, klikam przez dłuższy czas reset i programuje w dfu-util?

16 minut temu, jahu napisał:

Czy dobrze rozumiem, ze podłączam mikrokontroler przez USB do komputera, klikam przez dłuższy czas reset i programuje w dfu-util?

Sprawdź w nocie katalogowej.

10 minut temu, deshipu napisał:

Sprawdź w nocie katalogowej.

Yyyy a jak powinno to być w niej wpisane? 😁

Znalazłem to:


Entering the Boot Loader Program
The bootloader can be executed with three different conditions:
Regular application conditions.
A jump or call from the application program. This may be initiated by a trigger such as a com- mand received via USART, or SPI interface.
Boot Reset Fuse
The Boot Reset Fuse (BOOTRST) can be programmed so that the Reset Vector is pointing to the Boot Flash start address after a reset. In this case, the Boot Loader is started after a reset. After the application code is loaded, the program can start executing the application code. Note that the fuses cannot be changed by the MCU itself. This means that once the Boot Reset Fuse is programmed, the Reset Vector will always point to the Boot Loader Reset and the fuse can only be changed through the serial or parallel programming interface.
Table 23-4. Boot Reset Fuse(1)
Note: 1. “1” means unprogrammed, “0” means programmed
23.6.3 External Hardware conditions
The Hardware Boot Enable Fuse (HWBE) can be programmed (See Table 23-5) so that upon special hardware conditions under reset, the bootloader execution is forced after reset.
Table 23-5. Hardware Boot Enable Fuse(1)
Note: 1. “1” means unprogrammed, “0” means programmed
When the HWBE fuse is enable the PD7/HWB pin is configured as input during reset and sam- pled during reset rising edge. When PD7/HWB pin is ‘0’ during reset rising edge, the reset vector will be set as the Boot Loader Reset address and the Boot Loader will be executed (See Figures 23-3).

 

Czy to jest to? Jesli tak, mógłby ktoś prościej mi to wytłumaczyć? 😁

Bądź aktywny - zaloguj się lub utwórz konto!

Tylko zarejestrowani użytkownicy mogą komentować zawartość tej strony

Utwórz konto w ~20 sekund!

Zarejestruj nowe konto, to proste!

Zarejestruj się »

Zaloguj się

Posiadasz własne konto? Użyj go!

Zaloguj się »
×
×
  • Utwórz nowe...