u/Separate-Choice

▲ 5 r/RISCV

CH32H417 Pre/New Listed on LCSC!

The CH32H417 is listed on LCSC! Its pre/new and not stocked but jist a few weeks ago it wasn't listed at all!! This is hands down the best RISC-V MCU and its listed at around $3.88 so under $4!! For all the power in this chip I hope it picks up!

https://www.lcsc.com/product-detail/C54973456.html?s\_z=n\_q\_Ch32h417&spm=wm.fly.bg.1.xh&lcsc\_vid=RFgNVlYFT1EIA1RSR1dYBlxWFFBZA1deTlMIV1RUQ1YxVlNRTlVbVV1fRVNaUDsOAxUeFF5JWBYZEEoKFBINSQcJGk4%3D

reddit.com
u/Separate-Choice — 10 hours ago
▲ 323 r/RISCV+1 crossposts

Mobile Phone OS with Web Browsing on a RISC-V MCU

I've been looking for a super light weight mobile phone OS thats open source with a web browser and you have the ability to write apps for but I couldnt find one...lol

So I've been working on Rovari OS a lightweight OS for MCUs that will allow them to run mobile devices. The OS was inspired by Android architecture, jidt really really scaled down...and instead of Java I use a Wrench VM (based on Wren) apps run sanboxed and I made a full SDK for the OS as well so you can write apps the run during runtime, access OS services and crashing an app dosent take the OS down...apps load from the SD when you install them and the device can run it, but keeps a record for the app drawer..and oh yeah it browses the web has camera, calendar, stop watch calculator etc etc all written with Wrench so can write apps without reflashing the MCU....my aim is to be a feature phone with as close to the original iPhone as possible I have most stuff working getting a vm to run apps on the limited memory was the hardest part...but the dual cores helped a lot with stuff...will release it over the next coming months have a lot to do still....I only recently figured out how to keep the VM running without crashing...lol...after everything it only has about 128KB to run apps....

The web browser though can browse the web, I really intend to use it for email and messaging and stuff maybe browse news headlines...the aim is to be less connected not more...maybe I might add more ram later on as ps ram or sram meh....anyway I'll update on this as time goes by.....

u/Separate-Choice — 21 hours ago
▲ 16 r/RISCV+1 crossposts

Dabao SDK Bare Metal C SDK for the Baochip-1x RISC-V SoC

The Dabao board featuring the Baochip-1x designed by legendary hardware hacker bunnie Huang had its crowd supply run and boards are due to ship later this year..I had the pleasure over the past month or so of writing a bare metal C SDK for the board before it ships put and production ramps up later this year...

The SDK is similar to how the PICO does stuff and there is no FFI layer or dependencies beyond a standard RISC-V GCC cross compiler....

It's Apache 2.0 and has peripheral drivers and examples that cover almost eveeything you can use on the Dabao board...ofc the UDMA architecture means all peripherlas use the UDMA DMA engine for data transfers and I have borh blocking and non-blocking APIs for comms though it wont be needed as this thing has a 700 MHz BIO coprocessor that can blaze any protocol fro high speed independent bit-banging...

I tried to make the API intebtionally PICO style, so that anyone who's written C for the PICO will feel at home....

Register defintion headers are included so you can drop down to raw hardware access when you need too, my aim was to have a simple but powerful SDK, high level enough for rapid development but low level enough that hardware is never hidden from you...

Developing while being able to look at the RTL was surreal!! It made me move way faster than I would have otherwise and the unique architecture of the chip would have made it different otherwise!!

In case anyone is curious about how you program this chip, I hope this SDK will help you out until you get your boards...trust me when you can grab ome of these things I can't put them down, SoC in MCU form factor its very very fun to work with...

You can look at the SDK on Github here, its Apache 2.0 license so knock yourselfs out, I'll be updating and ironing out any bugs as the weeks go by!

https://github.com/ArmstrongSubero/dabao-sdk

u/Separate-Choice — 14 days ago
▲ 246 r/RISCV+1 crossposts

So I've been testing out what the CH32H417 is capable off some more, especially with the dual core architecture...I already did some work with edge monocular tracking a while back and deciced to optimize my library for WCH chips...the lack of documentation or libraries really makes it a bit difficult, theres no CMSIS or hifhly optimized libraries like you get with an ESP32 or STM32 just some C examples from the vendor and a sparse datasheet....nothing else....luckily it is RISC-V and it is GCC...so a little bit of assembly and some C and yea offline facial recogition..no linux or RTOS or anything just bare metal, the hardware FPU was a godsend...

The enture program takes about 150 KB of ram and its fairly accurate....I could see this in all kinda edge systems once these chips pick up...

The entire computer vision runs in tge on chip ram...no SIMD or DSP instructiond so its all scalar processing...the FPU is used mainfly for multiple and compare in innerr loops....

The dual cores share SRAM....and I process at 320x240 which is what I get out of the camera...the DVP was really helpful and 25 MHz pwm capability...man this chip is amazing, complex, barely supported and a bit of kinks and different way of doing things compared to an STM32 or ESP32 but man do I like it....WCH really can be competitive...I'll do a writeup when I get some time...and you can see a little more on YouTube...if enough people clamor I might do a longer video with more details buy yea...

https://youtu.be/d6\_rkVJkZG0?si=VYho1t2v9IhLdRY8

u/Separate-Choice — 20 days ago
▲ 24 r/RISCV

Well testing communication between V3F and V5F core...the V3F core @150 MHz handle perperipherals and V5F core @300 MHz handling video decoding...this is the best balance and the chip architecture is setup like that V3F as peripheral core and V5F as compute core, though you can use peripherals from either one...some things I discovered, is that you're rather limited with clock allocations, if you want to run the V5F core at 400 MHz then the V3F core cannot be run at full 150 MHz and you also cannot use external clocking, to use full 400 MHz must use internal clocking...maybe I'm missing some undocumented config bit somewhere or maybe its in some example, but thats my findings...

Also if you set Vddio at 1.8v voltage levels, the pins om that domain, I've found as soon as any sort of load is put on a few pins (yes within datasheet spec) the core voltage varies up or down at rand8m...sometimes is 1.4v and sometimes may go as high as 2.0v dven though I explicitly set 1.7v domain.....I had a 1.8v psram I planned to use and keep the mixed voltage domain but nope my suggestion is to just use 3.3v voltage domain for everything across chip, stable no issues...cause I power the psram on 1.8v and the pins sometimes go out of spec when I'm comminicating with it 2.0v on a chip with 1.8v vdd is a recipie for diaser lol...could just be my chip though or maybe I'm comfiguring something wrong and over looked it...

Tested video decoding on compute core and getting stable 23-24 ish FPS bottle neck is SPI, long wires like this on breadboard I have to use 37.5 MHz but the core itself is a beast..with a proper layout this core will have no problem decoding frames at 30 fps or higher...having only even divs 2, 4, 8 really limits me...a div 3 wpuldve been ideal SPI speed for my setup...but again I'm free wiring here and not pitting display on a proper PCB...I'm sure with a parallel display we can hit very high frame rates no issues...

'bug buck bunnie' is a standard video used for MCU playback lol...maybe thats chaged in the last decade idk....but its what I've used ever since and still use lol..

this entire setup drawd about 230 mA...the chip itaelf when both cores are running tasks draws about 110 mA....

I'm def liking the dual core development, I'm adding audio next as I can comfortsbly add mp3 decoding along with video with little over head and we have 2 on board DACs which is enough for embedded MP3 playback as I did a similar setup with the ch32v307...wish there were more docs and examples for the chip though cause rn WCH examples are all we really have to work with...

u/Separate-Choice — 22 days ago
▲ 55 r/RISCV+1 crossposts

So I've been busy with the Baochip, but I've also had some time to begin porting RV Boy to the new device, the dual core architecture is simple enough to understand, I'm not using mounriver studio though, using my own Rovari I'm working on...just some prelim tests on 3D....this is the V3F core havent even engaged the V5F core yet or any of the other peripherals...loving the chip, its got its quirks but yea! Just wondering if anyone else is playing around with this device...information is non existant besides WCH material and they also have some bugs...lol...

u/Separate-Choice — 23 days ago
▲ 20 r/RISCV

Been working with one of the first Dabao boards for the Baochip-1x!! In case you missed, the Baochip-1x is bunnie's chip that puts VexRiscv on TSMC 22 nm and integrates a lot of security features and verifiable silicon that he has on crowd supply. I've been building the bare metal C sdk for it and I wrote up what a little about what I've learned so far,there is a lot, but just wanted to give a general first impression of what it's like working with the chip, it's a lot of fun. I really like working with this chip, the RTL source is on GitHub, which makes peripheral bringup interesting when the docs are thin cause you can just literally see what's inside the RTL, lol, its a really amazing way to develop firmware. As I develop, I'll document quirks as I go along, but what I can say is that this chip is very unique and really grows on you when you start to use it, good RISC-V silicon..... I'm making the sdk "pico style" as opposed to a heavy ST like HAL.... if you enjoy working closer to the hardware you'll like working with this chip a lot....can't stress how nice it is to be able to just look at the RTL when you're writing firmware for something "hot" out of the ovens like this.....

You can read the blog post of my first impressions here:

Hands On with the Baochip-1x: First Impressions from Bare Metal C

reddit.com
u/Separate-Choice — 27 days ago