Skip to main content
Visitor II
April 5, 2021
Solved

ST25RU3993 HPEV UART Comminication between STM MCU and Host

  • April 5, 2021
  • 12 replies
  • 3046 views

I have development board of ST25RU3993 HPEV. I am testing TAG detection uising GUI application -provided by STM.

As this application works using USB interface between STM MCU and HOST. Instead of USB interface I want to check UART communication with HOST.

Can you plese ket us know how can i check UART communication and where to take wires and what changes are required in hardware.

Also I need some informatrion of protocol because we need to develop a application on UART to read tag information

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

    Hello,

    let me summarize, based on the discussion, how to replace the ST25RU3993 EVAL/HPEV onboard FT231 IC

    • Unsolder U13 or put U13 (onboard FT231) into reset mode by remove R6 and short C33
    • Connect your own USB-UART converter at J7 by using RX, TX, DTR and RTS pins.
    • IMPORTANT: To avoid FW changes a USB-UART convert IC supporting 3MB is required.
    • IMPORTANT: DTR and RTS pins are used to control RST and BOOT0 pins of onboard STM32L4 and needed for proper board booting
    • Use ST25RU3993 Reader Suite GUI and connect to the board through your own UART-USB converter
    • Alternative: Develop your own UHF Host application. For this it is recommended to have a look at the STUHFL_demo source code example and follow the connection procedure.
      • Connect to COMxx with 8N1 and 3MBit/sec
      • set DTR high, to force STM32L4 start from user code
      • toggle RTS (high -> low), to restart the board
      • Wait ~400ms to give board time to boot

    BR

    12 replies

    Visitor II
    April 7, 2021

    Dear SPraj.1

    the ST25RU3993-HPEV is actually using a serial interface with the host computer (see virtual com port).

    Nevertheless if you would like to connect TX, RX, DTR and RTS directly you can do so using J7 on the HPEV board.

    Please have a look in the user manual of the HPEV board.

    You would still need to provide 5V to VBUS in order to power most parts on the board.

    It is also advisable to put U13 into reset (remove R6 and short C33).

    With regards to the protocol please refer to the documentation of the SDK.

    All information required is available here.

    Cheers,

    B

    SPraj.1Author
    Visitor II
    April 7, 2021

    Hello B,

    As you said I have tried to connect RX and TX on J7 but it receives some random data. But I did not Put U13 into reset. So Is it compulsory to put U13 in reset ?

    Also I have not connected DTR and RTS pin. Bacause I check UART2 flow control is not enabled. And If I check on J7 then what should be the Baudrate, 115200 or 3000000?

    Threre is no information available for protocol in your suugested link.

    https://www.st.com/en/development-tools/stsw-st25ru-sdk.html#documentation

    Waiting for your reply,

    SPraj.1Author
    Visitor II
    April 7, 2021

    Dear B,

    I have another doubt that How can I write EPC memory using GUI tool. I did not find any option on GUI tool to write anbd read memory. Can you please let me know how can i write or read tag memory?

    ST Employee
    April 7, 2021

    Hello SPraj,

    You can find the ST RFID UHF reader suite User Manual on ST site with the reference: UM2268

    https://www.st.com/content/st_com/en/products/embedded-software/st25-nfc-rfid-software/stsw-st25ru001.html#documentation

    As mentioned in the documentation (section: 5.2 Functions panel),

    the EPC can be modified by selecting the button "Set EPC" (section: 5.2.3 Set EPC),

    the memory can be modified as described in section: 5.2.2 Tag Memory.

    Hoping this helps,

    best regards,

    Cedric.

    SPraj.1Author
    Visitor II
    April 7, 2021

    Hello Cedric,

    Thanks for the information, I found this useful

    Can you please answer about UART configuration. I have connected UART to J7 but I am gettting some random data. What is the reaso and what should be the baudrat e to check UART2 ?

    ST Employee
    April 7, 2021

    Hello,

    here are the STM32 UART configuration that is being used by our FW:

     huart2.Instance = USART2;

     huart2.Init.BaudRate = 3000000;

     huart2.Init.WordLength = UART_WORDLENGTH_8B;

     huart2.Init.StopBits = UART_STOPBITS_1;

     huart2.Init.Parity = UART_PARITY_NONE;

     huart2.Init.Mode = UART_MODE_TX_RX;

     huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE;

     huart2.Init.OverSampling = UART_OVERSAMPLING_16;

     huart2.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;

     huart2.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;

     HAL_UART_Init(&huart2);

    Please note the baudrate at 3Mb/s.

    best regards,

    Cedric

    SPraj.1Author
    Visitor II
    April 7, 2021

    Hello,

    I have run with same configuration. But though I am not receiving proper data. Is it compulasory to connect DTR and RTS?

    and is there any change in hardware required?

    ST Employee
    April 7, 2021

    Hello,

    if you want to bypass the onboard FT231 UART - USB converted you could access the UART RX/TX pins on J7. The DTR and RTS lines are not used for UART flow control, they are connected to the STM32L4 Boot0 and RST pins to control the boot behavior. To manual operate the RTS (Reset) you can use the onboard button B1, and the DTR (Boot0) must be set to high permanent to start from user flash. Important, until the DTR line is high you can not enter the STM32 bootloader and flash a new FW. For more flexibility its recommended to operate the DTR and RTS line by SW from host side as following

    1. Connect to COMxx with 8N1 and 3MBit/sec
    2. set DTR high, to force STM32L4 start from user code
    3. toggle RTS (high -> low), to restart the board
    4. Wait ~400ms to give board time to boot

    After this sequence the board is ready and connection on UART is established

    You can find in our SDK package the sample source code as reference for the described steps above.

    Please have a look to the ".\Applications\STUHFL_Demo\" folder of the SDK package -> https://www.st.com/en/development-tools/stsw-st25ru-sdk.html

    BR

    SPraj.1Author
    Visitor II
    April 7, 2021

    Hello BR,

    Apart from this Is there any other hardware changes are required like remove R6 and short C33.?

    After bypass FT231. I have connected J7 RX TX to PC via CP2102 but it is saying me to update firmware and when i click to update firmware it says dev​ice is not recognised.

    SPraj.1Author
    Visitor II
    April 7, 2021

    After connection to J7 RX and TX. Samle firmware 2.3.0.0 will work or do I need to change any thing in firmware. Everybody is saying different method. Please confirm me exact method to bypass onboard Ft231 and use j7 rx tx to connect Host. And for this what hardware and software changes are required.​

    ST Employee
    April 7, 2021

    Hello SPraj.1

    as described already by Bart, yes please put the FT231 IC (U13) into reset state to avoid crosstalk.

    power the board with the additional power supply for proper supply.

    you need to control the RTS and DTR lines, as described above, otherwise the STM32L4 FW will not boot at all.

    if you only want to bypass the FT231 IC no FW changes are needed, stock FW works.

    SPraj.1Author
    Visitor II
    April 8, 2021

    Hello Nick,

    As you said I have put U13 in reset state and connect J7 RX/TX to pc through CP2102(USB UART bridge) ​and run Reader Suite application. Application ask me to update firmware and when i try to update firmware it gives device is not recognised error.What is the reason of this reason?

    ST Employee
    April 8, 2021

    Hello SPraj.1,

    • can you confirm that CP2102 use the same voltage level as STM32L4 ? 3.3V ?
    • can you confirm that the CP2102 is able to operate at 3MBit/sec ?
    • just to be sure, did you also connected DTR/RTS lines between the HPEV and the CP2102 ? as explained, they are needed to bring the STM32L4 into bootloader mode, if you want to upgrade the FW. DTR/RTS lines are also used by the GUI during connect and when starting the upgrade process. If DTR and RTS are not proper configured the board will not boot from User code nor enter bootloader.
    • just to be sure, do you have connected GND ?
    • have you cross connected the Tx (board) with Rx (CP2102) or how is your CP2102 labeled ? does the CP2102 required Tx to Tx connect or Tx to Rx ?
    • could you send a picture with your wiring between the board and the CP2102 ?
    • could you send traces of the DTR, RTS, Rx, Tx lines when trying to connect the GUI with the board ?

    SPraj.1Author
    Visitor II
    April 8, 2021
    • 0693W000008yzGbQAI.jpgcan you confirm that CP2102 use the same voltage level as STM32L4 ? 3.3V ? - Yes it uses same 3.3V

    • can you confirm that the CP2102 is able to operate at 3MBit/sec ? - No it is operatable upto 1Mbit/sec

    • just to be sure, did you also connected DTR/RTS lines between the HPEV and the CP2102 ? as explained, they are needed to bring the STM32L4 into bootloader mode, if you want to upgrade the FW. DTR/RTS lines are also used by the GUI during connect and when starting the upgrade process. If DTR and RTS are not proper configured the board will not boot from User code nor enter bootloader. - No RTS and DTR lines are not connected between CP2102 and STM32l4. Already latest firmware is downloaded previously then also it asks for firmware upgrade while UART is connected.

    • just to be sure, do you have connected GND ? - YES

    • have you cross connected the Tx (board) with Rx (CP2102) or how is your CP2102 labeled ? does the CP2102 required Tx to Tx connect or Tx to Rx ? - It is cross connect I have verified that with other board. Its Tx pin connected to RX to STM32L4.

    • could you send a picture with your wiring between the board and the CP2102 ? - Images are attached.

    • could you send traces of the DTR, RTS, Rx, Tx lines when trying to connect the GUI with the board ? - Did not get your question. what you want waveforms?