PN532 via I2C, SCL stuck low forever

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PN532 via I2C, SCL stuck low forever

2,737 Views
kychu
Contributor I

I am developing an MCU software code to control PN532 via I2C.  The HREQ and IRQ are used in the communication.  The communications with success replies from PN532 throughout SAMConfiguration, InListPassiveTarget and InDataExchange (Authentication).  After the above, falling edge of HREQ leads to IRQ low and SCL is stuck low.  This disables SLV,48 sending.  Please advise why the symptom of SCL stuck low forever is.  Thanks.

0 Kudos
Reply
15 Replies

2,374 Views
kychu
Contributor I

Hi Kan,

I have further tried to use SLV,48 only without HREQ.  The PN532 can reply successfully from SAMConfiguration, InListPassiveTarget and InDataExchange (Authentication).  However, when I start to transmit SLV,48 and 16 bytes reading command, the SCL is stuck low by the PN532 forever.  Actually, the SLV,48 and 16 bytes reading command cannot be sent due to SCL stuck low forever.  Please refer to the firmware of the PN532 for the reason of the symptom.

KY Chu

0 Kudos
Reply

2,374 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi KY CHU,

What does "SLV,48 and 16 bytes reading command" mean? Does 48 mean 0x48? Actually 0x48 is the PN532 address for write operation, 0x49 is for read operation. Please refer to the following for details.

pastedImage_1.png


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

2,374 Views
kychu
Contributor I

Hi Kan,

Please advise an effective means I can directly talk with you in order to solve my problem asap.  Thanks.

KY Chu

0 Kudos
Reply

2,374 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi KY Chu,

Which tag do you want to use PN532 to read? Is it possible to have a review of your schematics? You may create a private case via http://nxpcommunity.force.com/community/CommunityContextPage to submit the schematics.

Thanks for your patience!


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

2,374 Views
kychu
Contributor I

Hi Kan,

Thanks for your follow-up.  I would like to know what is the condition for PN532 stuck low scl forever.  Please help check the built-in firmware of PN532.  Then I can follow your information to solve my problem ASAP. 

KY Chu

0 Kudos
Reply

2,374 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi KY Chu,

Did you meet this issue right after InDataExchange command and before issuing the "SLV,48 and 16 bytes reading command"? Did you handle InDataExchange command correctly? Please kindly refer to the following for details.

pastedImage_1.png

Please kindly clarify.


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

2,374 Views
kychu
Contributor I

 Hi Kan,

As my mention before, my MCU can do all the communications with the PN532 up to  InDataExchange (Authentication).  The PN532 can reply successfully from SAMConfiguration, InListPassiveTarget and InDataExchange (Authentication).  Then if my MCU drives SCL from high to low, the PN532 would directly stick SCL to low forever.  Therefore my MCU cannot further control SCL, and nothing can do.  The only solution is to find out why the PN532 would directly stick SCL to low forever.  Please check your PN532 built-in firmware to tell me the reason.  Thanks.

KY Chu

0 Kudos
Reply

2,374 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi KY Chu,

I am sorry I don't have the source of the firmware, but I may try to reproduce the issue here, would you please provide more details for the process to make this issue happen? Thanks for your patience!

B.R

Kan

0 Kudos
Reply

2,374 Views
kychu
Contributor I

Hi Kan,

I don't think you have the source code.  However, you can pass my question to the corresponding department or personnel. 

On the other hand, please advise what do you want to know.  Please list out them.

KY Chu

0 Kudos
Reply

2,374 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi KY Chu,

Would you please provide more details for the process to make this issue happen? I mean the log of data transaction between the host controller and PN532.

Thanks for your patience!

Best Regards,

Kan

0 Kudos
Reply

2,374 Views
kychu
Contributor I

Hi Kan,

SLV,48 is exactly same as your SLV+W, i.e. write operation at PN532 address (0x48).

KY Chu

0 Kudos
Reply

2,374 Views
kychu
Contributor I

Hi, Kan,

 

Thanks for your query. PN532 P32_INT0 is used for HREQ.

 

KY Chu

0 Kudos
Reply

2,374 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi KY Chu,

Thanks for the information! Actually HREQ line is optional, and when neither the PN532 nor the host controller is in Power Down mode, the host controller does not need to assert the H_REQ line.

Would this issue occur without using the HREQ line?

Please kindly clarify.


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

2,374 Views
kychu
Contributor I

Hi, Kan,

I have tried to use SLV,48 only without HREQ, but IRQ has no response at all, i.e. always kept logic high.  Therefore I have no choice but using HREQ to trigger IRQ.  Please give your kind advice accordingly.

KY Chu

0 Kudos
Reply

2,374 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi KY CHU,

I am sorry, but which pin are you referring to for HREQ? Would you please clarify? Thanks for your patience!

pastedImage_1.png


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply