RDA

From ElectroDragon
Revision as of 06:12, 10 January 2018 by Chao (Talk | contribs) (Software)

Jump to: navigation, search

RDA88xx - GSM

RDA5981 - WIFI

  • More hardware info refer to documents section, IC datasheet and hardware design guide

Hardware

281441234560.png
5981 IC.png

RDA5981 Features

Supported Feature Lists Specs note
ARM Contex M4 + FPU/MPU core 160MHZ frequency, super powerful MCU; -
Total system memory
  • Up to 288K-Byte internal SRAM for user
  • 160K-Byte SRAM for Wi-Fi stack, Flash cache
  • Integrated maximum 32Mbit SPI flash
  • maximum support 64M PSRAM expansion;
  • user available memory 192k (X01C) / 92K (X01A) byte (build in module) ?
USB2.0 interface support USB Host, support U disk (FAT file system);
SDIO maximum support 256G SD card;
AT command
  • support configuration save;
  • more than 100 AT commands
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
  • master or slave mode
  • maximum speed supports 3.4Mb/s;
SPI 4x
  • master mode
  • maximum clock frequency supports 20MHZ
  • maximum data length supports 64bit;
PWM 8x
  • 5x standard PWM,
  • 1x LPG, suitable for flash light control
  • 2x PWL for monochrome light brightness control;
ADCv 2x
  • 10bit sampling
  • voltage measurement range is 0-2V (0-1.4V can be interrupted)
  • support the internal direct test input voltage, do not need peripheral circuits;
hardware AES / RSA encryption and decryption
interrupt 14x GPIO0-GPIO13, up to 16 GPIO available for interrupt
Wifi
  • 2.4GHZ 802.11b/g/n, HT20 / HT40,
  • maximum 150Mbps, 20/40MHZ bandwidth
operating system mbed RTOS
certificationv ROHS, FCC, CE
Software supported MQTT, smartconfig, airkiss, Douers AI, etc
Other features
  • Small size: compact 5x5mm2 QFN-40
  • Highly-integrated: internal PMU/LDO/PA/LNA
  • Multi-choice: RDA5981A/B/C, 8Mb, 16Mb, 32Mb, and some else different specifications

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

Schematic

RDAX02

Pin Definition, GPIO mapping see right image

Rda5981 pin def 01.png
5981 gpio mapping.png
Pins Name Description Extra
1 IO4 General IOs
2 Reset
  • RESET, pull down RESET;
  • if the external MCU to control, you can directly connect the GPIO MCU
  • normal high, when RESET first pulled low, and then pulled high
3 IO1 General IOs
4 IO2 General IOs
5 IO3 General IOs
6 UART_RXD
  • Download firmware, AT can use this serial port
  • the serial port speed from 1200bps to 460800bps
7 UART_TXD same as above
8 IO8 General IOs, ADC GPADC-1
9 IO7/ADC Ordinary GPIO, can also be configured as ADC
10 IO5 General IOs
11 ADC0 ADC pin
  • GPADC-0
  • also can measure battery by set register
12 USB_DP USB D+ pin
13 USB_DN USB D- pin
14 IO9 General IOs
15 VCC33
  • Working power 3.0-3.5V
  • requires the maximum supply current of not less than 300mA
16 GND ground
17 IO0 General IOs
18 IO21 General IOs
19 IO22 General IOs
20 IO23 General IOs
21 IO24 General IOs
22 IO25 General IOs
23 IO12 General IOs
24 IO13 General IOs

Quick start guide

  • Baudrate - 926100, connect VCC33, GND, UART_TXD, UART_RXD can work

Software

  • AT Commands lists please see on this page RDA5981_AT

Install toolchain for mbedOS

Prerequests MDK > 5.15, python > 2.7

python --version
arm-none-eabi-gcc --version
pip --version
hg --version
pip install mbed-cli
for chinese install by - pip install mbed-cli --proxy=127.0.0.1:1080

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
  1. WiFi Stack - Contents features / FEATURE_LWIP is WiFi Stack + LWIP for WLAN and TCP / IP networking.
  2. HAL - The directory hal / targets / TARGET_RDA is a hardware virtualization layer that includes the underlying drivers for each peripheral.
  3. 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.
  4. Features - Directory Features / Some of the RDA5981 available under TARGET_RDA
  5. 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.
5981 toolchain error 01.jpg
  • 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: mbed compile -m UNO_91H -t ARM --source TESTS/TARGET_RDA/timer/ --source ./
  • 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
Mbed baudrate.png
  • 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

RDA5856QE32 - Bluetooth

  • Bluetooth v4.2, support BR/EDR and BLE
  • Integrated broadcast FM tuner
  • VoC DSP core @104MHz
  • 16 bits voice ADC
  • 16 bits stereo DAC
  • Support mp3/sbc/wma/aac/m4a/wav/ts/amr
  • AT commands

Documents

RDA5981

RDA59xx

Resources