RDA5981
RDA5981 - WIFI
- More hardware info refer to documents section, IC datasheet and hardware design guide
Updates
- USB HOST is not availalble for now - http://bbs.rdamicro.com/forum.php?mod=viewthread&tid=13378&extra=page%3D1
Hardware
RDA5981 Features
Supported Feature Lists | Specs | note |
---|---|---|
ARM Contex M4 + FPU/MPU core | 160MHZ frequency, super powerful MCU; | - |
Total system memory |
|
|
USB2.0 interface | support USB Host, support U disk (FAT file system); | |
SDIO | maximum support 256G SD card; | |
AT command |
|
|
working temperature | -30 ℃ to +80 ℃; | |
voltage | 3.0V-3.5V; | boot voltage> 3.0V; |
serial | 2x | baud rate from 1200bps to 4Mbps; |
I2S | 2x | BCLK support 96/192/384/512 / 44.1 / 88.2KHz; |
I2C | 1x |
|
SPI | 4x |
|
PWM | 8x |
|
ADCv | 2x |
|
hardware AES / RSA encryption and decryption | ||
interrupt | 14x | GPIO0-GPIO13, up to 16 GPIO available for interrupt |
Wifi |
|
|
operating system | mbed RTOS | |
certificationv | ROHS, FCC, CE | |
Software supported | MQTT, smartconfig, airkiss, Douers AI, etc | |
Other features |
|
Module Specfication
Power Use
- Shutdown leakage 20uA
- Standby current 3mA
- Operating current 85mA
- Note: Remove the LED
- Note: Peak power should garanurtee up to 300mA
Power supply
- VBAT = 3-5V
- VIO for IO is 1.8-3.1V
...
Schematic
Pin Definition
Pin Definition, GPIO mapping see below
Module Pins | IC | Name | Description | UNO Definition | (or USB) SD |
|
! Extra |
---|---|---|---|---|---|---|---|
1 | IO4 | General IOs | PB_4 | ||||
2 | Reset |
|
|||||
3 | IO1 | General IOs | PB_1 | UART2_RX | |||
4 | IO2 | General IOs | PB_2 | UART2_TX | |||
5 | IO3 | General IOs | PB_3 | SD_D0 | |||
6 | UART_RXD |
|
|||||
7 | UART_TXD | same as above | |||||
8 | Pin13 | IO8 | General IOs, ADC | PB_8 | GPADC-1 | ||
9 | IO7(should be not ADC) | PB_7 | SD_D1 |
|
|||
10 | IO5 | General IOs | PB_5 | SPI, FLASH: CS | |||
11 | Pin11 | ADC0 (IO7) | ADC pin |
|
|||
12 | USB_DP | USB D+ pin | |||||
13 | USB_DN | USB D- pin | |||||
14 | IO9 | General IOs | PB_9 | SD_CLK | |||
15 | VCC33 |
|
|||||
16 | GND | ground | |||||
17 | IO0 | General IOs | PB_0 | SD_CMD | |||
18 | IO21 | General IOs | PC_9 | ||||
19 | IO22 | General IOs | PD_0 | CLK | |||
20 | IO23 | General IOs | PD_1 | PSRAM_CS | |||
21 | IO24 | General IOs | PD_2 | SI | |||
22 | IO25 | General IOs | PD_3 | SO | |||
23 | IO12 | General IOs | PC_0 | SD_D2 | |||
24 | IO13 | General IOs | PC_1 | SD_D3 |
Quick start guide
- Baudrate - 926100, connect VCC33, GND, UART_TXD, UART_RXD can work
- RDA - UNO91H Board Pin Mappin in GPIO_API.c, which used in demo code.
Software
- AT Commands lists please see on this page RDA5981_AT
Install toolchain for mbedOS
Prerequests MDK > 5.15, python > 2.7
- Files found at http://dl.electrodragon.com/k/index.php?share/folder&user=1&sid=bvjKfIMC
- Follow the install guide video here - https://www.youtube.com/watch?v=XvVyLxHuCpQ
- Install MDK 5.17, if you have compile issue, which means code is limited for evaluation version.
- check installation
python --version arm-none-eabi-gcc --version pip --version hg --version pip install mbed-cli
futher toolchain for mbedOS
- github page mbed-os general, not include target-RDA examples, basically not useful for this here - https://github.com/ARMmbed/mbed-os,
- Get SDK and code examples for RDA5981 from here.
- Folder explaination
- WiFi Stack - Contents features / FEATURE_LWIP is WiFi Stack + LWIP for WLAN and TCP / IP networking.
- HAL - The directory hal / targets / TARGET_RDA is a hardware virtualization layer that includes the underlying drivers for each peripheral.
- RTX - Contents rtos is a CMSIS-RTOS RTX source code from ARM. It is a real-time operating system based on time slice and priority.
- Features - Directory Features / Some of the RDA5981 available under TARGET_RDA
- Test Cases - Table of Contents TESTS / TARGET_RDA contains several test cases for the RDA5981 that allow you to test peripherals and protocol stacks separately.
- enter into mbedOS folder, this requirements are in mbedOS reqirement.txt file.
pip install -r requirements.txt
- if someone falls in the "Couldn't find index page for 'setuptools_scm' (maybe misspelled?)" bug ... simple install it by: pip install setuptools_scm (reference link)
- Set MDK ARMCC path for mbedOS
mbed config --global ARM_PATH C:\Keil_v5\ARM\ARMCC\ ---> get feedback --> [mbed] C:\Keil_v5\ARM\ARMCC\ now set as global ARM_PATH
First complier > test case > timer
- command: mbed compile -m UNO_91H -t ARM --source TESTS/TARGET_RDA/timer/ --source ./
- To recomplie again, need clean, otherwise will get error, to clean, simply add -c after above command
mbed compile -m UNO_91H -t ARM --source TESTS/TARGET_RDA/timer/ --source ./ -c
- Explanation: -m MCU target, -t complier toolchain, --source source code directory -c clean before complie
- compile in progress
... ... Compile [ 88.9%]: Thread.cpp Compile [ 89.4%]: rtos_idle.c Compile [ 90.0%]: HAL_CM.c Compile [ 90.6%]: RTX_Conf_CM.c Compile [ 91.1%]: HAL_CM4.c Compile [ 91.7%]: SVC_Table.S Compile [ 92.2%]: rt_CMSIS.c Compile [ 92.8%]: rt_Event.c Compile [ 93.3%]: rt_List.c Compile [ 93.9%]: rt_Mailbox.c Compile [ 94.4%]: rt_MemBox.c Compile [ 95.0%]: rt_Memory.c Compile [ 95.6%]: rt_Mutex.c Compile [ 96.1%]: rt_OsEventObserver.c Compile [ 96.7%]: rt_Robin.c Compile [ 97.2%]: rt_Semaphore.c Compile [ 97.8%]: rt_System.c Compile [ 98.3%]: rt_Task.c Compile [ 98.9%]: rt_Time.c Compile [ 99.4%]: rt_Timer.c Compile [100.0%]: main.cpp Link: timer Elf2Bin: timer +-----------+-------+-------+--------+ | Module | .text | .data | .bss | +-----------+-------+-------+--------+ | Misc | 28621 | 235 | 294672 | | Subtotals | 28621 | 235 | 294672 | +-----------+-------+-------+--------+ Allocated Heap: unknown Allocated Stack: unknown Total Static RAM memory (data + bss): 294907 bytes Total RAM memory (data + bss + heap + stack): 294907 bytes Total Flash memory (text + data + misc): 28856 bytes Image: .\BUILD\UNO_91H\ARM\timer.bin
- build file direction at .\BUILD\UNO_91H\ARM\timer.bin
- baudrate can change in file mbed_lib.json -> stdio-baud-rate, but must be 用 921600、460800、230400、115200 common value
- optional step to compile, generate cpp file? - mbed compile
Flash
- Get official download tool from here http://bbs.rdamicro.com/forum.php?mod=viewthread&tid=108&extra=page%3D1
- or download from our github - https://github.com/Edragon/RDA
- RDA flash tool, notice baudrate is 921600, select the bin file complied above.
- Seems must press reset instead of re-power, reboot
Example code
- all in SDK example folders: C:\mbedOS\TESTS\TARGET_RDA
- SPI flash
- SDcard - in C:\mbedOS:
mbed compile -m UNO_91H -t ARM --source TESTS/TARGET_RDA/sdcard_sdmmc/ --source ./ -c
- I2S
- USB
Test in Progress
- Some files are GIF animation
Overclock test, done by @eMbeddedHome
Documents
RDA5981
- RDA5981 Datasheet - short brief only
- RDA5981A_DataSheet_v1.1
- RDA5981C_DataSheet_v1.1.pdf
- RDA5981 design guide CN
RDA59xx
RDA5856
TSSOP24
RDA Flash downloader
Resources
- Arduino UNO 91H Board Introduction - On board RDA5981 + RDA5856QE32
- mbed
- RDA forum - http://bbs.rdamicro.com