Hardware flow control in serial driver on efusA9X

  • Dear Support Team,


    I am opening new thread since this issue is not related to the thread "UART C on efusA9X with on board WLAN/BT" where we have started the discussion about it.


    So, the problem is that hardware flow control is not supported at all (as it seems) by serial driver on efusA9X. Here is what I have observed while running tests on our hardware and using oscilloscope to monitor UART lines. Tests were done on UART B, using lines 102, 104, 106 and 108 on efusA9X. I have tried all variants of RTS flow control mentioned in fRtsControl member of DCB structure (RTS_CONTROL_ENABLE, RTS_CONTROL_DISABLE, RTS_CONTROL_HANDSHAKE, RTS_CONTROL_TOGGLE). No matter what flow control I used, both RTS and CTS lines were on low level all time. Serial driver does not seem to drive RTS/CTS at all. I confirm I had correct data output on Tx line during the test. Moreover, I could drive RTS/CTS manually (using ioctls from dio_sdk.h), so, I confirm that I have monitored correct lines.


    I have also tried to use RS485=1 (REG_DWORD) registry value in HKLM\Drivers\BuiltIn\efusA9X\UARTx, although I am not sure what is it meant for, or if it is supported at all. It did not make any change, nevertheless.


    Can you please check and correct this issue in some priority? For us, RTS_CONTROL_TOGGLE is the feature of interest. Currently, we are not interested in other flow control modes.


    Thanks in advance.


    Best regards,


    Miodrag Bazdar

  • Hello,


    ok i will checkt it in more detail. As i already mentioned in the "UART C" thread there seems to be an error in the driver concering RTS/CTS line configuration. I will try to provide you a beta version for test today or tomorrw.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,


    please test the attached driver V1.13 beta. I correct RTS, CTS only for UART3 (pin 102, 104,106, 108).

    Registry value RS485 is obsolete, but you have to set UseRTSCTS=dword:1, this tells the driver to use RTSCTS pins, else the pins are not touched by the UART driver.


    Please let my know if this resolves the problem.

    Files

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Dear Support Team,


    Thanks for the swift response. I confirm that your beta version works. RTS line is correctly toggled when data is ready to be sent.


    Can you please make this correction general, so we could have serial driver which supports RTS_CONTROL_TOGGLE on all available UARTs (for example, we will need it for UART C on efusA9X without BT and UART E as well).


    Best regards,


    Miodrag Bazdar

  • Ok, but sorry i have to check it again ... .

    Seems we have to stay at the previous driver design, because we have a lot of boards in the field and also BT RTS/CTS works with this design. Nevertheless UART3 has a further bug so that it also does not work in this design (interchanged RTS CTS line).

    Give me some more time I will come back on Monday.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,


    Just wanted to tell you that we have state holidays on Monday and Tuesday, so please take your time make modifications in serial driver as necessary.


    Best regards,


    Miodrag Bazdar

  • Hello,

    attached you will find the new driver for test.


    Would be nice if you can test it with both UART3 and UART4 (CTS (in) 108, 116, RTS (out) 106,153) and give me respond. UART5 should already work, because BT chip uses RTS/CTS but you have to order efusA9X without WLAN/BT.


    Thanks.

    Files

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Dear Support Team,


    The first results seem promising. We are in a process of hardware redesign to be able to test properly and use these features. As soon as we manage to perform thorough tests, I'll get back to you.


    Thanks for your support.


    Best regards,


    Miodrag Bazdar

  • Hello,


    >> The first results seem promising. We are in a process of hardware redesign to be able to test properly and use these features. As soon as we manage to perform thorough tests, I'll get back to you.

    << Ok, I will await your test results. Think we can do changes very fast - if required.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Dear Support Team,


    We have finally received efusA9X samples without WLAN/BT. I am testing UART 5 (UART C in hardware manual) which now should be available for use. We are using RTS_CONTROL_TOGGLE flow control option on this port. Our device using efus is connected with my PC over this UART. I am able to read data sent from efus on PC, but data sent from PC is still not detected by efus.


    Can you please confirm that our current version of BSP supports UART C correctly with RTS_CONTROL_TOGGLE?


    Maybe I can use efus starter kit to test UART C communication?


    Best regards,


    Vladimir Obradovic

  • Hello,


    RTS_CONTROL_TOGGLE on UART5 must work else BT would not work at all on boards with WLAN/BT chip!

    And we have customers who use WLAN/BT.


    So we have to check folling items:


    1. Is UseRTSCTS available in your registry? By default it is not set if WLAN/BT is checked

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\EFUSA9X\UART5]

    "DeviceArrayIndex"=dword:3

    "IoBase"=dword:021f4000

    "IoLen"=dword:D4

    "Prefix"="COM"

    "Dll"="csp_serial.dll"

    "Index"=dword:3

    "RS485"=dword:0

    "Order"=dword:22

    "Tsp"="Unimodem.dll"

    "DeviceType"=dword:0

    "FriendlyName"="COM3 UNIMODEM"

    "IClass"="{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}"

    "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00, 00,00, 08, 00, 00, 00,00,00,00

    IF MRVL_SDIO8787_BT

    "UseRTSCTS"=dword:1

    ENDIF MRVL_SDIO8787_BT


    2. If you toggle RTS by EscapeCommFunction(hCOM, SETRTS/CLRTS) CTS is toggled.

    So pins are interchanged?


    3. Finally, in spite of WLAN/BT is not assambled the jumpers are not set for use UART5 RTS/CTS.

    So if 1 and 2 does not resolve the problem, please provide me the serial number of your board.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

    Edited once, last by fs-support_ZU ().

  • Dear Support Team,


    Thanks for the help. Trick was to set UseRTSCTS=1 registry value. I am sorry, I completely forgot it and it was missing for UART5 on my device. After setting it, hardware flow control started to work normally (RTS_CONTROL_ENABLE, RTS_CONTROL_DISABLE and RTS_CONTROL_TOGGLE). Driving RTS line with EscapeCommFunction started working as well.


    Best regards,


    Vladimir Obradovic

  • Ok, no problem. And nice that it works without further actions.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.