Debug of no_touch935

Started by aldrin, January 03, 2007, 08:07:48 AM

Previous topic - Next topic

aldrin

Hi,

When i execute no_touch with the debugger of uVision I'm watching the dissembler window and i have a dude, When I call the function "lcall PGM_MTP"  of no_touch935, the program go to direction FF03 and in this direction there are these operations:

FF03     RL A
FF04     JMP @A+DPTR

Depends where i have the function of no_touch the DPTR can change, and then the program go to a one site of my code or another site, and the next sentence (pop IEN0) often never it is executed.

I don't know if this is correct, or if i have a mistake in the code.

Because when i program my device and i execute no_touch935 (with a string in UART or other system), i don't know what the device must do.

Thanks. I wish program within problems my device once by all.

erikm

I have no idea what you are doing, the NoTouch process when properly implemented load both the dptr and the acc before calling the IAP

Erik
erik

Je Gold

NoTouch code is used to put the LPC935 in to ISP mode when an event is detect.  Weather you use NoTouch or the ISP hardware entry method to execute the ISP bootloader.... the call is to  0x1F00 (NOT 0xFF03).

Calls to 0xFF03 are IAP functions (In Applications Programming) WILL NOT execute the ISP bootloader....

ISP Bootloader uses SUB_function calls to IAP to flash programe the LPC935 AND ISP communicates via the UART and FlashMagic

IAP is a selection of functions to handle parts of flash programming and has no interface to the UART and Flashmagic.



Joe

aldrin

Thanks Je Gold,

Then the code of notouch for 935 for ISP mode must be:

PGM_MTP  EQU 01f00H
no_touch935:
    push IEN0
    clear EA
    mov A, #02
    mov R5,#1F     ;   BootVector for ISP mode 
    mov R7,#03
    lcall PGM_MTP
    pop    IEN0
    RET


What do you thing?

aldrin


Erik, What do you think about this? or somebody, please.

Thanks

erikm

Erik, What do you think about this?

Nothing,

I developed the NoTouch for the P89C51Rx2 and P89C66x and THERE I can help you all the way. I have not used NoTouch on a LPC except the older 932, for which the LPC NoTouch posted here works.  i had to replace the LPC I used with a different brand to get CAN connectivity when that was requested and have thus not done any LPC work for 2 years.  Basically all NoTouch does is go through the steps shown in the datasheet as "getting to ISP".  The same should exist in the datasheet for whatever device you use.  As far as I can see Joe Gold is your best resource here (NoTouch and lpc92x.

Erik
erik

aldrin

thanks, erik

Then Je Gold, Is correct my theory??

Je Gold

I haven't tested it.  But I would guess put you you in to ISP bootloader mode.


PGM_MTP  EQU 01f00H
no_touch935:
       lcall PGM_MTP
       RET


If I am wrong,  or your code can't call on_touch935  then, you can't program the micro without hardware signalling to put the 935 in to ISP mode.

I stronly urge you to purchase a MCB900 development kit as a starter....
Joe