Skip to main content
Visitor II
February 26, 2020
Solved

How to port the ST25RU3993 firmware to a stand alone MCU board?

  • February 26, 2020
  • 8 replies
  • 5036 views

Hi there,

We are working with the ST245RU3993 and have the EVAL board working correctly with the provided GUI.

We now want to control the ST25RU3993 via SPI with a ARM MCU. This ARM MCU will operate independently, as sketched in "Device side usage" in the STUHFL User Manual (see attached file).

Is there any guideline to follow on how to achieve this setup? Or any indications, hints or tips?

So, our aim is to have an independent MCU that controls the ST25RU3993 to read/write to the tags in range.

Thanks in advance,

Max Serra

    This topic has been closed for replies.
    Best answer by Nick K

    Hi Max,

    you can disable the STM32 MCU on the board itself without remove it. But this involves a view steps to do.

    1. Remove R7, R8, R9, R11 (NCS, CLK, MISO, MOSI) and R12, R13 (IRQ, EN) and connect on the pin-header your SPI and GPIOs

    2. Remove R61 on the board short circuit C25. This reduce power consumption by putting the STM32L4 into shutdown

    3. Remove R38, R39 and R40. This will allow you to use the carrier cancellation from your MCU. Use the ETC_3, ETC_2 and ETC_1 pins on the board

    4. The ST25RU3993 EVAL board has a RF switch to switch between the internal and a external PA. To drive this from your MCU you need to controll PA_SW_V1 and PA_SW_V2 lines. The easiest way to do this is to solder wires to the STM32L4 MCU pin 25 (PA_SW_V1) and pin26 (PA_SW_V2) and controll the switch from your MCU

    Finally you need to supply the board via P2 and connect GND. You need approx 800mA @ 5V.

    All this modifications are reversable. If you not already have it you could find the schematic at st.com under the following link.

    https://www.st.com/content/ccc/resource/technical/layouts_and_diagrams/schematic_pack/group0/48/cd/17/2f/f5/51/47/88/ST25RU3993-EVAL/files/ST25RU3993-EVAL_schematic.PDF/jcr:content/translations/en.ST25RU3993-EVAL_schematic.PDF

    Thanks for the feedback about the portability. We tried to abstract the Low level drivers as good as possible, but for sure this could be more user/developer friendly.

    BR

    Nick

    8 replies

    ST Employee
    March 9, 2020

    Hi Max,

    yes ​it is possible to drive the ST25RU3993 IC with a different MCU then the STM32 which is on the EVAL board. 

    You can even use the EVAL board to do so. On the PCB of the EVAL board there are the SPI lines as pins to be used for intercepting the communication when removing the STM32L4 MCU on the board.

    the FW source code that is provided to drive the ST25RU3993 is using a STM32L4 MCU. When you want to use a different MCU you need to replace the

    STM32L4 platform specific low level drivers with HW specific code of your new MCU. These is the initalisation of your MCU, the functionality of the peripherials (SPI, UART, Timers, GPIOs, ..) and the IRQ handling. The logic that uses this low level functionality then to communicate with the ST25RU3993 and handle the Gen2 protocol can then reused with another MCU.

    BR

    Nick

    MSerr.1Author
    Visitor II
    March 9, 2020

    Hi Nick,

    To use the EVAL as you mention, is it compulsory to remove the STM32L4?

    Is there no way to communicate with the ST25RU3993 on the EVAL board without making a (likely) irreversible change?

    Thanks, on a FW level we are progressing. It took me some time to fully grasp the structure and dependencies of the code, but we are progressing.

    I would suggest ST to develop or provide a more lean implementation of this FW. I understand that it is developed with the STM32 uC in mind, but since the ST25RU3993 is such a nice chip I would conceive ST providing its FW in a more "easy-to-port" style.

    BR

    Max Serra

    Nick KAnswer
    ST Employee
    March 9, 2020

    Hi Max,

    you can disable the STM32 MCU on the board itself without remove it. But this involves a view steps to do.

    1. Remove R7, R8, R9, R11 (NCS, CLK, MISO, MOSI) and R12, R13 (IRQ, EN) and connect on the pin-header your SPI and GPIOs

    2. Remove R61 on the board short circuit C25. This reduce power consumption by putting the STM32L4 into shutdown

    3. Remove R38, R39 and R40. This will allow you to use the carrier cancellation from your MCU. Use the ETC_3, ETC_2 and ETC_1 pins on the board

    4. The ST25RU3993 EVAL board has a RF switch to switch between the internal and a external PA. To drive this from your MCU you need to controll PA_SW_V1 and PA_SW_V2 lines. The easiest way to do this is to solder wires to the STM32L4 MCU pin 25 (PA_SW_V1) and pin26 (PA_SW_V2) and controll the switch from your MCU

    Finally you need to supply the board via P2 and connect GND. You need approx 800mA @ 5V.

    All this modifications are reversable. If you not already have it you could find the schematic at st.com under the following link.

    https://www.st.com/content/ccc/resource/technical/layouts_and_diagrams/schematic_pack/group0/48/cd/17/2f/f5/51/47/88/ST25RU3993-EVAL/files/ST25RU3993-EVAL_schematic.PDF/jcr:content/translations/en.ST25RU3993-EVAL_schematic.PDF

    Thanks for the feedback about the portability. We tried to abstract the Low level drivers as good as possible, but for sure this could be more user/developer friendly.

    BR

    Nick

    Visitor II
    March 12, 2020

    Hi Nick,

    I have a question regarding "To disable the STM32 MCU on the board itself without removing it", can we acheive this by setting NRST pin 7 of MCU to low? Does this acheive disconnecting the interface of SPI so that we can connect to another MCU? OR Any means does it help stopping the power supply to MCU, by which MCU doesn't powers ON at all?

    Is it possible to acheive this? If not can you state the exact use of RESET PIN to MCU?

    Thanks in Advance!

    ST Employee
    March 13, 2020

    ​Hi,

    I would not recomment this, because the NRST pin brings the STM32 into reset state and the MCU is still powered. Until the HW/SW is not "boot-up" HW-blocks and corresponding pins are in an undefined state. It may work but to be sure that the STM32 is not inflence your MCU please remove the solder-brigdes as described in my previouse post.

    BR

    Visitor II
    March 13, 2020

    Hi,

    Thanks for the reply!

    Can you please elaborate "the NRST pin brings the STM32 into reset state" - this statement? What actually a reset state does? Does it remain in undefined state?

    Kindly help with the same!

    ST Employee
    April 8, 2020

    with reset state I mean the HW processes a new startup of the IC. Reset all peripherials and startup/boot the SW again.

    When you hold the RST pin the FW will never startup up and the HW initalization will never finish and the MCU may drive same undefined signals on some pins that could influence your other/new MCU.

    BR

    ST Employee
    November 22, 2021

    Hello,

    yes,

    steps 1 (remove R7-13) and step 2 (remove R61, short C25) are the same for EVAL and the HPEV board.

    For step 3: The HPEV board uses three tunable capacitors, accessible via a RFFE interface, to establish a carrier cancellation system. Remove R38-40 to disconnect them from the on-board STM32L4 MCU. To control them use the pins ETC1-3 at J13.

    For step 4: Also the HPEV has an RF switch to switch between antenna port 1 and 2. To disconnect remove R92 & R93 and control them then via the pins ANT_V1 and ANT_V2 at J31.

    In addition you should control the external PA supply enable line. To disconnect from the onboard MCU remove R43. And to control it use the pin PA_LDO_EN at J4.

    For the power supply, yes 800mA @ 5V should work, but is marginal when using the PA. Its recommended to use a power supply with 5V and 6W. As the one that is added to the HPEV board, to be on the safe side.

    BR

    Nick

    Visitor II
    November 23, 2021

    Hi Nick,

    Thanks for the reply.

    Based on your answer on the power supply, shall we understand that the board needs to be supplied via P2 with 5V@1.2A?

    We are thinking of only using the external PA from the evaluation board so we understand that we also need to provide 6V to the board. Is there a way to provide those 6V besides using the power adaptator provided with the HPEV board kit?

    Also, we have seen on the schematic the Plug_Enable controlled by the STM MCU. What is its use and should it be controlled by the external MCU? 

    Finally, on our MCU side, we do not have enough GPIO output to control all required pins. Is it an issue if, instead of controlling the EN and PA_LDO_EN by the MCU, we force to HIGH the EN and PA_LDO_EN pins (Hardwired)?

    Best regards,

    Stéphanie

    ST Employee
    November 24, 2021

    Hi Stéphanie,

    On the HPEV board the USB (P1) must be plugged to supply the board in general.

    And for the PA either (recommended) use the power adapter from the HPEV package via J14 (power jack)  or if you do not want to use this you can supply the PA direct via J21 with 5V on the VPA pin. But as this direct supply the PA this must be a stable supply (no switching power supply) for proper operation of the PA. 

    For the Plug_Enable pin. This is actual not used on the HPEV board FW. The board has the connection if someone wants to control the plug, but its not used in the FW.

    For the PA_LDO_EN pin. Please do not hardwire this pin as this would mean that the PA is enabled even if no input signals are provided.

    If you want to save GPIO pins there are two other/better options, that could save GPIO pins.

    1. If you do not need to use the internal PA you can hardwire the PA switch and force the usage of the External PA. This can be done with the pins PA_V1 and PA_V2 (J30)

    2. If you do not need two antennas you could hardwire the antenna switch to use only antenna 1 with the antenna switch pins ANT_V1 and ANT_V2 (J31)

    BR

    Nick

    Visitor II
    November 24, 2021

    Hello Nick,

    Let me summarize the recommendations around the HPEV board power supply:

    • Supply the board via P2 with 5V@1.2A
    • AND supply the use of the external PA via VPA pin of J21 with 5V

    Is that correct?

    About the saving of GPIO pins, in fact, we have already planned to hardwire the PA and the antenna switches.

    We only have 3 spare output GPIOs and we were thinking of using them to control the 3 ETC_x.

    From our understanding, the remaining pins that need to be controlled by the MCU are the EN pin and the PA_LDO_EN pin.

    1) Is there other pins that need to be controlled?

    2) Is it possible to hardwire the EN pin (Which means that the RFID chip is never powered down)?

    3) Can you detail what is the impact of having the PA enabled while no input signals are provided?

    Thank you for your help.

    Best regards,

    Stéphanie

    ST Employee
    November 25, 2021

    Hello Stéphanie,

    Regarding the power supply.

    In general correct, but at P2 5V@100mA is enough. A standard USB cable/connection is sufficient as supply. And for the PA supply with 5V at VPA there you need the 1.2A

    Regarding the other questions

    ad 1) no

    ad 2) yes possible

    ad 3) on the HPEV board the PA gets very hot if always enabled. There is a thermal issue with the IC then on the board.

    BR

    Nick