[Question] STK500 Protocol v2

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

Currently I'm working on a bootloader which should emulate an STK500 board with protocol version 2.

I got everything up and running, but now I have to implement the command "CMD_PROGRAM_FLASH_ISP".
In protocol v2 http://www.atmel.com/dyn/resources/prod_documents/doc2591.pdf on page 10, there is a command description.

My problem here is cmd1, cmd2 and cmd3. I can't find any description about this commands. The are not part of "command.h" for v2.
Here is a log from AVR-Studio to _STK500:

Sending packet 03/22/2005 15:22:03.987
(5000ms) >
Message header
> 1B 0D 00 4A 0E  13  00 40  A1 06  40 4C 20  FF 00 

cmd1 = 0x40
cmd2 = 0x4C
cmd3 = 0x20

64 byte flash code
> 12 C0 2B C0 2A C0 29 C0 28 C0 27 C0 26 C0 25 C0 24 
> C0 23 C0 22 C0 21 C0 20 C0 1F C0 1E C0 1D C0 1C C0
> 1B C0 1A C0 11 24 1F BE CF E5 D4 E0 DE BF CD BF 10
> E0 A0 E6 B0 E0 E8 E5 F2 E0 02 C0 05 90 

> 91 = checksum
Sequence number 13, message size 74, checksum 145
CMD_PROGRAM_FLASH_ISP

Is processing of this commands really needed? Any ideas?[/code]

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

The description is in the mentioned AppNote. These are the commands for the ISP-Interface. For most AVRs: c1: Load prg. mem. page, c2:write prg. mem. page, c3:read prg. mem. See table "Serial programming intructions set" in the datasheet. Not needed for a bootloader.
HTH,
Martin

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

I know about the table, and I found out later, this commands are needed for real ISP programming through SPI interface. They are more or less descripted in each part XML file and app note AVR910 In-System Programming.

The bootloader is finished and works fine without.