Author Topic: Debug of no_touch935  (Read 6178 times)

aldrin

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Debug of no_touch935
« on: January 03, 2007, 08:07:48 am »
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

  • Full Member
  • ***
  • Posts: 113
    • View Profile
Re: Debug of no_touch935
« Reply #1 on: January 08, 2007, 07:34:40 am »
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

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: Debug of no_touch935
« Reply #2 on: January 09, 2007, 02:11:36 am »
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

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Debug of no_touch935
« Reply #3 on: January 09, 2007, 05:49:51 am »
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

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Debug of no_touch935
« Reply #4 on: January 11, 2007, 07:00:31 am »

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

Thanks

erikm

  • Full Member
  • ***
  • Posts: 113
    • View Profile
Re: Debug of no_touch935
« Reply #5 on: January 11, 2007, 10:10:28 am »
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

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: Debug of no_touch935
« Reply #6 on: January 14, 2007, 04:33:03 pm »
thanks, erik

Then Je Gold, Is correct my theory??

Je Gold

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: Debug of no_touch935
« Reply #7 on: January 17, 2007, 04:26:51 am »
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