Using the PN7150 and reducing the NCI library for a ARM C0

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Using the PN7150 and reducing the NCI library for a ARM C0

1,714 次查看
kroeger
Contributor II

Hello,
I want to port the NCI-library to a non-NXP ARM core CPU with Bluetooth interface. What I found, was a project for such a core and the NCO library seems to use the free/open Source RTOS.
My starting point was MCUXpresso, the project was compiled and linked for a similar NXP CPU. 
My question is, where I can strip down the library in order to reduce the code amount, when I limit the functionality to just reading the UID of the tag - no memory reads or writes, only type V tags (ISO 15993) from NXP. No secure transactions, to emulation of a card. Just reading the UID and that's it. 
Help and hints are welcome!

Regards
Joachim

标记 (1)
6 回复数

1,518 次查看
kroeger
Contributor II

Sometimes the simple ideas are best. I will try to reduce the amount of usage. If I don't pass the barrier, I modify unused library content, if I can see, it is included just by references.
The CLRC663 plus was my first candidate. It turned out, the code to port was too much. I worked with that for 8 weeks. Now, the PN7150 seemed a better option, til I discovered the library size.
I was at hope for preprocessor switches, which switch off whole areas.

0 项奖励

1,518 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

I am not sure if you have looked into https://www.nxp.com/downloads/en/software/210910.zip,  the "RC663_ISO15693_Inventory" demo in it is not a NFC reader library based project, it is just a script file sending commands to CLRC663 and getting the UID from its FIFO. I think it should be what you are looking for, and what you have to do is turning the script language to a C souce code.

Hope that makes sense,

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

1,518 次查看
kroeger
Contributor II

Oh my god,      Kan
that looks promising!  Kan, you are my hero, you saved my day!

Where can I find related documentation for the script commands?
I found none in the zip.
But it looks like

   SR is 'set register' with two parameters, first the register second the value

   SLP <value> is mysterious

   GR <value> is mysterious

That looks like a loop:

   ::: L_WaitTransceiveFinished
   GR 07 // Response: 60
   JNM IOR 40 40 L_WaitTransceiveFinished     // what are these values for ?

What is IOR for ?

The sequence of GRs to read the fifo have parameters. I have no idea what these are for.

I will be able to turn that into C code easily. But I need to understand the GR, JNM and IOR commands.


Thanks a lot
Joachim

0 项奖励

1,518 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Joachim,

SLP means sleep/wait function, GR means reading register, for the loop translation, you may refer to RC52xPcSerial Command explanation .

BTW, there is a new app note on that topic , and it contains a pseudo code for ISO15692 tag Inventory operation as well, please kindly refer to https://www.nxp.com/docs/en/application-note/AN12657.pdf for details.

Hope that helps,

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励

1,518 次查看
kroeger
Contributor II

Hello Kan,

I am in progress to write the code. I use a project from those samples, which are available for the blueboard with CLRC663, the LPC1769 and the NFC library. I analyzed the initialization, but havn't found the file(s), where the interrupt table is defined and the interrupt is finally enabled. The script code does not use the interrupt, but at least, I need to disable it or rewrite the stuff to use the interrupt. I reuse the MCU pin initialization and SPI driver etc.;
Can you give me a hint to the file(s) name(s), where I should look into ?
Using the timer as sample, I was not able to find references to the handlers.

Thanks for help!

Greetings,
Joachim

P.S. Edit: lpc_board_nxp_lpcxpresso_1769\src\cr_startup_lpc175x_6x.c  seems to contain the vector table and contains Linker instructions for the section.
I remember my oldest usage ... I think, it is resolved now. 

0 项奖励

1,518 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Actually The NXP-NCI library also supports non-RTOS mode, and from my understanding, even the library size is very large, the application size depends on the functions linked from the library, so don't worry about the size if you just want to implement a simple application.

BTW, if you just want to implement the UID reading operation to an ISO 15993 tag , why not looking at a NFC front end with your MCU? for example, the CLRC663 plus . It also provides an example on such kind of operation, please refer to "RC663_ISO15693_Inventory" demo from the following link:

https://www.nxp.com/downloads/en/software/210910.zip 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------