NFC reader library porting guide for LPC11u37h(Ver 5.12) - Porting NfcrdlibEx1_BasicDiscoveryLoop

cancel
Showing results for 
Search instead for 
Did you mean: 

NFC reader library porting guide for LPC11u37h(Ver 5.12) - Porting NfcrdlibEx1_BasicDiscoveryLoop

No ratings

NFC reader library porting guide for LPC11u37h(Ver 5.12) - Porting NfcrdlibEx1_BasicDiscoveryLoop

The latest NFC reader library supports lpc1769 which is a cortex M3 controller with LPCopen lib supports, so in theory , it should supports other controllers supported by LPCopen, but we have to test this, so we choose , for example, lpc11u37, a cortex M0 based controller for this porting.

Platform for this porting:

LPC11u37h-Xpresso Rev A:

pastedImage_1.png

CLRC663 plus based CLEV663B Blueboard 3.0. Please refer to Prepare CLEV663B board for NFC reader library porting  for details.

pastedImage_3.png

They are connected via LPCXpresso ports.

Now we may start the porting, the IDE we use in this porting is MCUXpresso 10.1.1

1. Download and import the latest NFC reader library for CLEV6630B, as it supports CLRC663 plus.pastedImage_4.png

For how to import the project, please refer to https://www.nxp.com/docs/en/application-note/AN11211.pdf .

2. Download LPCopen for LPC11u37h and import it as well.

pastedImage_6.png

pastedImage_8.png

3. Now we may choose some demo in the NFC reader library, for example, the NfcrdlibEx1_BasicDiscoveryLoop, and create new build configuration for lpc11u37h.

pastedImage_9.png

pastedImage_10.png

4.Select the correct MCU

pastedImage_11.png

5.Modify build settings

pastedImage_12.png

Here we find LPC1769RC663 is defined, so we have to find what is related with this definition in the code and change it/them.

pastedImage_13.png

Fortunately they are not too many. you may find they are just related with board header file including or something like that, so it is not difficult to modify them.

pastedImage_14.png

6. Add new header file for the new board definition

pastedImage_15.png

7. add the new board definition

pastedImage_16.png

8. As we now use LPCopen lib for LPC11u37h instead, so we have to change the including path.

pastedImage_17.png

pastedImage_25.png

As LPC11u37h is cortex M3 based, so we have to setup FreeRTOS for M0 support:

pastedImage_23.png

and add the source code for building:

pastedImage_5.png

9.Change the link libraries and including path

pastedImage_1.png

pastedImage_2.png

pastedImage_3.png

pastedImage_4.png

10.Set the correct ref projects to use LPCopen for LPC11u37h.

pastedImage_24.png

11. Some changes in LPCopen library:

1)enable semihosting debug

pastedImage_1.png

2) add startup source code for the demo, this C file can be reused/imported from the some lpcopen project.

pastedImage_2.png

12. After the above steps, we still have to change the source code in DAL:

pastedImage_3.png

You know , due to different version of LPCopen library,  some function definition might be changed, and different LPCXpresso boards has different pin connection to the LPCXpresso ports, so it is recommended checking the board schematics and the examples in lpcopen project , find the proper function calls to implement the source codes in the DAL folder. When you finished , the porting is done.

13. As the final image size is greater than 128K, we have enable optimization for size.

pastedImage_2.png

14.Demo test ok.

pastedImage_4.png

Now , we know lpc11u37 can be supported by the latest NFC reader library, so the porting should also be applied for other Cortex M0 controllers, and it is recommended the controller with large internal flash size, better greater than 128K, but anyway, in this porting, I didn't enable the size optimization for LPCopen library, so there might be possibility to have a smaller size image at last...

Tags (2)
Version history
Revision #:
1 of 1
Last update:
‎05-18-2018 01:49 AM
Updated by: