Enhance rtl8196e_uart_bridge_main to support SW Flow control #123
|
Hi @jnilo1, I am creating a separated request based upon the discussion in #119. Currently, the uart bridge only support HW flow control. However, only other platform, SW control is needed because of lacking hardware connectives between RTL8196E and radio coprocessor. Could you please add flow control type that can be selected between hw and sw? And can be specified in device tree? Thanks! |
Replies: 8 comments
|
Hi @hlyi, Done — uart-bridge v1.2 implements this, bench-verified, ships in the next release. What changed
Device tree side, the board DTS gains an optional node the driver reads at boot to seed its defaults (module parameters still override): Readback of the sysfs knob stays numeric ( How sw mode worksThe bridge's hot path bypasses the tty line discipline, so termios A welcome side effect of consuming the control bytes in the bridge: a remote host (Z2M over TCP) sees a clean ASH stream and needs no software-flow-control support of its own. The flow control is deliberately asymmetric: the bridge honors the radio's XOFF but never emits one toward the radio — the SoC drains a 16-byte UART FIFO at these baud rates without ever falling behind, and the UART→TCP direction keeps its drop-and-count semantics. Verified on the benchI built a one-off NCP-UART-SW variant for the Lidl EFR32MG1B (GSDK 4.5.0, Two questions for your G4
One operational note: during an EFR32 flash, flow control must be |
|
@jnilo1 you are so great implementing new features! I built radio firmware based on your GSDK setup with manually hacks to enable sw flow control, the built went through. But to be honest with you, I haven’t tested it yet, as I need bootloader support mentioned in #121 to flash it. Actually it brings me to another enhancement request: could you please add BOARD support to radio firmware build similar to the one you did for kernel device tree? do you mind sharing your enhancement? Thanks again! |
|
Hi @hlyi, Great that your sw-flow build went through — and good news on the blocker: v3.10.0 is out and ships everything you were waiting for from #121/#123: the configurable nRST ( The sw-flow-control firmware deltaHappy to share — it is smaller than it looks. Starting from our NCP project (GSDK 4.5.0), the whole change is one configuration value: /* config/sl_iostream_usart_vcom_config.h */
#define SL_IOSTREAM_USART_VCOM_FLOW_CONTROL_TYPE uartFlowControlSoftware(equivalently, the That is exactly what my bench one-off was; if your manual hacks ended up at the same define, you already have the right firmware. BOARD= for the radio firmware buildsLegitimate ask — I answered it in #126 with a concrete proposal (per-board config directory under the EFR32 build scripts, with Once you have the G4 running in |
|
@jnilo1 thanks for the enhancement. I will work on radio enhancement after getting full linux build up and running. BTW, I don't know native zigbee protocol Sengled has, my intention is only using custom build firmware for NCP and RCP for OTBR. One thing that I would need to flash custom firmware is to support entering bootloader mode. As you can see in PR #127, I added
Thanks a lot! |
|
Hi @hlyi, Good context on your goal (custom NCP / OT-RCP only, no need to speak Sengled's native protocol) — that confirms pin-driven bootloader entry is your only path for the first flash over the stock firmware, since Yes — but as a separate trigger, not inside
|
|
@jnilo1 Thanks for creating
Yes, it worked on my board. The EFR32 was able to enter bootloader mode by issue command |
|
Hi @hlyi, Excellent — thanks for confirming Do the flash scripts need
|
|
@jnilo1 Thanks for clarification! That's great. I will try it out. I will close this thread as original request of supporting SW flow control has been implemented 👍 |
Hi @hlyi,
Good context on your goal (custom NCP / OT-RCP only, no need to speak Sengled's native protocol) — that confirms pin-driven bootloader entry is your only path for the first flash over the stock firmware, since
universal-silabs-flashercan't ask a non-EZSP firmware to launch the bootloader.Yes — but as a separate trigger, not inside
nrst_pulseWe'll implement your sequence in the bridge driver (v1.3), with one design change: it will be a new write-only trigger (working name
blmode_pulse), alongside the existingnrst_pulse, rather than changingnrst_pulse's behaviour wheneverblmode-gpiosis present.The reason:
nrst_pulseis also the "reset the EFR32 back into the application" p…