Author Topic: ATmega32u2 usb serial bootloader ??  (Read 295 times)

0 Members and 1 Guest are viewing this topic.

Offline Swaroop 21Topic starter

  • Contributor
  • Posts: 43
  • Country: in
ATmega32u2 usb serial bootloader ??
« on: July 16, 2024, 12:44:05 pm »
As per my previous post regarding the APM 2.8 Flight controller reused as a Arduino Mega. I have managed to locate the ISP pins of both the mega2560 and the 32u2. I didn't have any issue uploading the bootloader I also uploaded a blink sketch to blink the onboard led of the APM board which are connected to its PA3 pin. But had no success blinking the led even after uploading the sketch. Other thing as per the APM schematic a mux IC is used to route the uart pins from the mega2560 to either the mega32u2 or an external connector by simply pulling the PPM_PC2 pin high it will connect the uart pins from the mega32u2 to the mega2560. Now where do I find the bootloader for the 32u2 as a usb to serial converter so I can upload programs via the onboard usb rather than hooking up a usbasp programmer. Also what can be the reason for the leds not blinking with the correct pin numbers, I tried both the AVR pin number (PA3) and the arduino pin number (25) but none of them seem to blink the blue led on board where as the previous APM firmware which was in the at2560 the led were blinking when  I powered the board on. But not with Blink sketch and the Arduino Mega bootloader.
I have attached the Schematic diagram of the APM Board below:
 

Offline Andy Chee

  • Frequent Contributor
  • **
  • Posts: 853
  • Country: au
Re: ATmega32u2 usb serial bootloader ??
« Reply #1 on: July 16, 2024, 03:58:24 pm »
Now where do I find the bootloader for the 32u2 as a usb to serial converter so I can upload programs via the onboard usb rather than hooking up a usbasp programmer.
Inside the Arduino IDE development software, the bootloader can be accessed from the menu, Tools -> Burn Bootloader.

I used this video as a guide (despite the language accent):



In my scenario was a bit complicated by the lack of a programmer, so I ended up using a second functioning Arduino that was programmed with the ArduinoISP sketch.
« Last Edit: July 16, 2024, 04:04:31 pm by Andy Chee »
 

Offline Swaroop 21Topic starter

  • Contributor
  • Posts: 43
  • Country: in
Re: ATmega32u2 usb serial bootloader ??
« Reply #2 on: July 17, 2024, 05:00:24 am »
The bootloader in the video is for 16u2 not 32u2 won't it affect its working ?? or can i upload the 16u2's bootloader to 32u2 as 32u2 just has more memory so i don't think it should have any problem ??
 

Offline Andy Chee

  • Frequent Contributor
  • **
  • Posts: 853
  • Country: au
Re: ATmega32u2 usb serial bootloader ??
« Reply #3 on: July 17, 2024, 12:44:47 pm »
There should be a 32u2 bootloader in the Arduino IDE directory.  The video instructions are the same, just use the 32u2 bootloader.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf