cancel
Showing results for 
Search instead for 
Did you mean: 

ST25RU3993 FW not found on Linux

cuongnguyen
Associate II

Hi everyone,

I am currently using this board to connect to my Ndivia jetson nano device, i checked the usb devices connected to the jeson nano and it still reconize the board. Also, i have successfully generated STUHFL.so file and a STUHFL_demo.out file as the document instructed . However, when i access the .out file the device couldn't reconized the board FW which result in v0.0.0.0 and the program terminated. How can i fix this? Also, the board still work well with window OS devices

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 ACCEPTED SOLUTION

Accepted Solutions

Turn out that i did not set permission for the program to access serial device, thanks for debugging advice, everything works fine now, thank you so much

View solution in original post

9 REPLIES 9
Nick K
ST Employee

Hi,

is your board connected to /dev/ttyUSB0 ?
The Linux variant expects that the correct port is set with the COM_PORT define at the top of the STUHFL_demo.c file.

BR

yes sir, i've alreadly checked usb devices in the command line and the board appear as FTDI_FT231_USB_UART_DK0E4A01, but i received this when i run the .out file

z5656780353615_ea5616f702510b4713d9d11e41a34354.jpg

Nick K
ST Employee

Hi,

when version is reported as V0.0.0.0 this normally indicates that the serial connection to the board failed.

could you please check all available USB to serial converts on your device and list their mount points with

dmesg | grep -i FTDI

could you also please share the STUHFL log from your out file to see the return value of STUHFL_F_Connect(..) by using

tail -f /var/log/syslog"

 

Hi, Mr.Nick

Here are all the logs you asked for, i don't really understand the error

Capture.PNGCapture2.PNG

Hi cuongnguyen,

thanks for the logs.
The STUHFL logs starts with the setup of the RTS lines.
Before this the log of line 125, 126 and 128 is missing, which connects to the board in STUHFL_demo.c and should give more info why the connect fails.

NickK_0-1721721289090.png

 

What is a bit strange in your screenshot of the terminal output is the following.

NickK_1-1721721320076.png

This should be "/dev/ttyUSB0". (only once). If you call STUHFL_F_Connect with "/dev/ttyUSB0/dev/ttyUSB0" the call will fail.

STUHFL_demo.c printf in line 264 the COM_PORT define. Have you added a additonal printf statement ?
Or have you modified the COM_PORT define in line 67, or any idea were this comes from ?

BR

Hi Mr.Nick,

Thanks for the reply.

About the output, i did add some printf statement in the code, i will delete it later.

So I need to find out why the line 125, 126 and 128 isn't included in the code flow? Because these line is still in the source code, what do i have to do next?

Capture.PNG

 

Capture.PNGHere is another one, please let me know if you have any solution, please.

Capture.PNG

Nick K
ST Employee

Hi cuongnguyen,

thanks for the screenshots. As already assumed is the issue is the STUHFL_F_Connect function.
The call to the function seams to be using correct parameters.
The only change to find the reason why it is failing with your board is to debug the implementation.

For your linux board the relevant implementation could be found at
.\Middleware\clib\STUHFL\src\platform\stuhfl_bl_posix.c at function
STUHFL_T_RET_CODE STUHFL_F_Connect_Posix(STUHFL_T_DEVICE_CTX *device, char* port, uint32_t br)

One other thing to check is if your UHF board have enough power. Do you use a HPEV board and have connected the external supply ?

BR

Turn out that i did not set permission for the program to access serial device, thanks for debugging advice, everything works fine now, thank you so much