Please help me with PN5180 RATS

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

Please help me with PN5180 RATS

599 次查看
scottheo
Contributor I

I am using PN5180A.
MCU stm32F103RTC6
CARD Desfire Ev1

ATQA 0344 response
SAK 0x24 response

I checked up to that point.

To check RATS, I sent 0xE0, 0x80 OR 0xE0, 0x50,

but the response is 0xff...

Is there a problem?

The source code is as follows.

PN5180_WriteBytes(RATS_CMD, sizeof(RATS_CMD));
HAL_Delay(10);

PN5180_ReadBytes(ATS_Response, ATS_Length);

//int ret = ISO14443_CommandSendAndRecvData(RATS_CMD, sizeof(RATS_CMD), ATS_Response, &ATS_Length);

for (int i = 0; i < ATS_Length; i++) {
printf("0x%02X ", ATS_Response[i]);
}
printf("\r\n");

 

void PN5180_ReadBytes(void *Buffer, uint32_t len) {
int i = 0;
uint8_t *p = (uint8_t*) Buffer;

/* Wait for the Busy to be low */
while (PN5180_BusyPinIsHigh()) {
}

/* Enable chip select connected to reader IC by pulling NSS low. */
PN5180_Select();

/* Build the Command frame and send it */
for (i = 0; i < len; i++) {
*p++ = PN5180_SPI_ReadWriteByte(0XFF);
}

/* Disable chip select connected to reader IC by pulling NSS high. */
PN5180_DisSelect();
}

void PN5180_WriteBytes(const void *Buffer, uint32_t len) {
int i = 0;
uint8_t *p = (uint8_t*) Buffer;

/* Wait for the Busy to be low */
while (PN5180_BusyPinIsHigh()) {
}

/* Enable chip select connected to reader IC by pulling NSS low. */
PN5180_Select();

/* Build the Command frame and send it */
for (i = 0; i < len; i++) {
PN5180_SPI_ReadWriteByte(*p++);
}

/* Disable chip select connected to reader IC by pulling NSS high. */
PN5180_DisSelect();
}

help

0 项奖励
回复
1 回复

586 次查看
KaiLi
NXP TechSupport
NXP TechSupport

Hello @scottheo 

It's recommanded that you can refer SW6257 to debug your code.

You can log in PN5180 | NFC IC for POS Solutions | NXP Semiconductors to download SW6257

0 项奖励
回复