Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
mattbudd
PostPosted: Mar 17, 2010 - 10:50 PM
Newbie


Joined: Mar 17, 2010
Posts: 2


I am trying to search about how to do this, but I must be using the wrong terms or something...was hoping someone here could point me in the right direction.

We are going to use an AVR as a slave SPI device to our main micro, and ARM Cortex M-3. Now we would like to support field upgradeability of the AVR through the SPI lines, but all I've read about is actually writing a bootloader on the AVR that talks over SPI and replaces the contents at AVR run-time,

Is there a way we can use the SPI lines to program it just like the hardware programmers (i.e. JTAGICE mkII, or the AVRISP mkII) do...using ISP or PDI? This way we wouldn't have to write a custom bootloader that lives and runs on the AVR, and the ARM Cortex could just fake being a hardware programmer.

Where would I find resources on that?
 
 View user's profile Send private message  
Reply with quote Back to top
keepcool
PostPosted: Mar 17, 2010 - 10:57 PM
Wannabe


Joined: Oct 07, 2009
Posts: 55


A bootloader is only run ounce every startup if I'm not mistaken, and it doesn't take a lot of of space and is a proven working solution.
 
 View user's profile Send private message  
Reply with quote Back to top
ka7ehk
PostPosted: Mar 17, 2010 - 11:09 PM
Raving lunatic


Joined: Nov 22, 2002
Posts: 7176
Location: Tangent, OR, USA

The standard bootloaders use serial port, but any data transport link will work. I would modify an existing loader.

You can, in theory, program it as though your ARM device is a programmer. Check the section "Memory Programming" in your AVR data sheet. It may not be a trivial undertaking but would occupy no additional space in the AVR.

Jim

_________________
Jim Wagner
Oregon Research Electronics, Consulting Div.
Tangent, OR, USA
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
clawson
PostPosted: Mar 17, 2010 - 11:32 PM
10k+ Postman


Joined: Jul 18, 2005
Posts: 33138
Location: (using avr-gcc in) Finchingfield, Essex, England

Or download the "Buttload" project and you'll see AVR code that will run on one processor to ISP an AVR. While it's written for AVR mega169 it could be ported to the M3. NXP LPC113X (Cortex M3) call SPI "SSP" in fact.

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
angelu
PostPosted: Mar 17, 2010 - 11:37 PM
Hangaround


Joined: May 28, 2006
Posts: 437
Location: Toronto, Canada

You need the reset line available as well.

George.

_________________
www.sofgel.ro/vechi
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits