Skip to main content
Explorer
July 18, 2024
Solved

ST25RU3993 FW not found on Linux

  • July 18, 2024
  • 3 replies
  • 2089 views

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 topic has been closed for replies.
    Best answer by cuongnguyen

    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

    3 replies

    ST Employee
    July 22, 2024

    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

    Explorer
    July 22, 2024

    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

    ST Employee
    July 22, 2024

    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"

     

    Explorer
    July 23, 2024

    Hi, Mr.Nick

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

    Capture.PNGCapture2.PNG

    ST Employee
    July 23, 2024

    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

    ST Employee
    July 29, 2024

    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

    cuongnguyenAuthorAnswer
    Explorer
    July 31, 2024

    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