2021-04-21 01:34 PM
I use CR95HF with UART communication for some applications. I notice that occasionally (seemingly at random) the CR95 will stop responding to any UART commands. I send an ECHO and receive no response. I have experienced this with several of my own designs as well as with X-NUCLEO-NFC03A1 development board
On the rare occasion that I catch this and am able to troubleshoot I have tried cycling power to the chip. This usually fixes it, but not always. Sometimes I have to leave power off for minutes before it will work again.
I began suspecting that the issue was temperature dependent as the problem only seems to occur after ~1 hour of being powered up. I tested heating and cooling the device while sending ECHO commands but could not reproduce the problem at all.
My best guess now is that the problem stems from the crystal oscillator. I noticed that the oscillator is not always running during normal operation. Perhaps it has trouble starting up in some scenarios?
Is there any known issue with the UART interface? I notice it was removed on newer ST25 chipsets. Is there anything else I can test to troubleshoot this further?
I appreciate any insight,
Ivan
Edit:
I was able to reproduce this by temporarily shorting one side of the oscillator to ground. After removing the short, it resumes oscillation but the UART interface in non-functional until a power cycle.
Obviously, this is not how the problem occurs in reality, but I believe it happens by a similar method where the clock gets disturbed for whatever reason.
Is there any way to recover from this state that does not require cycling power?
Solved! Go to Solution.
2021-04-22 04:56 AM
Hi Ivan,
Can you share some details about how you reproduce this issue on X-NUCLEO-NFC03A1 expansion board? On my side, I had the X-NUCLEO-NFC03A1 in UART mode polling tags for hours without any specific issues.
Is your PCB inside a closed casing? Is the ambiant temperature high?
Can you also share details about your firmware implementation:
Can you attach a logic analyzer on the UART and provide a trace?
Rgds
BT
2021-04-22 04:56 AM
Hi Ivan,
Can you share some details about how you reproduce this issue on X-NUCLEO-NFC03A1 expansion board? On my side, I had the X-NUCLEO-NFC03A1 in UART mode polling tags for hours without any specific issues.
Is your PCB inside a closed casing? Is the ambiant temperature high?
Can you also share details about your firmware implementation:
Can you attach a logic analyzer on the UART and provide a trace?
Rgds
BT
2021-04-22 11:36 AM
Hi Brian,
Thanks for your reply. I believe the UART Reset workaround you provided fixes this issue for me. Here is some more detail about my test setup:
X-NUCLEO-NFC03A1 is connected to PC via FT232 USB-UART bridge. The PC sends Echo command (0x55) every ~100 ms.
To reproduce the issue, I briefly short the crystal tuning capacitor, C16. Sometimes, it takes several attempts for the failure to occur.
Now, the module will stop responding to Echo commands.
As you mentioned in the other thread, this is probably due to the UART becoming unsynchronized. I tried the workaround of sending 528x dummy bytes and this resets the UART and brings it back to a working state.
I have captured a UART trace from the test setup I described above, but there is nothing interesting. The module simply stops transmitting from the UART after I induce the failure.
Anyway, I will implement the UART buffer reset trick in my applications and see if that is able to restore communication in all cases. I have a feeling there is something else going, since as previously mentioned, even power cycling does not always fix it.
Thanks for you suggestion,
Ivan