UART not working after IAP

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

UART not working after IAP

2,248件の閲覧回数
jloncar
Contributor I

Hello everyone,

I managed to successfully reinvoke ISP with LPC11U24 using IAP 57 command. I can read the device signature and flash new code using Flash Magic through UART interface. However, when I try to start program execution in Flash Magic (ISP > Execute/Go), UART doesn't seem to work. I can confirm that the program starts executing well, since the LED connected to PIO1_25 lights up (it is turned off right before calling iap_entry function). During the whole process PIO0_1 is HIGH (ISP is reinvoked in application) and PIO0_3 is LOW (UART programming is chosen). If I manually reset the uC, the new code and UART seem to work properly. However, for my applications it is essential that I can enter and exit ISP mode without need for manual reset.

My test code is attached. LPC11U24 returns any character received via UART except for the character 'P'. If 'P' is received, ISP is reinvoked via IAP 57 command.

Any help is appreciated!

Josip

ラベル(1)
タグ(3)
0 件の賞賛
返信
8 返答(返信)

1,972件の閲覧回数
priyankb
Contributor III

Hi jloncar‌,

Have you tried resetting your UART peripheral?

I had a similar problem with my USB. Resetting USB before moving to application worked for me. In my case I used "Chip_SYSCTL_PeriphReset()"(LPCOpen library).

Best Regards

Priyank.

0 件の賞賛
返信

1,972件の閲覧回数
jloncar
Contributor I

Nope, it does not work properly. Even if I run ISP > Go in Flash Magic with "Address is start of vector table" checked, UART is not functional, but at least LED connected to PIO1_25 lights up. This means that the program starts to execute correctly. If I don't check the checkbox, the LED does not even light up. In both cases UART is not functional after IAP so the problem persists. Manual reset of the uC seems to solve the problem, but it is not an acceptable solution...

Any ideas?

Best,

Josip

0 件の賞賛
返信

1,972件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Joisp,

There is no issue with your UART.c file,it can work well on my simple project.

I think you can only send your project , I will check it on my side.

BR

Alice

0 件の賞賛
返信

1,972件の閲覧回数
jloncar
Contributor I

Hi Alice_Yang,

Sure thing, the project is attached.

Thanks a lot!

Best,

J

0 件の賞賛
返信

1,972件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Joisp Loncar,

I ordered the board LPCXpresso11u24, test your project on my side, the same problem with yours.

Then I create a new project for you refer to your requirement . It can work well on my side, I attached it please test it

on your side, please contact me if there is any question . This project is based on LPCopen demo.

Please pay some points just if you have notice that:

- PIO0_1 and PIO0_3 need to be low when using pins to enter ISP UART mode.

- PIO0_3 need to be low when using IAP command enter ISP UART mode.

I also take a video about how to control on PC.  Through  reading the "Device Signature " to check whether entered

ISP mode, if it can read , it says entered ISP mode successfully. My steps as below:

- Using PIO0_1 and PIO0_3 low go into ISP uart mode.

- Flash .hex file using Flash Magic.

- ISP->GO.

- Open terminal for UART, send some characters check whether UART can work well.

- Send 'P' to board.

- Using Flash Magic -> ISP ->Read Device Signature .

Hope it helps,


Have a great day,
TIC

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

0 件の賞賛
返信

1,972件の閲覧回数
jloncar
Contributor I

Hi Alice_Yang,

Thanks for your reply!

Unfortunately, I'm still facing the same problem. I noticed a difference in Flash Magic setup though. I need to check the "Address is start of vector table" checkbox when running ISP > Go in Flash Magic. Otherwise, the program is not executed at all. I made sure to connect to the right COM port after flashing the hex file.

Smells like a problem with interrupts, but I may be wrong...

Josip

0 件の賞賛
返信

1,972件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Joisp,

 Anyway, it works now. How about other function: " enter and exit ISP mode without need for manual reset."?

Please tell us without any hesitate if still have question.

BR

Alice

0 件の賞賛
返信

1,971件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Joisp Loncar ,

I have test your UART.c file , the UART can work well on my side . As for there is no LPC11u24 chip on my hand,

so I run the project on LPC11C24, just only re-configure UART pins. I take a video about how to control on Flash Magic

and Terminal , please have a look at my attachment. (I send 6 to chip, we can see it can received and send it back to terminal. sorry for I haven't English version terminal.)

Please make sure after click "Go", your UART terminal connect.  The first import thing is UART can work well,

so first not send 'p', just send another character to test.

Hope it helps,


Have a great day,
TIC

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

0 件の賞賛
返信