Hardfault on LPC1857 USB

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

Hardfault on LPC1857 USB

1,451 Views
shaun2
Contributor I

Hi All : 

I´m try running example code "CDC_UART" on my board with LPC1857 to work with USB example provided on IAR.

But evertime code running  ret = USBD_API->cdc->init(hUsb, &cdc_param, &g_uCOM.hCdc) where I get a HardFault in example.

What's happening and how can i fix it? 

Labels (3)
0 Kudos
Reply
11 Replies

1,055 Views
shaun2
Contributor I

Hi Jingjing : 

Sorry for wrong information and it is not provide on IAR, is running on IAR.

The example code is from below url, board is Keil MCB1800 :

LPCOpen Software for LPC18XX|NXP 

I'm running project code " cdc_uart - iflash_keil_mcb_1800 " is from file directory "lpcopen_2_12_keil_iar_keil_mcb_1857\applications\lpc18xx_43xx\iar_ewarm_projects\keil_mcb_1857\keil_mcb_1857_all_examples.eww".

0 Kudos
Reply

1,055 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Shaun,

    Thank you for your more information.

    I have reproduce your problem on my side now, and I already check it with our according department and wait for their reply.

    If I get the feedback, I will let you know ASAP, please wait patiently.

    Thanks a lot for your understanding.


Have a great day,
Jingjing

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

0 Kudos
Reply

1,055 Views
shaun2
Contributor I

Hi Jingjing : 

Thank you for helping me.

0 Kudos
Reply

1,055 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Shaun,

    I already get the reply from our according department.

   They also have reproduced this problem in IAR project, they will try to fix it in the near future, so please wait patiently.

   Now, we have test the LPCXpresso  project, that usbd_rom_cdc_uart project works well with LPCXpresso IDE.

   So do you mind to use the LPCXpresso project now?

   You can download and install the LPCXpresso IDE at first, then import the lpc_board_keil_mcb_1857, lpc_chip_18xx and usbd_rom_cdc_uart project.

   After build, use LPC_LINK2 to download the code to your MCB1857 board, the usb to com will work like this:

pastedImage_1.png

  The code runs normally, and won't enter hardfault.

Wish it hepls you!

If you still have question with LPCXpresso IDE project, please let me know!

   


Have a great day,
Jingjing

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

0 Kudos
Reply

1,055 Views
shaun2
Contributor I

Dear Jingjing : 

I am grateful for your help.

I already install the LPCXpresso IDE on my system,and I will test project on the LPCXpresso.

But, my partner also design products using IAR, and we need to share source.

In finally, the code design need back to IAR.

Hope your department can be help to fix this issue.

0 Kudos
Reply

1,055 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Shaun,

  Please don't worry, our colleague already work on it.

  After the IAR project issue is solved, I will let you know!

  Sorry for the inconvenience we bring you.

Best Regards,

Jingjing

0 Kudos
Reply

1,055 Views
hairy_lee
Contributor II

Hello Jingjing,

Has this issue been resolved yet and if so what is the solution please? I am trying to run the cdc_vcom example on the LPC-Link2 (LPC4370) within IAR EW for ARM and I am experiencing the same issue as reported by Shaun with the latest available version of LPCOpen (lpcopen_2_20_keil_iar_nxp_lpclink2_4370). 

I have downloaded the free edition of LPCXpresso and can confirm that the equivalent example in lpcopen_2_20_lpcxpresso_nxp_lpclink2_4370  works. As is the case with Shaun this will get me up and running for the time being, but ultimately I have to have this running correctly in the IAR EW environment.

Many thanks.

0 Kudos
Reply

1,055 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Hairy,

     The issue is still in the process, if it is fixed, I will let you know.

     Now, we just have the LPCXpresso project which works correct.

     Thanks a lot for your understanding.


Have a great day,
Kerry

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

0 Kudos
Reply

1,055 Views
sudheerv
Contributor II

one possibility is that,  usb_param.usb_reg_base   is not properly initialized according to your board .

check it once.

--Sudheer

0 Kudos
Reply

1,055 Views
shaun2
Contributor I

Hi sudneer : 

Thanks for your reply.

Sorry, I don't understand more USB know-how and your mean.
I had set usb_param.usb_reg_base = 0x40006000, and it's follow SPEC. USB address.
could you help let me know what's wrong is my fault and how to fix it ?

0 Kudos
Reply

1,055 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Shaun,

     Could you tell me the detail information about your project?

     Because I didn't find the CDC_UART in the IAR information center for ARM.

    Which one you find your project in the following examples?

pastedImage_1.png

    Waiting for your reply!


Have a great day,
Jingjing

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

0 Kudos
Reply