<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://w.electrodragon.com/w/index.php?action=history&amp;feed=atom&amp;title=RDA5981</id>
	<title>RDA5981 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://w.electrodragon.com/w/index.php?action=history&amp;feed=atom&amp;title=RDA5981"/>
	<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=RDA5981&amp;action=history"/>
	<updated>2026-06-04T18:45:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://w.electrodragon.com/w/index.php?title=RDA5981&amp;diff=19022&amp;oldid=prev</id>
		<title>Chao: /* Install toolchain for mbedOS */</title>
		<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=RDA5981&amp;diff=19022&amp;oldid=prev"/>
		<updated>2018-04-12T04:12:34Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Install toolchain for mbedOS&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== RDA5981 - WIFI ==&lt;br /&gt;
* '''More hardware info refer to documents section, IC datasheet and hardware design guide'''&lt;br /&gt;
=== Updates ===&lt;br /&gt;
* USB HOST is not availalble for now - http://bbs.rdamicro.com/forum.php?mod=viewthread&amp;amp;tid=13378&amp;amp;extra=page%3D1&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
[[File:281441234560.png|400px|thumbnail]]&lt;br /&gt;
[[File:5981 IC.png|400px|thumbnail]]&lt;br /&gt;
==== RDA5981 Features====&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Supported Feature Lists !! Specs !! note&lt;br /&gt;
|-&lt;br /&gt;
| ARM Contex M4 + FPU/MPU core || 160MHZ frequency, super powerful MCU;|| -&lt;br /&gt;
|-&lt;br /&gt;
| Total system memory || &lt;br /&gt;
* Up to 288K-Byte internal SRAM for user&lt;br /&gt;
* 160K-Byte SRAM for Wi-Fi stack, Flash cache&lt;br /&gt;
* Integrated maximum 32Mbit SPI flash &lt;br /&gt;
* maximum support 64M PSRAM expansion;&lt;br /&gt;
|| &lt;br /&gt;
* user available memory 192k (X01C) / 92K (X01A) byte (build in module) ?&lt;br /&gt;
|-&lt;br /&gt;
| USB2.0 interface || support USB Host, support U disk (FAT file system); || &lt;br /&gt;
|-&lt;br /&gt;
| SDIO || maximum support 256G SD card; || &lt;br /&gt;
|-&lt;br /&gt;
| AT command || &lt;br /&gt;
* support configuration save;&lt;br /&gt;
* more than 100 AT commands&lt;br /&gt;
|| &lt;br /&gt;
|-&lt;br /&gt;
| working temperature || -30 ℃ to +80 ℃; ||&lt;br /&gt;
|-&lt;br /&gt;
| voltage || 3.0V-3.5V; || boot voltage&amp;gt; 3.0V;&lt;br /&gt;
|-&lt;br /&gt;
| serial || 2x || baud rate from 1200bps to 4Mbps;&lt;br /&gt;
|-&lt;br /&gt;
| I2S || 2x || BCLK support 96/192/384/512 / 44.1 / 88.2KHz;&lt;br /&gt;
|-&lt;br /&gt;
| I2C || 1x || &lt;br /&gt;
* master or slave mode&lt;br /&gt;
* maximum speed supports 3.4Mb/s;&lt;br /&gt;
|-&lt;br /&gt;
| SPI || 4x || &lt;br /&gt;
* master mode&lt;br /&gt;
* maximum clock frequency supports 20MHZ&lt;br /&gt;
* maximum data length supports 64bit;&lt;br /&gt;
|-&lt;br /&gt;
| PWM || 8x || &lt;br /&gt;
* PWM 4x, PWT 1x - standard PWM, &lt;br /&gt;
* LPG 1x , suitable for flash light control&lt;br /&gt;
* PWL 2x for monochrome light brightness control;&lt;br /&gt;
|-&lt;br /&gt;
| ADCv || 2x ||&lt;br /&gt;
* 10bit sampling&lt;br /&gt;
* voltage measurement range is 0-2V (0-1.4V can be interrupted)&lt;br /&gt;
* support the internal direct test input voltage, do not need peripheral circuits;&lt;br /&gt;
|-&lt;br /&gt;
| hardware AES / RSA encryption and decryption || || &lt;br /&gt;
|-&lt;br /&gt;
| interrupt || 14x ||  GPIO0-GPIO13, up to 16 GPIO available for interrupt&lt;br /&gt;
|-&lt;br /&gt;
| Wifi || &lt;br /&gt;
* 2.4GHZ 802.11b/g/n, HT20 / HT40,&lt;br /&gt;
* maximum 150Mbps, 20/40MHZ bandwidth&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| operating system || mbed RTOS || &lt;br /&gt;
|-&lt;br /&gt;
| certificationv ||  ROHS, FCC, CE || &lt;br /&gt;
|- &lt;br /&gt;
| Software supported || MQTT, smartconfig, airkiss, Douers AI, etc&lt;br /&gt;
|-&lt;br /&gt;
| Other features ||&lt;br /&gt;
* Small size: compact 5x5mm2 QFN-40&lt;br /&gt;
* Highly-integrated: internal PMU/LDO/PA/LNA&lt;br /&gt;
* Multi-choice: RDA5981A/B/C, 8Mb, 16Mb, 32Mb, and some else different specifications&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Module Specfication ====&lt;br /&gt;
Power Use&lt;br /&gt;
* Shutdown leakage 20uA&lt;br /&gt;
* Standby current 3mA&lt;br /&gt;
* Operating current 85mA&lt;br /&gt;
* Note: Remove the LED&lt;br /&gt;
* Note: Peak power should garanurtee up to 300mA&lt;br /&gt;
Power supply &lt;br /&gt;
* VBAT = 3-5V&lt;br /&gt;
* VIO for IO is 1.8-3.1V&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
==== Schematic ====&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Rda5981_02.jpg | sch 01 of module&lt;br /&gt;
File:Rda_button_ADC.png | RDA ADC input button value&lt;br /&gt;
File:Rda_button_value.png | ADC reference button value&lt;br /&gt;
File:Usb_host_or_device.png | USB host or device&lt;br /&gt;
File:Rda_i2s_slave.png | I2S slave&lt;br /&gt;
File:Rda_psram.png | RDA PSRAM flash, support 3.3V, also no need pull-up res actually&lt;br /&gt;
File:Rda_sd_interface.png | micro SD interface&lt;br /&gt;
File:Rda_spi_flash.png | SPI Flash&lt;br /&gt;
File:Rda_battery_charger.png | external battery charger&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Pin Definition ====&lt;br /&gt;
Pin Definition, GPIO mapping see below&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Module_pins.jpg | Pin&lt;br /&gt;
File:Rda5981 pin def 01.png | Dimension&lt;br /&gt;
File:5981 gpio mapping.png | GPIO Mapping&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Module Pins !! IC !! Name!! Description !! UNO Definition !! (or USB) SD !! &lt;br /&gt;
* Ext. FLASH&lt;br /&gt;
* SPI&lt;br /&gt;
* PSRAM&lt;br /&gt;
* UART&lt;br /&gt;
!! Extra&lt;br /&gt;
|-&lt;br /&gt;
| 1 || || IO4 || General IOs || PB_4 || ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 2 || || Reset || &lt;br /&gt;
* RESET, pull down RESET; &lt;br /&gt;
* if the external MCU to control, you can directly connect the GPIO MCU&lt;br /&gt;
* normal high, when RESET first pulled low, and then pulled high &lt;br /&gt;
|| || ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 3 || || IO1 || General IOs || PB_1 || || UART2_RX || &lt;br /&gt;
|-&lt;br /&gt;
| 4 || || IO2 || General IOs  || PB_2 || || UART2_TX || &lt;br /&gt;
|-&lt;br /&gt;
| 5 || || IO3 || General IOs  || PB_3  || SD_D0 ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 6 || || UART_RXD || &lt;br /&gt;
* Download firmware, AT can use this serial port&lt;br /&gt;
* the serial port speed from 1200bps to 460800bps &lt;br /&gt;
 || ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 7 || || UART_TXD|| same as above  || ||  ||  || &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Pin13 || IO8 || General IOs, ADC || PB_8 ||  || GPADC-1 || &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 9 || || IO7(should be not ADC) ||  || PB_7 || SD_D1 || &lt;br /&gt;
* General IOs &lt;br /&gt;
* (Incorrect: can also be configured as ADC) &lt;br /&gt;
|| &lt;br /&gt;
|-&lt;br /&gt;
| 10 || || IO5 || General IOs  || PB_5 || || || SPI, FLASH: CS&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Pin11 || ADC0 (IO7) || ADC pin || || || &lt;br /&gt;
* GPADC-0&lt;br /&gt;
* also can measure battery by set register&lt;br /&gt;
|| &lt;br /&gt;
|-&lt;br /&gt;
| 12 || || USB_DP || USB D+ pin  || ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 13 || || USB_DN || USB D- pin  || ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 14 || || IO9 || General IOs   || PB_9 ||  SD_CLK || || &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 15 || || VCC33 || &lt;br /&gt;
* Working power 3.0-3.5V&lt;br /&gt;
* requires the maximum supply current of not less than 300mA&lt;br /&gt;
  || ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 16 || || GND || ground  || ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 17 || || IO0 || General IOs || PB_0 || SD_CMD ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 18 || || IO21 || General IOs  || PC_9 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 19 || || IO22 || General IOs  || PD_0 || ||  || CLK&lt;br /&gt;
|-&lt;br /&gt;
| 20 || || IO23 || General IOs  || PD_1 ||  ||  || PSRAM_CS&lt;br /&gt;
|-&lt;br /&gt;
| 21 || || IO24 || General IOs  || PD_2 ||  ||  || SI&lt;br /&gt;
|-&lt;br /&gt;
| 22 || || IO25 || General IOs   || PD_3 || || || SO&lt;br /&gt;
|-&lt;br /&gt;
| 23 || || IO12 || General IOs  || PC_0 || SD_D2 ||  || &lt;br /&gt;
|-&lt;br /&gt;
| 24 || || IO13 || General IOs  || PC_1|| SD_D3 ||  || &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Quick start guide ====&lt;br /&gt;
* Baudrate - 926100, connect VCC33, GND, UART_TXD, UART_RXD  can work&lt;br /&gt;
* RDA - UNO91H Board Pin Mappin in GPIO_API.c, which used in demo code.&lt;br /&gt;
&lt;br /&gt;
=== Software ===&lt;br /&gt;
* AT Commands lists please see on this page [[RDA5981_AT]]&lt;br /&gt;
==== Install toolchain for mbedOS====&lt;br /&gt;
Prerequests MDK &amp;gt; 5.15, python &amp;gt; 2.7&lt;br /&gt;
* Files found at http://dl.electrodragon.com/k/index.php?share/folder&amp;amp;user=1&amp;amp;sid=bvjKfIMC&lt;br /&gt;
* Follow the install guide video here - https://www.youtube.com/watch?v=XvVyLxHuCpQ&lt;br /&gt;
* Install MDK 5.17, if you have compile issue, which means code is limited for evaluation version. &lt;br /&gt;
* check installation&lt;br /&gt;
 python --version&lt;br /&gt;
 arm-none-eabi-gcc --version&lt;br /&gt;
 pip --version&lt;br /&gt;
 hg --version&lt;br /&gt;
 pip install mbed-cli&lt;br /&gt;
&lt;br /&gt;
==== futher toolchain for mbedOS ====&lt;br /&gt;
* github page mbed-os general, not include target-RDA examples, basically not useful for this here - https://github.com/ARMmbed/mbed-os, &lt;br /&gt;
* Get SDK and code examples for RDA5981 from [https://github.com/Edragon/RDA5981-2 here].&lt;br /&gt;
* Folder explaination&lt;br /&gt;
# WiFi Stack - Contents features / FEATURE_LWIP is WiFi Stack + LWIP for WLAN and TCP / IP networking.&lt;br /&gt;
# HAL - The directory hal / targets / TARGET_RDA is a hardware virtualization layer that includes the underlying drivers for each peripheral.&lt;br /&gt;
# 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.&lt;br /&gt;
# Features - Directory Features / Some of the RDA5981 available under TARGET_RDA&lt;br /&gt;
# 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.&lt;br /&gt;
[[File:5981 toolchain error 01.jpg|thumbnail| 500px]]&lt;br /&gt;
* enter into mbedOS folder, this requirements are in mbedOS reqirement.txt file.&lt;br /&gt;
 pip install -r requirements.txt&lt;br /&gt;
* if someone falls in the &amp;quot;Couldn't find index page for 'setuptools_scm' (maybe misspelled?)&amp;quot; bug ... simple install it by:  pip install setuptools_scm [https://twitter.com/eMbeddedHome/status/950570992484700161 (reference link)]&lt;br /&gt;
&lt;br /&gt;
* Set MDK ARMCC path for mbedOS&lt;br /&gt;
 mbed config --global ARM_PATH C:\Keil_v5\ARM\ARMCC\   ---&amp;gt; get feedback --&amp;gt; [mbed] C:\Keil_v5\ARM\ARMCC\ now set as global ARM_PATH&lt;br /&gt;
&lt;br /&gt;
==== First complier &amp;gt; test case &amp;gt; timer ====&lt;br /&gt;
* command: mbed compile -m UNO_91H -t ARM --source TESTS/TARGET_RDA/timer/ --source ./&lt;br /&gt;
* To recomplie again, need clean, otherwise will get error, to clean, simply add -c after above command&lt;br /&gt;
 mbed compile -m UNO_91H -t ARM --source TESTS/TARGET_RDA/timer/ --source ./ -c&lt;br /&gt;
* Explanation: -m MCU target, -t complier toolchain, --source source code directory -c clean before complie&lt;br /&gt;
* compile in progress&lt;br /&gt;
 ...&lt;br /&gt;
 ...&lt;br /&gt;
 Compile [ 88.9%]: Thread.cpp&lt;br /&gt;
 Compile [ 89.4%]: rtos_idle.c&lt;br /&gt;
 Compile [ 90.0%]: HAL_CM.c&lt;br /&gt;
 Compile [ 90.6%]: RTX_Conf_CM.c&lt;br /&gt;
 Compile [ 91.1%]: HAL_CM4.c&lt;br /&gt;
 Compile [ 91.7%]: SVC_Table.S&lt;br /&gt;
 Compile [ 92.2%]: rt_CMSIS.c&lt;br /&gt;
 Compile [ 92.8%]: rt_Event.c&lt;br /&gt;
 Compile [ 93.3%]: rt_List.c&lt;br /&gt;
 Compile [ 93.9%]: rt_Mailbox.c&lt;br /&gt;
 Compile [ 94.4%]: rt_MemBox.c&lt;br /&gt;
 Compile [ 95.0%]: rt_Memory.c&lt;br /&gt;
 Compile [ 95.6%]: rt_Mutex.c&lt;br /&gt;
 Compile [ 96.1%]: rt_OsEventObserver.c&lt;br /&gt;
 Compile [ 96.7%]: rt_Robin.c&lt;br /&gt;
 Compile [ 97.2%]: rt_Semaphore.c&lt;br /&gt;
 Compile [ 97.8%]: rt_System.c&lt;br /&gt;
 Compile [ 98.3%]: rt_Task.c&lt;br /&gt;
 Compile [ 98.9%]: rt_Time.c&lt;br /&gt;
 Compile [ 99.4%]: rt_Timer.c&lt;br /&gt;
 Compile [100.0%]: main.cpp&lt;br /&gt;
 Link: timer&lt;br /&gt;
 Elf2Bin: timer&lt;br /&gt;
 +-----------+-------+-------+--------+&lt;br /&gt;
 | Module    | .text | .data |   .bss |&lt;br /&gt;
 +-----------+-------+-------+--------+&lt;br /&gt;
 | Misc      | 28621 |   235 | 294672 |&lt;br /&gt;
 | Subtotals | 28621 |   235 | 294672 |&lt;br /&gt;
 +-----------+-------+-------+--------+&lt;br /&gt;
 Allocated Heap: unknown&lt;br /&gt;
 Allocated Stack: unknown&lt;br /&gt;
 Total Static RAM memory (data + bss): 294907 bytes&lt;br /&gt;
 Total RAM memory (data + bss + heap + stack): 294907 bytes&lt;br /&gt;
 Total Flash memory (text + data + misc): 28856 bytes&lt;br /&gt;
 Image: .\BUILD\UNO_91H\ARM\timer.bin&lt;br /&gt;
* build file direction at .\BUILD\UNO_91H\ARM\timer.bin&lt;br /&gt;
[[File:Mbed baudrate.png|thumbnail]]&lt;br /&gt;
* baudrate can change in file  mbed_lib.json -&amp;gt; stdio-baud-rate, but must be 用 921600、460800、230400、115200 common value&lt;br /&gt;
* optional step to compile, generate cpp file? - mbed compile&lt;br /&gt;
&lt;br /&gt;
==== Flash ====&lt;br /&gt;
* Get official download tool from here http://bbs.rdamicro.com/forum.php?mod=viewthread&amp;amp;tid=108&amp;amp;extra=page%3D1&lt;br /&gt;
* or download from our github - https://github.com/Edragon/RDA&lt;br /&gt;
* RDA flash tool, notice baudrate is 921600, select the bin file complied above.&lt;br /&gt;
* Seems must press reset instead of re-power, reboot&lt;br /&gt;
&lt;br /&gt;
==== Example code ====&lt;br /&gt;
* all in SDK example folders: C:\mbedOS\TESTS\TARGET_RDA&lt;br /&gt;
* SPI flash&lt;br /&gt;
* SDcard - in C:\mbedOS: &lt;br /&gt;
 mbed compile -m UNO_91H -t ARM --source TESTS/TARGET_RDA/sdcard_sdmmc/ --source ./ -c&lt;br /&gt;
* I2S&lt;br /&gt;
* USB&lt;br /&gt;
=== Test in Progress ===&lt;br /&gt;
* Some files are GIF animation&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Sd-test.gif | SDcard test&lt;br /&gt;
File:Pimp_rda5981_m.gif| Overclock test, done by @[https://twitter.com/eMbeddedHome eMbeddedHome]&lt;br /&gt;
File:Psram_test.png | PSRAM Test&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Documents ==&lt;br /&gt;
RDA5981&lt;br /&gt;
* [[:File:Rda5981_datasheet.pdf|RDA5981 Datasheet - short brief only]]&lt;br /&gt;
* [[:File:RDA5981A_DataSheet_v1.1.pdf|RDA5981A_DataSheet_v1.1]]&lt;br /&gt;
* [[:File:RDA5981C_DataSheet_v1.1.pdf|RDA5981C_DataSheet_v1.1.pdf]]&lt;br /&gt;
* [[:File:RDA5981X_hardware_design_guide_V1.0_update20170616.pdf|RDA5981 design guide CN]]&lt;br /&gt;
&lt;br /&gt;
RDA59xx&lt;br /&gt;
* [[File:RDA5991.pdf|RDA5991]]&lt;br /&gt;
* [[File:RDA5995_DataSheet_v1.2.pdf]]&lt;br /&gt;
RDA5856&lt;br /&gt;
* [[:File:RDA5856Q32_Datasheet_V0.03.pdf|RDA5856Q32 Datasheet V0.03]]&lt;br /&gt;
TSSOP24&lt;br /&gt;
* [[:File:RDA5856TE_C95544.pdf|RDA5856TE Datasheet]]&lt;br /&gt;
* [[File:RDA5856TE_hardware_design_manual_V1.1.pdf|RDA5856TE_hardware_design_manual_V1.1]]&lt;br /&gt;
* [[:File:RDA5856_MSOP_24_EVB_V1.4_20160527.pdf|RDA5856_MSOP_24_EVB_V1.4]]&lt;br /&gt;
RDA Flash downloader&lt;br /&gt;
* [[File:RDA_flashtest_tool.zip]]&lt;br /&gt;
Resources&lt;br /&gt;
* [[:File:UNO_91H.pdf|Arduino UNO 91H Board Introduction]] - On board RDA5981 + RDA5856QE32&lt;br /&gt;
* [[mbed]]&lt;br /&gt;
* RDA forum - http://bbs.rdamicro.com&lt;br /&gt;
[[category: RDA]]&lt;/div&gt;</summary>
		<author><name>Chao</name></author>
	</entry>
</feed>