LPC1768: IAP reinvoke results in hard fault

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC1768: IAP reinvoke results in hard fault

ソリューションへジャンプ
1,895件の閲覧回数
volkerweber
Contributor II

Hi there,

 

I am trying to use the reinvoke functionaliry of the IAP set on my LPC1768 but it always results in an Hard Fault error (see attached picture). To use the reinvoke feature I do the following as suggested in the manual:

 

__disable_irq();

LPC_SC->PLL0FEED  = 0xAA;   
LPC_SC->PLL0FEED  = 0x55;    
LPC_SC->PLL0CON   = 0;    
LPC_SC->PLL0FEED  = 0xAA;    
LPC_SC->PLL0FEED  = 0x55;    
LPC_SC->CLKSRCSEL = 0;    

unsigned int cmd[5], res[5];    
cmd[0] = 57;  
__set_MSP(*((uint32_t *) 0x1FFF0000));
iap_entry(cmd, res);‍‍‍‍‍‍‍‍‍‍‍‍‍

 

Are there any mandatory steps before trying to use this, e.g. regarding the timing? As I cannot debug the functions inside the boot rom memory area (0x1FFF 0000 - 0x1FFF 1FFF) I do not see how to progress here.

 

Any help is appreciated, thanks in advance

ラベル(1)
タグ(2)
0 件の賞賛
返信
1 解決策
1,756件の閲覧回数
volkerweber
Contributor II

I managed to get it to work. Quoting the manual:

It maps boot vectors, sets PCLK = CCLK / 4, configures UART0 pins Rx and Tx, resets TIMER1 and resets the U0FDR (see Section 14.4.12).

In my point of view, that does not include that TIMER1 has to be enabled, however this solves it:

LPC_SC->PCONP |= CLKPWR_PCONP_PCTIM1;‍‍

Perhaps this is also useful for somebody else.

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,757件の閲覧回数
volkerweber
Contributor II

I managed to get it to work. Quoting the manual:

It maps boot vectors, sets PCLK = CCLK / 4, configures UART0 pins Rx and Tx, resets TIMER1 and resets the U0FDR (see Section 14.4.12).

In my point of view, that does not include that TIMER1 has to be enabled, however this solves it:

LPC_SC->PCONP |= CLKPWR_PCONP_PCTIM1;‍‍

Perhaps this is also useful for somebody else.

0 件の賞賛
返信