AT90USB1287 flash writing-multiple pages using Serial ISP

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

Hi,

We are using AT90USB1287 Keyboard evaluation board. We have implemented algorithm for Serial programming as specified in the data sheet chapter 29.8.1
We are facing problem in writing multiple pages of data to the Flash memory. The steps we followed to implement the algorithm are:

Writing one Page data:
1. Sent the “Programming Enable” command to the AT90USB1287 controller successfully (received 0x53 when issued the third byte of the command).
2. Issued “Chip Erase” command.
3. Sent the “Load Extended Address Byte” command with the third byte as 0x00 ( extended address byte c: 0x00).
4. Using the “Load Program Memory Page” instruction sent 64 words( 128 bytes) to the controller, following the order of sending low Data byte first and High Data byte next.
5. Sent the “Write Program Memory Page” instruction with second byte as 0x00 (a: 0x00) and third byte as (b: 00)
6. Using the “Poll RDY/BSY” command waited till writing is complete.
7. Verified using Atmel AVR studio and JTAG MKII ICE, observed that the data is written successfully to Flash memory.

Writing Two Pages data: following the above steps upto 6 and then

8. For first page, Issued the “Write Program Memory Page” instruction with second byte as 0x00 (a: 0x00) and third byte as (b: 00)
9. For second page, Issued the “Write Program Memory Page” instruction with second byte as 0x00 (a: 0x00) and third byte as (b: 01)
10. When we verified the data, the first page data is corrupted and there is no data in the second page.

Please let us know whether there is any problem in the algorithm implemented or specified in the data sheet.

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

Why the programming has to be done by you, why you cannot use AVR Studio and the JTAG dongle for programming?

I mean since you are using if for verifying it anyway..

- Jani

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

In the actual board, the requirement is we need to program Atmega1281(4 nos) with At90USB1287. The AT90USB1287 can be programmed using FLIP and this microcontroller will inturn program the Atmega1281. So we need not open the box to do firmware upgrade. Using USB DFU (programmed in At90USB1287)and FLIP we can upgarde the complete firmware of the board.

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

Sounds like this could be a job for a boot loader?

- Jani