• How to debug W806 and W801 MCUs?

    04/09/2022 at 13:36 6 comments

    W806 is quite an interesting product in terms of price and performance. One of the biggest drawbacks of this platform is lack of popular hardware debugger for it. Official CK-Link Lite debuggers are pretty expensive and not widely available. But as turns out it can be also achieved without official debugger but with use of simple STM32 “Blue Pill board”

    What is is necessary to start

    A) Hardware

    • STM32F103C8T6 “Blue Pill board”
    • W806 dev board
    • Few DuPont cables

    B) Software

    and a little bit of time...

    How to get it working?

    1) Upload CKLinkLite2.30.hex to STM32 “Blue Pill board”

    2) Open project that is located in SDK: WM_SDK_W806\tools\W806\projects\SDK_Project\project\CDK_WS\CDK_WS.cdkws

    3) Enabe “Download To Flash” parameter in Debug settings

    Right-click on W806_SDK → Options for “W806_SDK”



    4) Connect STM32 and W806 together

    STM32

    W806

    A0

    RST_N

    A1

    PA1

    A5

    PA4

    3V3

    3V3

    GND

    GND

    5) ConnectSTM32 via USB to PC

    6) Update drivers in Windows Manager

    After updating driver CDK IDE should see connected hardware in Debug Tab in Project parameters:


    7) Compile project – in contrast to STM32CubeIDE CDK is not automatically compiling project after clicking Debug button

    8) Starting Debugging

    At this point you should see CDK changing to Debug mode:



  • Getting started with W806 - 240MHz 32 bit MCU

    02/14/2022 at 13:44 1 comment


    Nowadays, because of the global chip shortage, finding an alternative MCU is more essential than ever. One of such alternative could be W806 MCU.

    W800 line-up include 3 microcontrollers:

    • W806 - base MCU without wireless communication,
    • W801 - MCU with Wi-Fi and Bluetooth,
    • W800 - MCU with Wi-Fi and Bluetooth and reduced set of peripherals. 

    These chips are made by WinnerMicro and are based on one 240 Mhz XT804 core. The core itself is made on top of the C-SKY architecture, so it is completely different from well known ARM, or new RISC-V cores.

    W801 and W806 are available as devboards, what makes them easy to start with. When it comes to W800 it is possible to get one on devboard, but rebranded as Air101.

    Today we will focus on the base model W806. Let's start with the specification:

    • 32-bit XT804 processor, frequency up to 240MHz, built-in DSP, FPU and security engine
    • Built-in 1MB Flash, 288KB RAM
    • Integrated PSRAM interface, supports up to 64MB external PSRAM memory
    • 6-channel UART high-speed interface
    • 4-channel 16-bit ADC, the highest sampling rate is 1KHz
    • 1 high-speed SPI interface (slave interface), supports up to 50MHz
    • master/slave SPI interface
    • 1 SDIO_HOST interface, supports SDIO2.0, SDHC, MMC4.2
    • 1 SDIO_DEVICE, supports SDIO2.0, the maximum throughput rate is 200Mbps
    • 1 I²C controller
    • Integrated GPIO controller supporting up to 44 GPIOs
    • 5 channel PWM interface
    • 1 Duplex I²S controller
    • LCD controller, supports 4x32 interface
    • 1 7816 interface
    • 15 Touch Sensors integrated

    Power supply:

    • 3.3V single power supply
    • Support work, sleep, standby, shutdown modes
    • Standby power consumption is less than 10uA

    Moreover the chip includes hardware encryption unit.

    Getting started:

    To start programming the MCU we need several things:

    Official documentation and SDK:

    https://h.hlktech.com/Mobile/download/fdetail/143.html

    Unfortunately the documentation is available only in Chinese so Google Translate comes in handy. 

    Since W806 is not base on ARM, we need to install the whole toolchain for C-SKY. The process was described extensively by IOsetting on Github:

    https://github.com/IOsetting/wm-sdk-w806

    Some of you might not like working from command prompt and there is such possibility: CDK (C-Sky Development Kit) which is an IDE from T-Head (company behind C-Sky architecture)

    Unfortunately to download it you have to register on another Chinese site and follow these steps: After downloading and installing the CDK things are getting a little bit simpler. Whole software is in English (there even is no option for Chinese language).

    The next step is to open project that is located in SDK:
    WM_SDK_W806\tools\W806\projects\SDK_Project\project\CDK_WS

    Overall the SDK is very similar to HAL available in STM32 package

    Is it worth starting a project with W806? It depends. For professional usage - rather not. There is no English documentation, support or even popularity among users. For hobby usage things looks quite different. For less than 4 dollars you can get quite powerful board with many interesting features.