W801

Anything not related to STM32
ag123
Posts: 1653
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: W801

Post 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
webjorn
Posts: 43
Joined: Sat Jul 09, 2022 8:49 pm

Re: W801

Post by webjorn »

Seems to be an interesting chip, and I can see there is some arduino ide support.

Gullik
dannyf
Posts: 446
Joined: Sat Jul 04, 2020 7:46 pm

Re: W801

Post by dannyf »

I got the chip running on the dreaded w801sdk - now with just gpio and uart output.
dannyf
Posts: 446
Joined: Sat Jul 04, 2020 7:46 pm

Re: W801

Post 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.
dannyf
Posts: 446
Joined: Sat Jul 04, 2020 7:46 pm

Re: W801

Post by dannyf »

another crazy thing about this chip: it has no hardware usb.

it has pretty much everything else but hardware usb.

:)
dannyf
Posts: 446
Joined: Sat Jul 04, 2020 7:46 pm

Re: W801

Post by dannyf »

for those of you looking for the w801/806 boards: https://www.ebay.com/itm/155271154826?_ ... %7Ciid%3A1

unaffiliated at all.
User avatar
Just4Fun
Posts: 28
Joined: Thu Dec 19, 2019 10:45 am
Answers: 1

Re: W801

Post 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.
dannyf
Posts: 446
Joined: Sat Jul 04, 2020 7:46 pm

Re: W801

Post 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.
dannyf
Posts: 446
Joined: Sat Jul 04, 2020 7:46 pm

Re: W801

Post 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).
dannyf
Posts: 446
Joined: Sat Jul 04, 2020 7:46 pm

Re: W801

Post 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 :)
Post Reply

Return to “Off topic”