Simplest way to extract flash from ATMega164P

Go To Last Post
18 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello, we have developed firmware for a medical device on an ATMega164P.  It performs internal logging to flash.  We program the 164 using an AVRONE and IAR embedded workbench, and we extract the flash using the same setup, and then look at the logging information.

 

Our device is going to undergo testing by medical technicians, who, ideally, will be able to extract the flash periodically and upload it to a web server, where our client will examine the logs.  The problem is that the whole process of connecting an AVRONE and launching IAR and using it the right way may be too much for a medical technician.  

 

So my question is, what is the simplest-as-possible way to extract the flash from the ATMega164P.  Someone suggested AVRDude, but it looks like that is just software (command line, at that) and it still requires the AVRONE programmer.   Is there any simpler setup that we could specify to the client?  (They have not yet tasked us with engineering a simpler way... so for now I'm asking if there is a COTS solution.)

 

Thanks for the help!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Get a USBAsp and a copy of avrdude then wrap that in a one click batch file that does the entire thing.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh, good point the command line ability of AVRDude allows us to batch it.  

 

The AVROne is bigger and less wieldy, but is the USBAsp somehow simpler to use than the AVROne?  

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Only suggested USBAsp as they are expendable ($3 versus $600 for AVROne!) so you can buy 10 and don't worry if someone loses or screws up the first 5 - it's still only cost $15 so far ;-)

 

I've never looked but I assume avrdude knows how to drive an AVR One! ? It certainly knows about usbasp's.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Very helpful, thanks very much!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Actually, I'd lean more toward a little reporting mechanism, via UART or whatever.

 

Logging to program flash on a medical device?  Kind of scary...

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:
 reporting mechanism, via UART or whatever.

+1

 

 

riceman0 wrote:
They have not yet tasked us with engineering a simpler way

Who are, "They" ?

 

Seems like a very fundamental, glaring oversight for a recording device !!

 

surprise

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:
Seems like a very fundamental, glaring oversight for a recording device !!

Otherwise, you just end up with one of these: http://repeater-builder.com/molo...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

A few more to add to the interesting datasheet collection:

https://www.mikrocontroller.net/attachment/37410/datasheet.pdf

http://www.sigwom.com/?page_id=17

 

When in the dark remember-the future looks brighter than ever.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Logging to program flash on a medical device?  Kind of scary...

Extremely.

 

At least a dozen safer ways to do this.

 

For starters, flash should be locked down completely.

 

Second, log to a device that you can readily interface to other equipment.  SD card comes to mind.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just saw the continuing conversation.  It's actually not a recording device, it does something else and it records data about the main function to understand usage (and make improvements) during clinical trials.  The recording function will be removed afterwards.   

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

riceman0 wrote:
to understand usage (and make improvements) during clinical trials.

Indeed.  My comments still stand.  Find someplace else to log.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Find someplace else to log"

I guess I don't understand why, if it will be removed before it would become a safety issue.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

riceman0 wrote:
before it would become a safety issue

1)  "Clinical trials" don't involve people or equipment or similar?

2)  When you then disable or remove the mechanism, then don't you have to re-certify?

3)  If you log "somewhere else", then you can gather information over time, and from field unit history, and similar helpful situations

 

But suit yourself.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:
When you then disable or remove the mechanism, then don't you have to re-certify?

+1

 

Aren't there are rather strict regulations on certifying medical equipment in most countries? "We certified 0.9 but will be shipping 1.0" does not sound like it would pass...

"He used to carry his guitar in a gunny sack, or sit beneath the tree by the railroad track. Oh the engineers would see him sitting in the shade, Strumming with the rhythm that the drivers made. People passing by, they would stop and say, "Oh, my, what that little country boy could play!" [Chuck Berry]

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yep, it will be re-certified (fully re-tested) in its final implementation.  

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If 2K is enough logging space, could you swap in a mega644 and log to EEPROM, instead of risking program memory corruption ?

Mike Adams
ADI Development, Inc.
http://www.adidev.com

... When it has to actually work.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would never develop such a device.

I would never invest in such a device.

I would never let anyone I love wear such a device.

I would read with detached interest a news story covering litigation surrounding the use of such a device ;-)

 

Surely.  Surely.  Surely there is a better way which will still meet your requirements.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]