Sign in

username:

password:



Not a member?

Search LPC900_users



Search tips

Subscribe to LPC900_users



Ads

Discussion Groups

Discussion Groups | LPC900 | ISP boot code / user-manual discrepancy

Find help, specifications and source code for the LPC900. The LPC900 challenges Microchip and AVR based on the worlds most popular 8-bit architecture the 80C51. With a 2-clock core the LPC900 series is a high performance, very flexible and low cost 8-bit microcontroller family. Designers using or interested in these devices are encouraged to share their know-how and ask questions.

ISP boot code / user-manual discrepancy - john - Jun 22 22:53:53 2007

I noticed that the User manual (UM10116.pdf Rev. 02 — 9 June 2005)
states that the IAP functions return an error when the Carry Flag is
set. But the ISP boot code from NXP, LPC2_ISP_8K_V04.a51, is testing
the bit F0:
JB F0,ERROR ;check if an error occured

At first I thought it was the F0 flag in PSW but there is no definition
for that so the assembler is reading it as the F0 bit which is bit zero
of the B register.

Does anyone know if the user manual is correct or if the ISP boot code
is right? If the ISP boot code is wrong and if it's the same code that
comes from the factory the ISP code would never return program write
errors!


(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )


Re: ISP boot code / user-manual discrepancy - "Dr. Vithal N. Kamat" - Jun 26 11:09:58 2007

Dear John,
I had a look at the LPC2_ISP_8K_V04.a51, and it is the F0 flag in
PSW.
You are right that the IAP function returns error when the Carry
Flag is set, and this flag is not used in the above ISP code.
However, a different approach is used to detect program write
errors - such as by verifying the Block level CRC and global CRC.
Vithal Kamat

--- In l...@yahoogroups.com, "john" wrote:
>
> I noticed that the User manual (UM10116.pdf Rev. 02 — 9 June 2005)
> states that the IAP functions return an error when the Carry Flag
is
> set. But the ISP boot code from NXP, LPC2_ISP_8K_V04.a51, is
testing
> the bit F0:
> JB F0,ERROR ;check if an error occured
>
> At first I thought it was the F0 flag in PSW but there is no
definition
> for that so the assembler is reading it as the F0 bit which is bit
zero
> of the B register.
>
> Does anyone know if the user manual is correct or if the ISP boot
code
> is right? If the ISP boot code is wrong and if it's the same code
that
> comes from the factory the ISP code would never return program
write
> errors!
>



(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )

Re: ISP boot code / user-manual discrepancy - john - Jun 26 12:37:14 2007

I don't believe that F0 is the PSW flag bit since I can't find a
definition (like: F0 EQU D0) in the file. This would mean the
assembler would interpret it as an absolute number of 0xF0.
The CRC is good when checking after programming the device. but if
the IAP function is used for programming just a few bytes doing a CRC
for the whole sector seems excessive.
--- In l...@yahoogroups.com, "Dr. Vithal N. Kamat"
wrote:
>
> Dear John,
> I had a look at the LPC2_ISP_8K_V04.a51, and it is the F0 flag in
> PSW.
> You are right that the IAP function returns error when the Carry
> Flag is set, and this flag is not used in the above ISP code.
> However, a different approach is used to detect program write
> errors - such as by verifying the Block level CRC and global CRC.
> Vithal Kamat
>
> --- In l...@yahoogroups.com, "john" wrote:
> >
> > I noticed that the User manual (UM10116.pdf Rev. 02 — 9 June 2005)
> > states that the IAP functions return an error when the Carry Flag
> is
> > set. But the ISP boot code from NXP, LPC2_ISP_8K_V04.a51, is
> testing
> > the bit F0:
> > JB F0,ERROR ;check if an error occured
> >
> > At first I thought it was the F0 flag in PSW but there is no
> definition
> > for that so the assembler is reading it as the F0 bit which is
bit
> zero
> > of the B register.
> >
> > Does anyone know if the user manual is correct or if the ISP boot
> code
> > is right? If the ISP boot code is wrong and if it's the same code
> that
> > comes from the factory the ISP code would never return program
> write
> > errors!
>


(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )

Re: Re: ISP boot code / user-manual discrepancy - Nilesh - Jun 27 0:54:31 2007

Dear John,

FO bit is PSW only. You can also look at header(.h) file or include(.inc) file

In LPC9xx.h ---> sbit F0 = PSW^5;

In LPC9xx.INC ---> F0 BIT 0D5H

john wrote:
I don't believe that F0 is the PSW flag bit since I can't find a
definition (like: F0 EQU D0) in the file. This would mean the
assembler would interpret it as an absolute number of 0xF0.
The CRC is good when checking after programming the device. but if
the IAP function is used for programming just a few bytes doing a CRC
for the whole sector seems excessive.

--- In l...@yahoogroups.com, "Dr. Vithal N. Kamat"
wrote:
>
> Dear John,
> I had a look at the LPC2_ISP_8K_V04.a51, and it is the F0 flag in
> PSW.
> You are right that the IAP function returns error when the Carry
> Flag is set, and this flag is not used in the above ISP code.
> However, a different approach is used to detect program write
> errors - such as by verifying the Block level CRC and global CRC.
> Vithal Kamat
>
> --- In l...@yahoogroups.com, "john" wrote:
> >
> > I noticed that the User manual (UM10116.pdf Rev. 02 — 9 June 2005)
> > states that the IAP functions return an error when the Carry Flag
> is
> > set. But the ISP boot code from NXP, LPC2_ISP_8K_V04.a51, is
> testing
> > the bit F0:
> > JB F0,ERROR ;check if an error occured
> >
> > At first I thought it was the F0 flag in PSW but there is no
> definition
> > for that so the assembler is reading it as the F0 bit which is
bit
> zero
> > of the B register.
> >
> > Does anyone know if the user manual is correct or if the ISP boot
> code
> > is right? If the ISP boot code is wrong and if it's the same code
> that
> > comes from the factory the ISP code would never return program
> write
> > errors!
>

---------------------------------
The DELETE button on Yahoo! Mail is unhappy. Know why?


(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )

Re: ISP boot code / user-manual discrepancy - john - Jun 27 2:59:46 2007

I did not include either of those header files. In fact, the
'LPC2_ISP_8K_V04.a51' compiles without adding any other files to the
project. I compiled 'LPC2_ISP_8K_V04.a51' with no other files so F0
can't be a definition unless it is in 'LPC2_ISP_8K_V04.a51', but it is
not in that file.

--- In l...@yahoogroups.com, Nilesh wrote:
>
> Dear John,
>
> FO bit is PSW only. You can also look at header(.h) file or
include(.inc) file
>
> In LPC9xx.h ---> sbit F0 = PSW^5;
>
> In LPC9xx.INC ---> F0 BIT 0D5H
> john j_funk1425@... wrote:
> I don't believe that F0 is the PSW flag bit since I can't
find a
> definition (like: F0 EQU D0) in the file. This would mean the
> assembler would interpret it as an absolute number of 0xF0.
> The CRC is good when checking after programming the device. but if
> the IAP function is used for programming just a few bytes doing a CRC
> for the whole sector seems excessive.
>
> --- In l...@yahoogroups.com, "Dr. Vithal N. Kamat"
> vnk_ad1@ wrote:
> >
> > Dear John,
> > I had a look at the LPC2_ISP_8K_V04.a51, and it is the F0 flag in
> > PSW.
> > You are right that the IAP function returns error when the Carry
> > Flag is set, and this flag is not used in the above ISP code.
> > However, a different approach is used to detect program write
> > errors - such as by verifying the Block level CRC and global CRC.
> > Vithal Kamat
> >
> > --- In l...@yahoogroups.com, "john" wrote:
> > >
> > > I noticed that the User manual (UM10116.pdf Rev. 02 — 9 June
2005)
> > > states that the IAP functions return an error when the Carry Flag
> > is
> > > set. But the ISP boot code from NXP, LPC2_ISP_8K_V04.a51, is
> > testing
> > > the bit F0:
> > > JB F0,ERROR ;check if an error occured
> > >
> > > At first I thought it was the F0 flag in PSW but there is no
> > definition
> > > for that so the assembler is reading it as the F0 bit which is
> bit
> > zero
> > > of the B register.
> > >
> > > Does anyone know if the user manual is correct or if the ISP boot
> > code
> > > is right? If the ISP boot code is wrong and if it's the same code
> > that
> > > comes from the factory the ISP code would never return program
> > write
> > > errors!
> > >
> >
> ---------------------------------
> The DELETE button on Yahoo! Mail is unhappy. Know why?
>


(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )

Re: Re: ISP boot code / user-manual discrepancy - Nilesh - Jun 27 3:34:58 2007

Ok let me know which crosss compiler are you using ?

If you are using Keil then by default SFR definition is of 8051 standard SFR definition.

Nilesh

john wrote:
I did not include either of those header files. In fact, the 'LPC2_ISP_8K_V04.a51' compiles without adding any other files to the project. I compiled 'LPC2_ISP_8K_V04.a51' with no other files so F0 can't be a definition unless it is in 'LPC2_ISP_8K_V04.a51', but it is not in that file.

--- In l...@yahoogroups.com, Nilesh wrote:
>
> Dear John,
>
> FO bit is PSW only. You can also look at header(.h) file or include(.inc) file
>
> In LPC9xx.h ---> sbit F0 = PSW^5;
>
> In LPC9xx.INC ---> F0 BIT 0D5H
> john j_funk1425@... wrote:
> I don't believe that F0 is the PSW flag bit since I can't find a
> definition (like: F0 EQU D0) in the file. This would mean the
> assembler would interpret it as an absolute number of 0xF0.
> The CRC is good when checking after programming the device. but if
> the IAP function is used for programming just a few bytes doing a CRC
> for the whole sector seems excessive.
>
> --- In l...@yahoogroups.com, "Dr. Vithal N. Kamat"
> vnk_ad1@ wrote:
> >
> > Dear John,
> > I had a look at the LPC2_ISP_8K_V04.a51, and it is the F0 flag in
> > PSW.
> > You are right that the IAP function returns error when the Carry
> > Flag is set, and this flag is not used in the above ISP code.
> > However, a different approach is used to detect program write
> > errors - such as by verifying the Block level CRC and global CRC.
> > Vithal Kamat
> >
> > --- In l...@yahoogroups.com, "john" wrote:
> > >
> > > I noticed that the User manual (UM10116.pdf Rev. 02 — 9 June 2005)
> > > states that the IAP functions return an error when the Carry Flag
> > is
> > > set. But the ISP boot code from NXP, LPC2_ISP_8K_V04.a51, is
> > testing
> > > the bit F0:
> > > JB F0,ERROR ;check if an error occured
> > >
> > > At first I thought it was the F0 flag in PSW but there is no
> > definition
> > > for that so the assembler is reading it as the F0 bit which is
> bit
> > zero
> > > of the B register.
> > >
> > > Does anyone know if the user manual is correct or if the ISP boot
> > code
> > > is right? If the ISP boot code is wrong and if it's the same code
> > that
> > > comes from the factory the ISP code would never return program
> > write
> > > errors!
> > >
> >
> ---------------------------------
> The DELETE button on Yahoo! Mail is unhappy. Know why?
>

---------------------------------
The DELETE button on Yahoo! Mail is unhappy. Know why?


(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )

Re: ISP boot code / user-manual discrepancy - john - Jun 27 12:49:28 2007

I'm using Keil.

--- In l...@yahoogroups.com, Nilesh wrote:
>
> Ok let me know which crosss compiler are you using ?
>
> If you are using Keil then by default SFR definition is of 8051
standard SFR definition.
>
> Nilesh
>
> john wrote:
> I did not include either of those header files. In fact,
the 'LPC2_ISP_8K_V04.a51' compiles without adding any other files to
the project. I compiled 'LPC2_ISP_8K_V04.a51' with no other files so
F0 can't be a definition unless it is in 'LPC2_ISP_8K_V04.a51', but
it is not in that file.
>
> --- In l...@yahoogroups.com, Nilesh wrote:
> >
> > Dear John,
> >
> > FO bit is PSW only. You can also look at header(.h) file or
include(.inc) file
> >
> > In LPC9xx.h ---> sbit F0 = PSW^5;
> >
> > In LPC9xx.INC ---> F0 BIT 0D5H
> >
> >
> > john j_funk1425@ wrote:
> > I don't believe that F0 is the PSW flag bit since I can't find a
> > definition (like: F0 EQU D0) in the file. This would mean the
> > assembler would interpret it as an absolute number of 0xF0.
> > The CRC is good when checking after programming the device. but if
> > the IAP function is used for programming just a few bytes doing a
CRC
> > for the whole sector seems excessive.
> >
> > --- In l...@yahoogroups.com, "Dr. Vithal N. Kamat"
> > vnk_ad1@ wrote:
> > >
> > > Dear John,
> > > I had a look at the LPC2_ISP_8K_V04.a51, and it is the F0 flag
in
> > > PSW.
> > > You are right that the IAP function returns error when the
Carry
> > > Flag is set, and this flag is not used in the above ISP code.
> > > However, a different approach is used to detect program write
> > > errors - such as by verifying the Block level CRC and global
CRC.
> > > Vithal Kamat
> > >
> > > --- In l...@yahoogroups.com, "john" wrote:
> > > >
> > > > I noticed that the User manual (UM10116.pdf Rev. 02 — 9 June
2005)
> > > > states that the IAP functions return an error when the Carry
Flag
> > > is
> > > > set. But the ISP boot code from NXP, LPC2_ISP_8K_V04.a51, is
> > > testing
> > > > the bit F0:
> > > > JB F0,ERROR ;check if an error occured
> > > >
> > > > At first I thought it was the F0 flag in PSW but there is no
> > > definition
> > > > for that so the assembler is reading it as the F0 bit which
is
> > bit
> > > zero
> > > > of the B register.
> > > >
> > > > Does anyone know if the user manual is correct or if the ISP
boot
> > > code
> > > > is right? If the ISP boot code is wrong and if it's the same
code
> > > that
> > > > comes from the factory the ISP code would never return
program
> > > write
> > > > errors!
> > > >
> > >
> >
> >
> >
> >
> >
> >
> > ---------------------------------
> > The DELETE button on Yahoo! Mail is unhappy. Know why?
> >
>
>
>
> ---------------------------------
> The DELETE button on Yahoo! Mail is unhappy. Know why?
>



(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )

Re: ISP boot code / user-manual discrepancy - john - Jun 27 13:35:49 2007

OK, I see what you guys mean. The uVision IDE try's to be too smart
for it's own good and adds the definitions (somewhere?) for the
standard 8051 by default. So, even though the F0 is a label for a bit
in PSW it still conflicts with what the user manual says.
--- In l...@yahoogroups.com, Nilesh wrote:
>
> Ok let me know which crosss compiler are you using ?
>
> If you are using Keil then by default SFR definition is of 8051
standard SFR definition.
>
> Nilesh
>
> john wrote:
> I did not include either of those header files. In fact,
the 'LPC2_ISP_8K_V04.a51' compiles without adding any other files to
the project. I compiled 'LPC2_ISP_8K_V04.a51' with no other files so
F0 can't be a definition unless it is in 'LPC2_ISP_8K_V04.a51', but
it is not in that file.
>
> --- In l...@yahoogroups.com, Nilesh wrote:
> >
> > Dear John,
> >
> > FO bit is PSW only. You can also look at header(.h) file or
include(.inc) file
> >
> > In LPC9xx.h ---> sbit F0 = PSW^5;
> >
> > In LPC9xx.INC ---> F0 BIT 0D5H
> >
> >
> > john j_funk1425@ wrote:
> > I don't believe that F0 is the PSW flag bit since I can't find a
> > definition (like: F0 EQU D0) in the file. This would mean the
> > assembler would interpret it as an absolute number of 0xF0.
> > The CRC is good when checking after programming the device. but if
> > the IAP function is used for programming just a few bytes doing a
CRC
> > for the whole sector seems excessive.
> >
> > --- In l...@yahoogroups.com, "Dr. Vithal N. Kamat"
> > vnk_ad1@ wrote:
> > >
> > > Dear John,
> > > I had a look at the LPC2_ISP_8K_V04.a51, and it is the F0 flag
in
> > > PSW.
> > > You are right that the IAP function returns error when the
Carry
> > > Flag is set, and this flag is not used in the above ISP code.
> > > However, a different approach is used to detect program write
> > > errors - such as by verifying the Block level CRC and global
CRC.
> > > Vithal Kamat
> > >
> > > --- In l...@yahoogroups.com, "john" wrote:
> > > >
> > > > I noticed that the User manual (UM10116.pdf Rev. 02 — 9 June
2005)
> > > > states that the IAP functions return an error when the Carry
Flag
> > > is
> > > > set. But the ISP boot code from NXP, LPC2_ISP_8K_V04.a51, is
> > > testing
> > > > the bit F0:
> > > > JB F0,ERROR ;check if an error occured
> > > >
> > > > At first I thought it was the F0 flag in PSW but there is no
> > > definition
> > > > for that so the assembler is reading it as the F0 bit which
is
> > bit
> > > zero
> > > > of the B register.
> > > >
> > > > Does anyone know if the user manual is correct or if the ISP
boot
> > > code
> > > > is right? If the ISP boot code is wrong and if it's the same
code
> > > that
> > > > comes from the factory the ISP code would never return
program
> > > write
> > > > errors!
> > > >
> > >
> >
> >
> >
> >
> >
> >
> > ---------------------------------
> > The DELETE button on Yahoo! Mail is unhappy. Know why?
> >
>
>
>
> ---------------------------------
> The DELETE button on Yahoo! Mail is unhappy. Know why?
>



(You need to be a member of LPC900_users -- send a blank email to LPC900_users-subscribe@yahoogroups.com )