Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Boot Loaders and Self Programming.

Status
Not open for further replies.

crashmeplease

New Member
While I am not entirely new to AVRs, something that is new to me is the Boot Loader and Self Programming features...

In a nutshell I was thinking about designing a board that has several AVRs on, and to aid this I was given a tray of surface mount AVRs.. Obviously I don't really want to put several ISP headers c/w additional circuitry on the board, plus with surface mount I can't just swap out the chips when I want to update the s/w, which is when I came across the Self Programming idea..

So basically do the Self Programming features allow you to reprogram the AVRs say by the UART or SPI bus? How does this work, would I upload the new s/w via PC to a Master AVR and then send a command to initiate an update to Slave AVRs via SPI?

Looking at the App Notes it seems much more complicated than this, and I don't want to spend forever trying to understand them to find out it doesn't suit my requirements! I am given the impression that I would have to write a custom Boot Loader etc, and surprised that nothing generic exists?

TIA :)
 
A boot loader is software programmed into the AVR flash memory that will allow the chip to accept and program additional program code from some source. The boot loader depends on the AVRs ability to program its own flash.

If you do not provide an ISP header for each processor you need to program each AVR with the bootloader prior to soldering it to the PCB. But if you mess up and overwrite a boot loader on one of the chips you will be in trouble because you have no way to reprogram the corrupted boot loader. You could buy a very expensive test clip that lets you program the chip on the PCB. I expect they are too expensive to be a possibility.

Having said that I strongly suggest you include some version of an ISP header to reflash you boot loaders.

So basically do the Self Programming features allow you to reprogram the AVRs say by the UART or SPI bus? How does this work, would I upload the new s/w via PC to a Master AVR and then send a command to initiate an update to Slave AVRs via SPI?
Keep in mind that each AVR must reprogram itself using the previously programmed boot loader. The boot loader communicates with some other device which provides the data to be programmed.

If you understand the above you can flash an AVR from an AVR or PC over most any IO channel provided you adjust the boot loader to use that channel.

3v0
 
Ahh ofc I would still need to initially program the Boot Loader, doh! Something I didn't really think about.

I will have a rethink then about using the ISP option for all the AVRs.


Ta :eek:
 
Nah I don't have that kind of cash lying around, and the project would just be a one off, thanks though I didn't know such things existed!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top