Required steps for porting NFC_NXP_Lib to LPC11u68

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

Required steps for porting NFC_NXP_Lib to LPC11u68

2,229 Views
mahmoudhosseini
Contributor III

Hi every one,

I'm trying to port nxp_nfc_lib to the lpc11u68 mcu ,as you know supporting this mcu is removed in latest library release(V4.06),but because of complex relation between sources,I was not able to do this.

I also test V4.03 which contain lpc11u68 configuration,but when I changed build configuration and mcu setting from lpc1769 to lpc11u68 and uncommenting #define NXPBUILD__PH_LPC11U68,examples are not compiled successfully,seems compiler can not recognized hardware peripheral(spi,gpio,...)

Is there any one here with successfully running this library on lpc11u68?

Also why there is phPlatform_Port_LPC1769_PN5180.h header file but there is not some thing like that for lpc11u68 and pn5180 ?I'm using lpcxpressi 8.2.2

WBR

Labels (2)
Tags (3)
0 Kudos
Reply
6 Replies

1,741 Views
mahmoudhosseini
Contributor III

Dear Kan_Li,

Thank you for replying me.

As I said before,I do this steps and example is compiled successfully,But the problem is after executing below line :

            /* Run Discovery loop */
            status = phacDiscLoop_Run(&sDiscLoop, PHAC_DISCLOOP_ENTRY_POINT_POLL);

===>>

    /*Start the timer*/

 PH_CHECK_SUCCESS_FCT(statusTmp,phhalHw_Pn5180_WaitIrq(pDataParams,PH_ON,PH_OFF,IRQ_STATUS_TIMER0_IRQ_MASK,&dwIrqStatusReg));

===>>

            statusTmp = phOsal_EventPend(pDataParams->HwEventObj.EventHandle, E_OS_EVENT_OPT_PEND_SET_ANY, PHOSAL_MAX_DELAY,
                (E_PH_OSAL_EVT_RF | E_PH_OSAL_EVT_ABORT), &tReceivedEvents);

MCU hangs and does not return from the function(in both FREERTOS and NULLOS mode ).

and about using latest version , the problem is there is not any update porting guide document for this library.

-------------------------------------------

EDIT:

 After changing  irq pin trigger from falling to rising edge, and using register level operation instead of Chip_SYSCTL_SetPinInterrupt() ,now it is works correctly.

WBR,Mahmoud.

0 Kudos
Reply

1,741 Views
mahmoudhosseini
Contributor III

Dear Kan_Li,

As I said before ,I wrote phPlatform_Port_LPC1769_PN5180.h and include that file in phplatform.h , then  example is compiled successfully.

But there  are some other bugs yet:

e.g. :

SSP0_CLK pin is set in func0 mode, while func0 is GPIO and for using as SSP_Clock pin it must be set as func1

DWL and Busy pin configurations are uncomplete and must be correct.

IRQ pin and handler is un-complete and must be modify.

after this changes I can successfully read and write registers of pn5180,but steal can not detect mifare classic.

I assume there is some thing wrong in timer or IRQ-pin related function.

WBR,Mahmoud.

0 Kudos
Reply

1,741 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Mahmoud HosseiniPour,

Thank you for using our NFC solutions, unfortunately support of the LPC11U68 µC is removed from the NFC Reader Library package.
Regarding issue, you are facing, I would suggest you:
1.    Use the latest library (v04.06.00), as only the latest version contains all features and bug fixes. This version does not provide support for the LPC11U68, but it should not be the issue to port it on this µC.
2.    Using version 04.030.00.011627, as you already found, in the project file “phPlatform_Port_LPC11u68_PN5180.h” is missing. In that case the best would be to create a copy of the “phPlatform_Port_LPC1769_PN5180.h” and merge it with the µC part from the “phPlatform_Port_LPC11u68_RC663.h”.
 
 
I hope this will help you to solve the problem.


Have a great day,
Kan

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

0 Kudos
Reply

1,741 Views
mahmoudhosseini
Contributor III

Seems NXP's support team does not interested to answer to questions from some specific countries and questions from some others are more interesting to answer(maybe because of businesses and purchasing potential in this countries or some thing else...).

Any way for successful building ,after changing above configs mentioned in manual , you need to create phPlatform_Port_LPC11u68_PN5180.h file in intfs directory and customize it based on your hardware ,then include it in phplatform.h header file.

Then you are able to build successfully your example for lpc11u68 mcu,(however I can;t detect a PICC successfully yet ).

WBR.

0 Kudos
Reply

1,741 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Mahmoud HosseiniPour,

Yes, I also think this issue is due to the missing header file like phPlatform_Port_LPC1769_PN5180.h, I am checking with our AE team if such file is available, and will let you know when I have any more information.

Thanks for your patience!

Have a great day!

Kan

0 Kudos
Reply

1,741 Views
mahmoudhosseini
Contributor III

I also attached a picture of errors which are appear in compiling process:

As you can see ,seems there is some thing wrong in library with lpc11u68 which cause compiler can not recognized spi,gpio functions.

LPC11u68_PN5180.jpg

0 Kudos
Reply