bugAVR In-System Programmer - Bugs: bug #5307, uisp fails to enter programming...

 
 

bug #5307: uisp fails to enter programming mode on STK500

Submitter:  None
Submitted:  Mon 15 Sep 2003 09:55:23 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Originator Email:  * -email is unavailable- Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 15 Sep 2003 10:04:48 AM UTC, comment #1: 

I'm sorry but the code was a little confusing due to mix of integer and hex presentation. The correct test code is:
-----------------
    for (i=0;i<(int)sizeof(EnterPgmMode_Reply);i++) {
      printf("%x: %x = %x\n", i, buf[i], EnterPgmMode_Reply[i]);
-----------------
and the printout is:
-----------------
prompt>/uisp -dprog=stk500 -dserial=/dev/ttyS0 -dpart=AT90S8515 --erase --upload --verify if=rom.hex
Firmware Version: 1.14
0: 14 = 14
1: 11 = 10
Failed to enter programming mode.
prompt>
------------------

I'm sorry, hope I havent confused you to much.

/Björn

Anonymous
Mon 15 Sep 2003 09:55:23 AM UTC, original submission:  

When trying to program STK500 with the latest version of uisp (version 20030618) it fails to enter programming mode. I have compiled in some printf's to try to track what is failing and this is what it says:
------------------
prompt>uisp --version
uisp version 20030618
--------------------------------------
prompt> uisp -dprog=stk500 -dserial=/dev/ttyS0 -dpart=AT90S8515 --erase --upload --verify if=rom.hex
Firmware Version: 1.14
0: 14 = 20
1: 11 = 16
Failed to enter programming mode.
prompt>
--------------------------------------

The code I changed is in Stk500.C:
---------------------------------------
void TStk500::EnterProgrammingMode() {
  TByte buf[100];
  int i;

  memcpy(buf, EnterPgmMode, sizeof(EnterPgmMode));
  Send(buf, sizeof(EnterPgmMode), sizeof(EnterPgmMode_Reply));
  if (memcmp(buf, EnterPgmMode_Reply, sizeof(EnterPgmMode_Reply)) != 0) {
    for (i=0;i<(int)sizeof(EnterPgmMode_Reply);i++) {
      printf("%x: %x = %i\n", i, buf[i], EnterPgmMode_Reply[i]);
    }
    throw Error_Device ("Failed to enter programming mode."); }
}
-------------------------------------------

It seams as the answer is incorrect but I dont know what to expect.

/Björn

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

No changes have been made to this item

Back to the top

Powered by Savane 3.13-758e.
Corresponding source code