Hey there.

So... you use an ad blocker. That's cool. Sometimes we do too.


But without ad revenue, we wouldn't even be here. And we might not be here much longer.

Please disable your ad blocker and click to continue.

Page 1 of 3 12 ... Last
  1. #1
    Novis619 Guest

    How to flash Atmega32u2?

    I installed the Flip software, but I do not know which .hex file to download. Or which setting to set the f-clock--whatever that is. Thanks in advance for the help.

  2. #2
    silentcircuit Guest
    The U2 is not officially supported - only the U4. I suppose if you want to try it, you would use the U4 hex and set the f-clock (which stands for frequency) to whatever your board runs at. Look at the others for reference, I don't remember how many zeros are needed at the moment, but if it's 8Mhz it'd be 80000 as opposed to 140000 for 14Mhz, for example. Assuming it's 4 zeros, I don't remember.

  3. #3
    Yngwiedis Guest
    Is not supported at all ? Because i order one development board with this chip 2 hours ago.

    Anyone know for sure ?

  4. #4
    rampage009 Guest
    atmega32u2 (BOARD JM-DB-U2) can't build with the current avr-gcc; as stated here http://dorkbotpdx.org/blog/feurig/ru...fu_based_chips
    The current avr-gcc doesnt support the atmega32u2 correctly but the code for the at90usb162 is binary compatible so the build.mcu is set to the at90usb162. But then dfu-programmer supports the correct chip and wont find the device so we use the fact that the upload.protocol argument is passed directlyalong using the -c argument and everything works fine.
    So you can try to build it with at90usb162 as the mcu and load it; this one built by me, not tested, have a try.

  5. #5
    tragedy Guest
    I don't know for sure, but I hope so as I've just ordered a few of these chips to build my own stuff.

    From what I've read, they are binary and pin compatible with the at90usb162 so you can build with them.

    I read on another page (can't find it right now) that currently AVRdude doesn't support the chip, so you can't program them unless you tell it to ignore the ID bytes on the chip. I think that's the -f or -F flag. If you're only using the first 16kb of flash that won't be a problem as you're effectively just treating the chip as a atmega16u2 which is basically the replacement for the at90usb162.

  6. #6
    Yngwiedis Guest
    Quote Originally Posted by rampage009 View Post
    atmega32u2 (BOARD JM-DB-U2) can't build with the current avr-gcc; as stated here http://dorkbotpdx.org/blog/feurig/ru...fu_based_chips

    So you can try to build it with at90usb162 as the mcu and load it; this one built by me, not tested, have a try.
    Can someone please guide me to the correct posts to find hex file for the Atmega32u2 board and instructions for how to do the flashing and the whole procedure. I can't find any confirmed info for anything

    Thank you very much and sorry for the trouble.

  7. #7
    tragedy Guest
    You can use an image built for the at90usb162. I've built my own and can confirm it works fine.

    Getting the image onto the chip is a bit trickier though. To program the chip, you'll need to build DFU-programmer from source:


    [Register or Login to view code]

    Note, you'll need to install libusb-dev to build this...

    Once you've done that, you can program your chip like this:

    [Register or Login to view code]


  8. #8
    Yngwiedis Guest
    Wait...

    I need linux for doing this ?
    I dont know anything about linux
    I am using windows...

  9. #9
    tragedy Guest
    I'm sure Atmega provide a Windows utility to flash the chips. It might well be the tool called FLIP, but I can't be 100% sure. Take a look here: http://atmel.com/dyn/products/produc...p?part_id=4602

  10. #10
    Yngwiedis Guest
    And where i will find the hex file and instructions how to flash it ?

    Please can somebody help me ?

    I have the board in my hands and i can't flash it. That's why i need help so desperately.

Page 1 of 3 12 ... Last

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in