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