2020-07-04 04:53 AM
Hi ,
We have done preliminary test on X-Nucleo-NFC05A1 and than made our custom board using the reference circuit provided.
We have followed the sequence for Card Detection:
Now the the function work as follows:
So before and after this function st25r3911OscOn() , everything looks good , just we are not getting what causing the error in st25r3911OscOn().
We have connected the 27.12MHz Crystal.
Also we have noticed that frquency of 9MHz on CRO across the crystal, so it is Okay ?
Moreover need a review on Power Supply section of the schematic.
I am attaching the screenshot , and in this
we have kept R7 Open and +5V Not Connected.
So any guess what is causing the issue ?
Solved! Go to Solution.
2020-07-06 05:07 AM
Hello Vaibh_p,
If components are missing in the matching circuit, you will most likely have problems detecting the tags. This can cause either a reduced detection range or no detection at all.
It seems, that there is something wrong with your crystal. It should either resonate at 13.56MHz or 27.12MHz. The bit "osc" in the IO Configuration Register 1 has to be set accordingly. Can you maybe populate the crystal of the ST25R3911B-DISCO or NFC05A1?
I just measured the XTI pin of the ST25R3911B-DISCO.
BR Travis
2020-07-06 12:09 AM
Hello,
Looking at your power circuit it looks good.
I assume R16 and R7 are not connected. Your MCU is connected (VDD_MCU) to "+3V3".
The 9MHz at the crystal sounds very strange to me. At the time you enable the osc, a signal will be driven by the ST25R3911B on the XTO pin. This signal is causing the crystal to resonate. If you attach a scope you should see the following picture:
Green channel: VDD
Red channel: XTI
around 874us (at my scope shot) the crystal is already resonating at 27.12MHz. The magnitude of the crystal signal should be around 0.7Vpp to 1Vpp at the end. Please ignore the shape past Marker X2 since it is related to the wake-up pulse and turning off the crystal.
please let me know, if you are seeing the same signals on your board.
BR Travis
2020-07-06 12:51 AM
Hi Vaibhav,
Which version of RFAL are you using? (See #define RFAL_VERSION in rfal_rf.h).
In old version of RFAL, st25r3911OscOn does not return any error code. Since version 2.2.0, st25r3911OscOn returns a status but the return value cannot be ERR_NOMEM. Only 2 possible values:
I believe st25r3911OscOn likely returns ERR_SYSTEM in your case: as suggested by Travis, the 27.12MHz cristal should be checked
Rgds
BT
2020-07-06 01:20 AM
Thank you Brian for quick reply.
The RFAL Version is v2.0.10 and it is defined as "#define RFAL_VERSION (uint32_t)0x02000aU "
Meanwhile I am checking out with things suggested by Travis for Crystal oscillations.
2020-07-06 01:43 AM
Hi
in RFAL v2.0.10, st25r3911OscOn does not return any status (void st25r3911OscOn( void )).
Here is an updated version of st25r3911OscOn that checks that the effective oscillator status (lines 21-25) and returns a status. This may help you during investigation.
ReturnCode st25r3911OscOn( void )
{
/* Check if oscillator is already turned on and stable */
/* Use ST25R3911_REG_OP_CONTROL_en instead of ST25R3911_REG_AUX_DISPLAY_osc_ok to be on the safe side */
if( !st25r3911CheckReg( ST25R3911_REG_OP_CONTROL, ST25R3911_REG_OP_CONTROL_en, ST25R3911_REG_OP_CONTROL_en ) )
{
/* Clear any eventual previous oscillator IRQ */
st25r3911GetInterrupt( ST25R3911_IRQ_MASK_OSC );
/* enable oscillator frequency stable interrupt */
st25r3911EnableInterrupts(ST25R3911_IRQ_MASK_OSC);
/* enable oscillator and regulator output */
st25r3911ModifyRegister(ST25R3911_REG_OP_CONTROL, 0x00, ST25R3911_REG_OP_CONTROL_en);
/* wait for the oscillator interrupt */
st25r3911WaitForInterruptsTimed(ST25R3911_IRQ_MASK_OSC, ST25R3911_OSC_STABLE_TIMEOUT);
st25r3911DisableInterrupts(ST25R3911_IRQ_MASK_OSC);
}
/* Double check that OSC_OK signal is set */
if( !st25r3911CheckReg( ST25R3911_REG_AUX_DISPLAY, ST25R3911_REG_AUX_DISPLAY_osc_ok, ST25R3911_REG_AUX_DISPLAY_osc_ok ) )
{
return ERR_SYSTEM;
}
return ERR_NONE;
}
Rgds
BT
2020-07-06 01:44 AM
Hi Travis, Thanks for the reply.
As mentioned in my query , we have not connected "+5V" in the circuit.
Everything is powered with "+3.3V", so we have connected "R16 and R6" and "R7" was left open. The "+5V" is kept for future use and not connected as of now.
Yes correct MCU is connected to to same "+3.3V".
So do we need to provide "+5V" also ?
I am attaching entire schematic for reference, please have a look on it and do suggest us.
Also , will the problem in supply section cause the problem in oscillator frequency ?
Thank you.
2020-07-06 01:50 AM
Thanks Brian ,
So if I am correct , I can directly add this lines [Line 21 to 25] in existing code rather than porting to latest version of RFAL Library.
2020-07-06 02:01 AM
Hello,
VDD can be connected to +3V3 (same voltage as VDD_IO).
As long as VDD_IO and VDD are powered there should be no problem at all.
Can you confirm that the crystal is starting?
BR Travis
2020-07-06 02:04 AM
yes and make sure to modify the function prototype declaration in st25r3911.h.
You can also modify st25r3911Initialize to replace
st25r3911OscOn()
by
ret = st25r3911OscOn();
if( ret != ERR_NONE )
{
return ret;
}
Rgds
BT
2020-07-06 02:15 AM
Okay , Thank you so much Brian for the suggestions , I will implement that and let you know.