Author Topic: CheckSum error...  (Read 6974 times)

tapan

  • Guest
CheckSum error...
« on: November 10, 2004, 06:46:34 am »
Hi!!

I have a board designed using P89C51RD2BN. The board was working fine untill yesterday. Today the FlashMagic does not recognize it.
Then I tried using older version P89C51RD2HBP on the same board and it
works!!! So it is quiet clear that board and com port are fine.

So, with P89C51RD2BN replaced on the board, I started debugging where the problem is!!! I used HyperTerminal to communicate with the board. The controller responded back with 'U' when I sent it to the controller.
Then I tried to send record to specify the controller frequency. The controller sent an 'X' indicating that the checksum failed to match.

Then I used P89C51RD2HBP and sent the same commands using HyperTerminal. But this time controller sent '.' indicating that the command was successfully executed!!!

What I suppose is that by some way the Boot Code for checksum calculation is corrupted. I hope I am correct. I would like to know whether there is a way out or the IC can never be used in ISP mode again???

Awaiting your clarification.

Tapan.


Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2099
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: CheckSum error...
« Reply #1 on: November 10, 2004, 03:32:58 pm »
What is the exact hex record you are sending for the osc frequency? Can you cut and paste from the hyperterminal window?

Embedded Systems Academy, Inc.
support at esacademy dot com

tapan

  • Guest
Re: CheckSum error...
« Reply #2 on: November 11, 2004, 04:39:14 am »
The exact hex record I am sending is as follows:

U:010000020BF2X

In HyperTerminal I have turned off the local echo.
Initially I send 'U' and in response I am getting a 'U' back.
Then I send the record for osc frequency.

I am operating at 11.0592MHz. So it rounds off to 11(0Bh).
Here nn = 01
      aaaa=XXXX(don't care!!) . So I am setting it to 0000
       record type = 02
       ff = 0B(frequency)
       cc = F2(checksum).

After sending the record I get an 'X' indicating a checksum error.

Since I have turned off the local echo what I am transmitting by
typing is received back correctly. In this case the controller is receiving
correctly and transmitting it back correctly. Ideally it should find the checksum correct. So I suppose that some part of the Boot ROM code is
corrupted. Is it possible that such a thing could happen????

Regards----
Tapan.


Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2099
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: CheckSum error...
« Reply #3 on: November 11, 2004, 03:11:58 pm »
Does lowering the baud rate help? What about sending other records - do you get the same problem?

Embedded Systems Academy, Inc.
support at esacademy dot com

tapan

  • Guest
Re: CheckSum error...
« Reply #4 on: November 12, 2004, 12:16:44 pm »
Hi!!

I have not tried lowering the Baud Rate. I have kept it at 9600 in HyperTerminal. I am operating at 11.0592MHz so this should not be problem..!! Also when I replaced the problamatic IC with P89C51RD2HBP it works fine even at 14400 Baud.

Well with Flash Magic I tried lowering the Baud Rate but still it gave the problem. So I think reducing baud rate will not solve the problem.

Regarding sending other records, I have tried that but same response was received.

Thanks. Awaiting your reply.

Regards-----
Tapan.

erikm

  • Guest
Re: CheckSum error...
« Reply #5 on: November 12, 2004, 01:24:53 pm »
P89C51RD2BP .... I replaced ... with P89C51RD2HBP it works

Did you read and implement the errata for the non-H.
Did you change the chip type in the FlashMagic

Erik