StartupCode LPC1517 random line issue

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

StartupCode LPC1517 random line issue

ソリューションへジャンプ
1,066件の閲覧回数
athmesh_n
Contributor IV

There is an issue in my code after removing external oscillator from custom board working on LPC1517.

IDE   :   MCUXpressoIDE

Library : REDLIB

Clock   : Internal RC Clock PLLed to 72MHz

Processor   :   LPC1517 

 

Issue:

After debug, the code jumps to some other line at start and not to main or SystemInit(). 

Error.png

Even after putting a breakpoint at cr_startup code, the issue is same.

Thanks and Regards,

Athmesh Nandakumar

 

ラベル(2)
0 件の賞賛
1 解決策
912件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi ATHMESH NANDAKUMAR,

     Please check your cr_startup__lpc15xx.c file, ResetISR(void) function, this is the startup entry point after reset:

pastedImage_1.png

Enter SystemInit():

pastedImage_2.png

You can find on my side, it calls Board_systemInit();

You also need to check your code, you are calling chip_systemInit or the Board_SystemInit?

pastedImage_3.png

Do you test the official lpcopen code on your side?


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

6 返答(返信)
912件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi ATHMESH NANDAKUMAR,

      What the code you are using?

     Do you use our lpc1549 lpcopen sample code on your side which just as what I recommended you?

     When you use the lpcopen code, as you know, there has two lib: chip lib and board lib.

     You need to change two lib MCU to LPC1517,

pastedImage_1.png

  Then if you want to use the internal IRC instead of the external crystal, you need to modify the board_sysinit.c function void Board_SetupClocking()

void Board_SetupClocking(void)
{
    //Chip_SetupXtalClocking();
     Chip_SetupIrcClocking();

    /* Set default system tick divder to 1 */
    Chip_Clock_SetSysTickClockDiv(1);
}

Then please build the lpc_board project again.

Now, please try it again.

Wish it helps you!
Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
912件の閲覧回数
athmesh_n
Contributor IV

Capture.PNGThis is how I initialized internal clocking.

There's an issue in Internal clock interrupt. The interrupt wont work always. I am using a delay_count++ in Handler. But sometimes this delay_count wont increment. 

Debugging and putting a breakpoint in Handler does not have any effect, which means the interrupt is not working. This is my timer initialization snippet.

Thanks and Regards,

Athmesh Nandakumar

0 件の賞賛
913件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi ATHMESH NANDAKUMAR,

     Please check your cr_startup__lpc15xx.c file, ResetISR(void) function, this is the startup entry point after reset:

pastedImage_1.png

Enter SystemInit():

pastedImage_2.png

You can find on my side, it calls Board_systemInit();

You also need to check your code, you are calling chip_systemInit or the Board_SystemInit?

pastedImage_3.png

Do you test the official lpcopen code on your side?


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

912件の閲覧回数
athmesh_n
Contributor IV

Thank You

0 件の賞賛
912件の閲覧回数
athmesh_n
Contributor IV

The IRC has been called in main program using Chip_SetupIrcClocking();. Can it become an issue or should it be called before the _main() code in sysinit.c file?

0 件の賞賛
912件の閲覧回数
athmesh_n
Contributor IV

I used the same code for changing clock setting. But sometimes the SCT interrupt wont tick. UART is now not working perfectly. 

0 件の賞賛