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 lpc900_users@yahoogroups.com, "john" <j_funk1425@...> 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!
>