Skip to main content
Visitor II
February 19, 2021
Solved

CR95HF Nucleo baord SPI MISO issues

  • February 19, 2021
  • 7 replies
  • 1747 views

0693W000008GePeQAK.jpgHi,

I am using the X-NUCLEO-NFC03A1 board with an Atmega328p MCU and atmel studio.

I have been trying to communicate with the CR95HF via SPI but I cant seem to get any reply on the MISO line. The MISO line never drops below a certain voltage level (around 100mV).

Any idea what might be causing this? I checked that the SCK, MOSI and CS signals all have good integrity on the CR95HF chip. I have attached a picture of the SCK and MISO signals.

Thanks in advance for your help

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

    Hi,

    on your scope screenshot, I see only nIRQ_IN rising once from 0 to 3V3. Can you confirm that you follow the startup sequence as described in ST25R95 datasheet §3.2

    • after the initial t0 delay after power on, there must be an initial interrupt for the interface selection (t1 duration) i.e nIRQ_IN going from 3V3 to 0
    • then after t1, rising nIRQ_IN will cause the oscillator to start

    Can you provide a screenshot of the full startup sequence from power on to t3?

    If this startup sequence is properly followed and the X-NUCLEO-NFC03A1 still not replying, can you plug this board on a NUCLEO-L476RG, NUCLEO-F401RE or NUCLEOF103RB board and run the firmware from X-CUBE-NFC3 (binary are provided). This will help to verify that the X-NUCLEO-NFC03A1 has not been damaged.

    How is powered the X-NUCLEO-NFC03A1? External power supply?

    Can you provide the interconnection between your MCU mother board and the X-NUCLEO-NFC03A1 daughter board? make sure to follow UM2479 table 1 and table 2 for the interconnection?

    Rgds

    BT

    7 replies

    Technical Moderator
    February 19, 2021

    Hi @SMahm.2​ ,

    on CR95HF side, can you check that the Interface selection is correct (SSI_0=1 and SS_1=0) and that the powering is correct.

    On MCU side, can you check that the alternate function for the MISO (PB4) is properly configured and that the SPI is properly configured (Motorola format, 8 bits data, MSB first, clock polarity low, clock phase 1 edge. For the baud rate, the driver in X-CUBE-NFC3 uses 1.5 Mbits/s)?

    Rgds

    BT

    SMahm.2Author
    Visitor II
    February 19, 2021

    Hi Brian,

    The correct interface is selected on CR59HF.

    I have the following settings on the MCU side:

    CPOL = CPHA = 0

    All pins are correctly configured

    Fsck = 2MHz

    8 bits data format, MSB first

    Technical Moderator
    February 19, 2021

    Hi,

    can you probe the IRQ_IN during the startup sequence (see ST25R95 datasheet §3.2) and share the startup sequence with me.

    I would also suggest to check that after the completion of the startup sequence:

    • the 27.12 MHz cristal is properly clocking the device (just probe and one should see something similar to figure 3 from AN3433)
    • the nIRQ_OUT is high (i recommand to use IRQ_OUT during SPI communication)

    How is the MISO connected to the X-NUCLEO-NFC03A1: is there any pull up resistor on MCU PCB side? Can you disconnect the MISO on MCU side and probe the MISO on X-NUCLEO-NFC03A1 side (i.e. with MISO being left floating)?

    Rgds

    BT

    SMahm.2Author
    Visitor II
    February 19, 2021

    Hi Brian,

    Please see the attached image, it seems that there is no output form the crystal. I measured the signal on XIN and XOUT pins individually with no resultant clock.

    I disconnected the MISO from the MCU and the result was the same as seen in the previous image.

    Any suggestions?

    Regards,

    Salman0693W000008Gg23QAC.jpg

    SMahm.2Author
    Visitor II
    February 19, 2021

    IRQ_OUT is also high

    Technical Moderator
    February 19, 2021

    Hi,

    on your scope screenshot, I see only nIRQ_IN rising once from 0 to 3V3. Can you confirm that you follow the startup sequence as described in ST25R95 datasheet §3.2

    • after the initial t0 delay after power on, there must be an initial interrupt for the interface selection (t1 duration) i.e nIRQ_IN going from 3V3 to 0
    • then after t1, rising nIRQ_IN will cause the oscillator to start

    Can you provide a screenshot of the full startup sequence from power on to t3?

    If this startup sequence is properly followed and the X-NUCLEO-NFC03A1 still not replying, can you plug this board on a NUCLEO-L476RG, NUCLEO-F401RE or NUCLEOF103RB board and run the firmware from X-CUBE-NFC3 (binary are provided). This will help to verify that the X-NUCLEO-NFC03A1 has not been damaged.

    How is powered the X-NUCLEO-NFC03A1? External power supply?

    Can you provide the interconnection between your MCU mother board and the X-NUCLEO-NFC03A1 daughter board? make sure to follow UM2479 table 1 and table 2 for the interconnection?

    Rgds

    BT

    SMahm.2Author
    Visitor II
    February 22, 2021

    HI Brian,

    I followed the startup sequence you indicated and its working now, thanks.

    Regards,

    Salman

    Technical Moderator
    February 22, 2021

    Hi Salman,

    Well done.

    Thanks for the update.

    Rgds

    BT