LPC1768, problem wiht f/w download , use iap reinvolk isp command and flashmagic

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1768, problem wiht f/w download , use iap reinvolk isp command and flashmagic

453 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yeqing85123 on Fri Jul 11 01:21:47 MST 2014
Hello,
        At first, sorry about my poor English.
        My problem is :
        I want to download f/w without reset  mcu and set  P2[10]  to low,So I use the IAP RE-INVOKE ISP command.But when I start the flash magic , it shows "Failed to autobaud - step 1" just after the command sent.
        Bellow is the code which I invoke the command( according http://www.lpcware.com/content/blog/reinvoke-isp-user-code-example-lpc177x-lpc178x for simple example):

static unsigned int iap_cmd[5];
static unsigned int iap_ret[4];
//  IAP Command
typedef void (*IAP)(uint32_t *cmd,uint32_t *result);
IAP iap_entry = (IAP) 0x1FFF1FF1UL;
static void restart_isp(){
__disable_irq();
LPC_SC->PLL0CON   = 0x00;  // disable PLL        
  LPC_SC->PLL0FEED  = 0xAA;
  LPC_SC->PLL0FEED  = 0x55;

LPC_SC->CLKSRCSEL = 0; // select  IRC
        LPC_SC->CCLKCFG   = 1;

       /* Set stack pointer to ROM value (reset default) */
       __set_MSP(*((uint32_t *) 0x1FFF0000));

iap_cmd[0] = 0x57; // RE-INVOKE ISP Command
        iap_entry(iap_cmd,iap_ret);        // Call IAP Command
return ;
}

       Thanks!
Labels (1)
0 Kudos
1 Reply

304 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by embd02161991 on Fri Jul 11 13:58:05 MST 2014
Hi,

Have you looked at the CRP application note. It uses the Reinvoke ISP function.

Use this code as a reference with CRP DISABLED.

http://www.lpcware.com/content/nxpfile/an10851-crp-example-source-code


Thanks,
NXP Technical Support
0 Kudos