PN7150 library under FreeRTOS

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

PN7150 library under FreeRTOS

ソリューションへジャンプ
2,958件の閲覧回数
naga
Contributor III

Hi,

Using the latest version of the software library for NFC / PN7150 integrated in FreeRTOS I found the following deficiency: When the only task that is active is task_nfc () everything works correctly and after reading the card I receive the following message:

WAITING FOR DEVICE DISCOVERY
  - POLL MODE: Remote T2T enabled
         SENS_RES = 0x44 0x0
         NFCID = 4 60 74 12 and 57 81
         SEL_RES = 0x0
--- NDEF record received:
    Record URI: http://identiv.com/nfc-kit

CARD REMOVED

When I create a new task under RTOS, running in parallel with task_nfc (), the NDEF information is no longer read. In this case the message is as follows:

WAITING FOR DEVICE DISCOVERY
  - POLL MODE: Remote T2T enabled
         SENS_RES = 0x44 0x0
         NFCID = 4 60 74 12 and 57 81
         SEL_RES = 0x0

CARD REMOVED

Is it possible to be a timing failure when it comes to interpreting the interrupt signal NXPNCI_IRQ_PIN or the IrqSem semaphore?

Using the NCI_DEBUG precompilation directive you can get the following record:

In case of success:

WAITING FOR DEVICE DISCOVERY
NCI << 60 07 01 a1
NCI << 60 07 01 a1
NCI << 60 07 01 a1
NCI << 60 07 01 a1
NCI << 60 07 01 a1
NCI << 60 07 01 a1
NCI << 61 05 17 01 01 02 00 ff 01 0c 44 00 07 04 60 74 12 0e 57 81 01 00 00 00 00 00
- POLL MODE: Remote T2T activated
SENS_RES = 0x44 0x0
NFCID = 4 60 74 12 e 57 81
SEL_RES = 0x0
NCI >> 00 00 02 30 03
NCI << 60 06 03 01 00 01
NCI << 00 00 11 e1 10 6d 00 03 18 d1 01 14 55 03 69 64 65 6e 74 00
NCI >> 00 00 02 30 04
NCI << 60 06 03 01 00 01
NCI << 00 00 11 03 18 d1 01 14 55 03 69 64 65 6e 74 69 76 2e 63 00
NCI >> 00 00 02 30 08
NCI << 60 06 03 01 00 01
NCI << 00 00 11 6f 6d 2f 6e 66 63 2d 6b 69 74 fe 00 00 00 00 00 00
--- NDEF record received:
URI record: http://identiv.com/nfc-kit

NCI >> 00 00 02 30 00
NCI << 60 06 03 01 00 01
NCI << 00 00 01 02
CARD REMOVED
NCI >> 21 06 01 00
NCI << 41 06 01 00
NCI << 61 06 02 00 00
NCI >> 21 03 15 0a 00 01 02 01 01 01 06 01 03 01 80 01 81 01 82 01 83 01 85 01
NCI << 41 03 01 00

WAITING FOR DEVICE DISCOVERY
NCI << 60 07 01 a1
NCI << 60 07 01 a1

In case of failure:

WAITING FOR DEVICE DISCOVERY
NCI << 60 07 01 a1
NCI << 60 07 01 a1
NCI << 61 05 17 01 01 02 00 ff 01 0c 44 00 07 04 60 74 12 0e 57 81 01 00 00 00 00 00
- POLL MODE: Remote T2T activated
SENS_RES = 0x44 0x0
NFCID = 4 60 74 12 e 57 81
SEL_RES = 0x0
NCI >> 00 00 02 30 03
NCI << 60 06 03 01 00 01
NCI << 00 00 11 e1 10 6d 00 03 18 d1 01 14 55 03 69 64 65 6e 74 00
NCI >> 00 00 02 30 04
NCI << 60 06 03 01 00 01
NCI << 00 00 11 03 18 d1 01 14 55 03 69 64 65 6e 74 69 76 2e 63 00
NCI >> 00 00 02 30 08
NCI << 60 06 03 01 00 01
NCI << 00 00 01 02
NCI >> 00 00 02 30 00
NCI << 60 06 03 01 00 01
NCI << 00 00 02 07 00
CARD REMOVED
NCI >> 21 06 01 00
NCI << 41 06 01 00
NCI << 61 06 02 00 00
NCI >> 21 03 15 0a 00 01 02 01 01 01 06 01 03 01 80 01 81 01 82 01 83 01 85 01
NCI << 41 03 01 00

Regards,

Neculai Agavriloaie

ラベル(2)
0 件の賞賛
返信
1 解決策
2,742件の閲覧回数
naga
Contributor III

Hello,

The program runs on the development board of the iMX RT1064 microcontroller.

In the meantime I solved the problem.

It is necessary to increase the space allocated for the memory stack for the NFC task.

The value declared in this library (#define TASK_NFC_STACK_SIZE 1024) is insufficient.

Regards,

Neculai

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
2,743件の閲覧回数
naga
Contributor III

Hello,

The program runs on the development board of the iMX RT1064 microcontroller.

In the meantime I solved the problem.

It is necessary to increase the space allocated for the memory stack for the NFC task.

The value declared in this library (#define TASK_NFC_STACK_SIZE 1024) is insufficient.

Regards,

Neculai

0 件の賞賛
返信
2,742件の閲覧回数
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

It is good that it works now.


Regards,
Estephania

0 件の賞賛
返信
2,742件の閲覧回数
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

Which host are you using ? Unless your device includes more than one core to perform the task you can't really have two tasks working at the same time, you will need to make sure to release the necessary resources in order to let the device work correctly and make sure that the transmission is not being interrupted. 

Regards,
Estephania

0 件の賞賛
返信