Author Topic: ISP command auto-echo  (Read 5857 times)

Rons

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
ISP command auto-echo
« on: May 03, 2004, 11:40:19 am »
During a isp session I notice the following when reading
memory block in flash.

1. Command string sent from serial port to philips part.
2. Auto echo of command string, which must be received.
3. Same command string sent to philips part.
4. Data from flash is sent from philips part.

The part is a P89C668. Why I need to send the same command
string twice is questionable. But it always works the same way.
I felt the need to write my own flash control program under Linux
using Tcl/Tk programming language.
I would have thought that if the command checksum was not
correct the part would transmit a 'X' back. Anyway, I think it's
something I have to live with. Any comments on this subject?

I also notice that FlashMagic reads flash memory in 1k blocks.
Why this choice?

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2190
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: ISP command auto-echo
« Reply #1 on: May 03, 2004, 12:06:14 pm »
I don't know why you are having to send the command twice. Are you waiting long enough for the data to start appearing?

1k read size was a design decision.

Embedded Systems Academy, Inc.
support at esacademy dot com

Rons

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: ISP command auto-echo
« Reply #2 on: May 03, 2004, 03:55:00 pm »
I wait 1 sec after commands are sent. I monitor the transmit/receive
lines, activity is over la long time before I perform any reads.

Rons

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: ISP command auto-echo
« Reply #3 on: May 03, 2004, 04:26:25 pm »
I neglected to fully understand the data sheet. I have to send a byte
to start transmission. I don't have to resend the command string. If
I tack one additonal byte at the end of the command string things
work ok. Although I wonder if I should wait a little before a "start
transmission" byte.

Rons

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: ISP command auto-echo
« Reply #4 on: May 24, 2004, 01:16:14 pm »
I notice that the ISP commands for reading data are a little buggy.
1 K reads are ok, but the data sheets say "starting address" and
"ending address". ISP read commands that span like a 8K read do
not return all the flash data. I also noticed that the maximum size
read that is returned is 4096 bytes, which includes all the '=' & address
characters like:

0000=........

Did the flashmagic design decision for 1K reads occur because of these
limitations?

My app can post windows for all the flash blocks so I can see everything
at one time. I can also view the hex file too.

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2190
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: ISP command auto-echo
« Reply #5 on: May 24, 2004, 01:20:38 pm »
I don't recall why Flash Magic limits the reads to 1k. Sorry.

Embedded Systems Academy, Inc.
support at esacademy dot com