您尚未登录。

楼主 # 2024-10-17 21:43:28

ylyamin
会员
注册时间: 2024-10-17
已发帖子: 3
积分: 20

RT-Thread on Allwinner D1H. LCD work, USB in progress.

Hi all,

I successfully build and ran RT-Thread (a small embedded OS) on the RISC-V Allwinner D1H SoC.
Experimenting on ClockworkPi DevTerm R-01 device and Sipeed Lichee RV board.

Intention was to make RT-Thread portable terminal with a working display and keyboard.

I manage to:

  • Create a working LCD MIPI DSI Display driver with frame buffer.

  • Create a working LCD RGB Display driver with frame buffer.

  • Make some progress on a USB keyboard driver.

  • Boot from SD card and communicate via UART

  • Debugging with GDB

The code is available at: https://github.com/ylyamin/RT-Thread-on-Allwinner-D1H

If you enjoy brainteaser and some low-level stuff, you’re welcome.
Should say: it's not truly low-level bare-metal from ground as RT-Thread operates with threads and events and the HAL level is quite complex. But it is easier to manage compared to working within the Linux kernel - at least for me, as I'm not an expert in Linux. RT-Thread has great potential, as it supports many packages for GUI, audio, Ethernet, and more.

Ready images for SD card:

Please note: The DevTerm/uConsole battery charging/discharging controller is not yet configured in the driver, so I’m unsure how it affects the battery. I suggest not using the battery with RT-Thread and powering it via USB instead.

I’m writing a series of articles covering the knowledge and experience I’ve gained:

Finally, I dare to ask for help from the community, please:

I’m really stuck with the USB driver. It can detect device connections, but communication has not started.<br>
Perhaps someone would enjoy diving deep into the USB driver to solve this riddle. Ready for issue reports and pull requests.

Picture of LCD Display test in RT-Thread running on Devterm R-01:
Devterm

最近编辑记录 ylyamin (2024-10-18 17:41:38)

离线

#1 2024-10-18 08:55:09

lanlanzhilian
会员
注册时间: 2021-12-21
已发帖子: 127
积分: 57

Re: RT-Thread on Allwinner D1H. LCD work, USB in progress.

USB is really hard to tune

离线

楼主 #2 2024-10-22 17:30:13

ylyamin
会员
注册时间: 2024-10-17
已发帖子: 3
积分: 20

Re: RT-Thread on Allwinner D1H. LCD work, USB in progress.

UPD:
@jusentari made Clockworkpi uConsole R-01 display work in RTT (experimental display parameters, use with caution).

uconsole

最近编辑记录 ylyamin (2024-10-22 17:31:17)

离线

#3 2024-10-25 10:50:50

642242855
会员
注册时间: 2019-10-31
已发帖子: 207
积分: 104

Re: RT-Thread on Allwinner D1H. LCD work, USB in progress.

lanlanzhilian 说:

USB is really hard to tune

USB部分可以看下CherryUSB,好像CherryUSB支持F133,按道理应该是可以用

离线

楼主 #4 2024-10-26 00:05:48

ylyamin
会员
注册时间: 2024-10-17
已发帖子: 3
积分: 20

Re: RT-Thread on Allwinner D1H. LCD work, USB in progress.

642242855 说:

USB部分可以看下CherryUSB,好像CherryUSB支持F133,按道理应该是可以用

Hi, thanks for your involvement,

Actually I was port CherryUSB already in folder rt-thread/bsp/allwinner/d1s_d1h/packages/CherryUSB/.
Cherry USB do switch from EHCI to OHCI companion controller when I connect USB device but in Cherry USB - OHCI transfer functions is not implemented.

Because of that I switch to TinyUSB in folder rt-thread/bsp/allwinner/d1s_d1h/packages/TinyUSB/
However, it did not reach the point when OHCI started to work in TinyUSB.
More info at D1-6. USB Keyboard

最近编辑记录 ylyamin (2024-10-26 00:06:50)

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn