Skip to main content
Visitor II
June 19, 2025
Solved

tag reading with the NFC X-NUCLEO-NFC08A1 extension connected to an STM32L073RZ.

  • June 19, 2025
  • 12 replies
  • 1999 views

 


Hello,

Tag reading was working perfectly on my previous setup.

I now want to migrate my project from an STM32G0B1RE to an STM32L073RZ. Since the Arduino UNO R3 physical pinout standard is respected, the X-NUCLEO-NFC08A1 shield (which uses SPI, IRQ, LEDs, etc.) remains pin-compatible across different STM32 Nucleo boards (G0, L0, L4, etc.), as long as they follow the UNO R3 layout.

So, I created a new project in STM32CubeMX targeting the STM32L073RZ, and reused the configuration from my working G0-based project.

Current status:

Initially, execution would stop inside `demoCycle()`, initialization was successful (I could see `Initialization succeeded` in the UART), but no tags could be read.

After fixing the IRQ setup, execution no longer reaches `demoCycle()`, it now stops at the call to `MX_X_CUBE_NFC6_Init()`.

Any idea what could be preventing `rfalNfcInitialize()` from completing correctly on the STM32L073RZ?

Thanks in advance!

    This topic has been closed for replies.
    Best answer by Brian TIDAL

    Hi,

    this is almost the same configuration except for the drive strength of the GPIO (the "speed" parameter): GPIO_SPEED_FREQ_LOW in your project and GPIO_SPEED_FREQ_VERY_HIGH in my test. With GPIO_SPEED_FREQ_LOW, when reading the IC identity register 3Fh, the last received bit is 0 instead of 1. Thus the IC Identity check fails.

    This SPI behavior is documented in the section 2.15.3 Corrupted last bit of the  ES0292 STM32L07xxx/L08xxx device errata. See the workaround section (e.g. use GPIO_SPEED_FREQ_VERY_HIGH).

    This should help to fix your issue: this was not an easy one.

    Rgds

    BT

    12 replies

    Technical Moderator
    June 25, 2025

    Hi,

    please check the pin assignment. See UM1724

    BrianTIDAL_0-1750856993779.png

    SPI CS pin is likely not properly assigned.

    Rgds

    BT

    P.-S. your trace are not a logic analyzer trace but a scope traces. Make sure to use a logic analyzer.

     

    Visitor II
    June 25, 2025

    Hi,

    Yes, you're right — the CS pin is on PB6, and that was indeed my original configuration before I changed it.

    I've now restored PB6 as the CS pin, and it's still not working.

    What I observe is that the blue TX LED on the X-NUCLEO-NFC08A1 is blinking, but I'm still not getting any tag detection.

    Rgds

    Technical Moderator
    June 25, 2025

    Hi, 

    please try to be systematic:

    1. Verify basic communication. Can you read register?
    2. Can you write registers?
    3. With SELFTEST enabled: Does rfalInitialize() succeed (not return an error)
    4. Only now you can consider looking into tag reading

    If you have issues in 1-4, then you need to look at the signals. What comes out as expected and what is missing?

    I fear a two channel scope is not a good debugging tool for this. 4 channels are minimum (MISO,MOSI,SCLK,CS) but for further debugging also INT pin will help a lot. That's why we recommend a scope only for signal integrity. By the way your scope shots seem to only show a 50Hz from your main supplies at completely insufficient levels.

    So our recommendation is a logic analyzer with 8 channels. There are cheap ones around. Please get one.

    Regards, Ulysses 

    Technical Moderator
    June 27, 2025

    Hi,

    this is almost the same configuration except for the drive strength of the GPIO (the "speed" parameter): GPIO_SPEED_FREQ_LOW in your project and GPIO_SPEED_FREQ_VERY_HIGH in my test. With GPIO_SPEED_FREQ_LOW, when reading the IC identity register 3Fh, the last received bit is 0 instead of 1. Thus the IC Identity check fails.

    This SPI behavior is documented in the section 2.15.3 Corrupted last bit of the  ES0292 STM32L07xxx/L08xxx device errata. See the workaround section (e.g. use GPIO_SPEED_FREQ_VERY_HIGH).

    This should help to fix your issue: this was not an easy one.

    Rgds

    BT