cancel
Showing results for 
Search instead for 
Did you mean: 

ST25RU3993 HPEV UART Comminication between STM MCU and Host

SPraj.1
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
Nick K
ST Employee

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

View solution in original post

19 REPLIES 19
Bart Herse
Senior II

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.1
Associate II

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.1
Associate II

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?

Cedric Dalban
ST Employee

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.1
Associate II

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 ?

Cedric Dalban
ST Employee

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.1
Associate II

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?

Nick K
ST Employee

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

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.