This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello
I have been trying to communicate with the PN532 chip via. the TM4C123 for a while now. I can send the data (with the preample, startcode etc) correct. But as soon as i try to read the response, i get an error which is referred to as Addr_NACK. So i guess that the module accepts the command to recive data, but not the send data? The MCS register is:
1000110
When it fails. Thats the:
BusBusy, ADRACK and ERROR flags going high.
I am using the driverlib to send and read the data from the unit. Any ideas as to what could be my problem? I have ordered a logic analyser, but that isn't going to get to me in some days, and i really would love to get it working.
I can provide any info that could lead to a solution!
Thanks!
But since it does acknowledge The write commands prior to The read, this shouldn't be The case i guess? It does send 8 bytes prior to The read command.
Thanks!
I got my logic analyser and the signals looks good, except 2 things!
After the "Setup to write" command, and after the clock is pulled low, the sda goes high for a very short amount of time. And i cant see how that should happen. See this image:
And another problem is that between every byte send and recieved, there is a delay of around 10mS.
I am testing this up again an arduino where the PN532 works perfectly. I compare the signals of both boards.
Any ideas?
Yes, i use The i2cmread function, and it gives The delay. Ive gone through The code and i cant find a source of The delay anywhere. I tried
Writing The registers manually ane that avoided The delay, but The read didnt work.
I have actually read some of The data out From The unit now. Out of 10 bytes, i read The last 4 correctly, but I miss The first 6 bytes.
Thanks