Bootloader problem (MC9S12DP256C)

Started by Graham Tricker April 16, 2004
I am having problems with the Motorola Bootloader supplied with Debug12. We
have been successfully using the Bootloader for the past year in many
applications but have come across a problem in our latest circuit.

I have been having problems with the Bootloader prompting 'S-Record out of
Range' during programming. I have done some investigations and have found
it is linked to the position of the 4x4 keypad I have hanging from PortA on
the processor. I can move the keypad around the board and generate failures
quite reliably in certain positions. At first I though I could be inducing
noise on the RS232 line but all appeared to be fine. I then decided to pull
PortA high in the Bootloader by setting bit 1 in PUCR register. This lead
to the Bootloader prompting 'S-Record out of Range' after receiving the
first S-Record. I then echoed the S-Record back to the terminal thinking it
must be corrupted, but all was fine there.

I have now deduced that the constant SRecLow gets corrupted in line:

cmpb SRecLow,pcr ; less than $c0000 or $e0000?

If I replace this with

cmpb #$0c

the Bootloader never fails.

I cannot quite see the relation between this constant getting corrupted and
PortA. Any help on understanding and fixing this problem would be much
appreciated.

Cheers Graham

**********************************************************************
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.
Although BERU F1 SYSTEMS believe this e-mail and any attachments are free of any virus or other defect which may affect a computer, it is the responsibility of the recipient to ensure that it is virus free and BERU F1 SYSTEMS do not accept any responsibility for any loss or damage arising in any way from its use.
This footnote confirms that this email message has been swept by MAIL Sweeper.
**********************************************************************



I appear to have solved my Bootloader problem.

SRecLow equ $c0000

cmpb SRecLow, pcr ; Compares b with the value
at address $00 which in the case of the MC9S12DP256C is PortA.

I have modified this to:

cmpb #SRecLow>>16 ; Compare b with the value $0c
and generates an error if SRecord address is less than $0c. Graham -----Original Message-----
From: Graham Tricker [mailto:]
Sent: 16 April 2004 17:00
To:
Subject: [68HC12] Bootloader problem (MC9S12DP256C)

I am having problems with the Motorola Bootloader supplied with Debug12. We
have been successfully using the Bootloader for the past year in many
applications but have come across a problem in our latest circuit.

I have been having problems with the Bootloader prompting 'S-Record out of
Range' during programming. I have done some investigations and have found
it is linked to the position of the 4x4 keypad I have hanging from PortA on
the processor. I can move the keypad around the board and generate failures
quite reliably in certain positions. At first I though I could be inducing
noise on the RS232 line but all appeared to be fine. I then decided to pull
PortA high in the Bootloader by setting bit 1 in PUCR register. This lead
to the Bootloader prompting 'S-Record out of Range' after receiving the
first S-Record. I then echoed the S-Record back to the terminal thinking it
must be corrupted, but all was fine there.

I have now deduced that the constant SRecLow gets corrupted in line:

cmpb SRecLow,pcr ; less than $c0000 or $e0000?

If I replace this with

cmpb #$0c

the Bootloader never fails.

I cannot quite see the relation between this constant getting corrupted and
PortA. Any help on understanding and fixing this problem would be much
appreciated.

Cheers Graham

**********************************************************************
This message contains confidential information and is intended only for the
individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system.
Although BERU F1 SYSTEMS believe this e-mail and any attachments are free of
any virus or other defect which may affect a computer, it is the
responsibility of the recipient to ensure that it is virus free and BERU F1
SYSTEMS do not accept any responsibility for any loss or damage arising in
any way from its use.
This footnote confirms that this email message has been swept by MAIL
Sweeper.
**********************************************************************
--------------------To learn more about
Motorola Microcontrollers, please visit
http://www.motorola.com/mcu <http://www.motorola.com/mcu>
o learn more about Motorola Microcontrollers, please visit
http://www.motorola.com/mcu <http://www.motorola.com/mcu <http://rd.yahoo.com/SIGcrl01a6/M)1630.4786521.5933964.1261774/D=egroup
web/S06554205:HM/EXP82217760/A 72414/R=0/SIGtc61npd/*http://www.n
etflix.com/Default?mqso`178418&partidG86521> click here <http://us.adserver.yahoo.com/l?M)1630.4786521.5933964.1261774/D=egroupweb
/S=:HM/A 72414/randq1966041>

_____

> Service.