Hello, I'm trying to use a PN532 over i2c. Master i2c is an AVR8 (ATMega 1284). This PN532 was added on a board that contains several other i2c devices that run as expected (for exemple MCP23008, MCP79410...).
I think can send data to PN532 as it answers with a regular ACK frame. But after this answer, i2c bus remains in a strange state. After ACK reception, CPU cannot send data anymore.
You will find in attachement a piece of code. When I call pn532_init(), I receive on serial console:
PN532/1 OK
123456(00)6(00)6(FF)6(00)6(FF)6(00)789PN532/2 OK
12
Thus:
1/ GetFirmwareVersion command is sent to PN532;
2/ Frame seems to be understood by PN532 as pn532_wait_for_ack() successfully returns (PN532 sends 00 00 FF 00 FF 00)
3/ pn532_receive_frame() stalls in i2c_putchar() as TWINT bit was never set.
I suppose I have done a mistake somewhere. Help will be welcome.
Regards,
JB