Page 4 of 6

Re: W801

Posted: Sun Oct 16, 2022 6:09 pm
by ag123
@Just4Fun
nice, but that 0.5mm pitch stm32 still give me the cringes, it feels like there'd be solder bridges and all, but i'd need to try it out :)

off-topic:
another risc v board from the 'western' domain
https://www.tomshardware.com/news/visio ... sc-v-board
VisionFive2 is built around SiFive’s U74 quad-core 64bit RV64GC running at 1.5Ghz.
hopefully, these are better documented and better designed and have a good tool chain

Re: W801

Posted: Mon Oct 17, 2022 7:27 pm
by webjorn
Seems to be an interesting chip, and I can see there is some arduino ide support.

Gullik

Re: W801

Posted: Mon Oct 17, 2022 11:47 pm
by dannyf
I got the chip running on the dreaded w801sdk - now with just gpio and uart output.

Re: W801

Posted: Wed Oct 26, 2022 10:08 pm
by dannyf
managed to get the true and pseudo random number generators to work.

here is how crazy it is:
1) the w806sdk has no definition for the RNGs, :)
2) the datasheet has no definition / bit description for many of the registers :)

i had to pull that off of the w801sdk and create my own struct. but in the end both RNGs worked.

Re: W801

Posted: Wed Oct 26, 2022 10:10 pm
by dannyf
another crazy thing about this chip: it has no hardware usb.

it has pretty much everything else but hardware usb.

:)

Re: W801

Posted: Tue Nov 29, 2022 11:22 pm
by dannyf
for those of you looking for the w801/806 boards: https://www.ebay.com/itm/155271154826?_ ... %7Ciid%3A1

unaffiliated at all.

Re: W801

Posted: Fri Dec 23, 2022 1:58 pm
by Just4Fun
For those interested here the schematic of the board with the W801 (HLK-W801-KIT-V1.0.pdf) and some manuals: http://82.157.145.101/download/toolkits ... icro/w801/,
and here manuals on the C-sky and the W806, including the W806 Special Function Registers manual: http://82.157.145.101/download/toolkits ... icro/w806/.

Here the schematic of the W806 based board:

Image


* UPDATE *:

The the W806 Special Function Register.pdf manual seems to related to the W800, but probably someone renamed the file this way because the registers of the W806 are the same, of course without the WIFI/BLE stuff.

Re: W801

Posted: Fri Dec 23, 2022 8:32 pm
by dannyf
nice find.

good to see some english words there. The compiler manual + cpu manuals are all in English. And the Windows tool I'm using doesn't even offer Chinese as an option.

I just implemented a circular buffer for UART0 transmission. I will post the key pieces of code here in case someone wants to do that for the blue pill -> it would be simpler for cases where the target mcu doesn't have a FIFO.

Code: Select all

// transmit on uart0 using CB
void u0CBTX(CB_TypeDef *cb) {
	while (!cbEmpty(cb)) {					//only if the cb isn't empty
		while (uart0TXFull()) continue;			//wait for TX FIFO to free up
		uart0Putch(cbRead(cb));				//from a chart from the CB into uart0 FIFO
	}
}

//write string to CB
void CBPuts(CB_TypeDef *cb, char *str) {
	while (!cbFull(cb)) {
		if (*str) cbWrite(cb, *str++); else break;
	}
}

u0CBTX() gets called each time loop() executes, and u0CBPuts() updates the circular buffer if you wish to transmit new content - this piece is hardware independent.

Re: W801

Posted: Fri Dec 23, 2022 8:35 pm
by dannyf
By now I have implemented most of the functions, from timer, uarts, input capture, output compare / pwm, adc, true random number generator, ... Pretty amazing value for the money. more like a microprocessor however.

I can confirm that:
1. the w806 registers / header files work for w801.
2. the biggest struggle is the lack of documentation, or inconsistent documentation. you sometimes have to try different things and that can be frustrating (or fun, depending on your perspective).

Re: W801

Posted: Fri Dec 23, 2022 8:38 pm
by dannyf
one thing to add: i would recommend against the w801sdk. the w806 sdk is a much better one to use, especially if you want to go bare metal: I use w806sdk only for the header file, linker script, and flash file genreation. the w801sdk is likely written by someone who worked on mcus in the 1980s :)