Difference between revisions of "RDA"

From ElectroDragon
Jump to: navigation, search
(Software)
(Schematic)
 
(43 intermediate revisions by the same user not shown)
Line 97: Line 97:
 
File:Usb_host_or_device.png | USB host or device
 
File:Usb_host_or_device.png | USB host or device
 
File:Rda_i2s_slave.png | I2S slave
 
File:Rda_i2s_slave.png | I2S slave
File:Rda_psram.png | RDA PSRAM flash
+
File:Rda_psram.png | RDA PSRAM flash, support 3.3V, also no need pull-up res actually
 
File:Rda_sd_interface.png | micro SD interface
 
File:Rda_sd_interface.png | micro SD interface
 
File:Rda_spi_flash.png | SPI Flash
 
File:Rda_spi_flash.png | SPI Flash
Line 103: Line 103:
 
</gallery>
 
</gallery>
  
==== RDAX02 ====
+
==== Pin Definition ====
Pin Definition, GPIO mapping see right image
+
Pin Definition, GPIO mapping see below
[[File:Rda5981 pin def 01.png|600px|thumbnail]]
+
<gallery>
[[File:5981 gpio mapping.png|thumbnail|600px]]
+
File:Module_pins.jpg | Pin
 +
File:Rda5981 pin def 01.png | Dimension
 +
File:5981 gpio mapping.png | GPIO Mapping
 +
</gallery>
 +
 
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
 
|-
 
|-
! Pins !! Name !! Description !! Extra
+
! Pins !! Name!! Description !! UNO Definition !! (or USB) SD !!
 +
* Ext. FLASH
 +
* SPI
 +
* PSRAM
 +
!! Extra
 
|-
 
|-
| 1 || IO4 || General IOs
+
| 1 || IO4 || General IOs || PB_4 || ||  ||
 
|-
 
|-
 
| 2 || Reset ||  
 
| 2 || Reset ||  
Line 117: Line 125:
 
* if the external MCU to control, you can directly connect the GPIO MCU
 
* if the external MCU to control, you can directly connect the GPIO MCU
 
* normal high, when RESET first pulled low, and then pulled high  
 
* normal high, when RESET first pulled low, and then pulled high  
 +
|| || ||  ||
 
|-
 
|-
| 3 || IO1 || General IOs
+
| 3 || IO1 || General IOs || PB_1 || ||  ||
 
|-
 
|-
| 4 || IO2 || General IOs  
+
| 4 || IO2 || General IOs || PB_2 || ||  ||
 
|-
 
|-
| 5 || IO3 || General IOs  
+
| 5 || IO3 || General IOs || PB_3  || SD_D0 ||  ||
 
|-
 
|-
 
| 6 || UART_RXD ||  
 
| 6 || UART_RXD ||  
 
* Download firmware, AT can use this serial port
 
* Download firmware, AT can use this serial port
 
* the serial port speed from 1200bps to 460800bps  
 
* the serial port speed from 1200bps to 460800bps  
 +
|| ||  ||  ||
 
|-
 
|-
| 7 || UART_TXD|| same as above  
+
| 7 || UART_TXD|| same as above || ||  ||  ||
  
 
|-
 
|-
| 8 || IO8 || General IOs, ADC || GPADC-1
+
| 8 || IO8 || General IOs, ADC || PB_8 ||  || GPADC-1 ||
  
 
|-
 
|-
| 9 || IO7/ADC || Ordinary GPIO, can also be configured as ADC
+
| 9 || IO7/ADC ||  || PB_7 || SD_D1 || Ordinary GPIO, can also be configured as ADC ||
 
|-
 
|-
| 10 || IO5 || General IOs
+
| 10 || IO5 || General IOs || PB_5 || || || SPI, FLASH: CS
 
|-
 
|-
| 11 || ADC0 || ADC pin ||  
+
| 11 || ADC0 || ADC pin || || ||  
 
* GPADC-0
 
* GPADC-0
 
* also can measure battery by set register
 
* also can measure battery by set register
 +
||
 
|-
 
|-
| 12 || USB_DP || USB D+ pin
+
| 12 || USB_DP || USB D+ pin || ||  ||  ||
 
|-
 
|-
| 13 || USB_DN || USB D- pin
+
| 13 || USB_DN || USB D- pin || ||  ||  ||
 
|-
 
|-
| 14 || IO9 || General IOs  
+
| 14 || IO9 || General IOs   || PB_9 ||  SD_CLK || ||
  
 
|-
 
|-
Line 152: Line 163:
 
* Working power 3.0-3.5V
 
* Working power 3.0-3.5V
 
* requires the maximum supply current of not less than 300mA
 
* requires the maximum supply current of not less than 300mA
 +
  || ||  ||  ||
 
|-
 
|-
| 16 || GND || ground
+
| 16 || GND || ground || ||  ||  ||
 
|-
 
|-
| 17 || IO0 || General IOs
+
| 17 || IO0 || General IOs || PB_0 || SD_CMD ||  ||
 
|-
 
|-
| 18 || IO21 || General IOs
+
| 18 || IO21 || General IOs || PC_9 ||  ||  ||
 
|-
 
|-
| 19 || IO22 || General IOs
+
| 19 || IO22 || General IOs || PD_0 || ||  || CLK
 
|-
 
|-
| 20 || IO23 || General IOs
+
| 20 || IO23 || General IOs || PD_1 ||  ||  || PSRAM_CS
 
|-
 
|-
| 21 || IO24 || General IOs
+
| 21 || IO24 || General IOs || PD_2 ||  ||  || SI
 
|-
 
|-
| 22 || IO25 || General IOs  
+
| 22 || IO25 || General IOs   || PD_3 || || || SO
 
|-
 
|-
| 23 || IO12 || General IOs
+
| 23 || IO12 || General IOs || PC_0 || SD_D2 ||  ||
 
|-
 
|-
| 24 || IO13 || General IOs  
+
| 24 || IO13 || General IOs || PC_1|| SD_D3 ||  ||
  
 
|}
 
|}
Line 175: Line 187:
 
==== Quick start guide ====
 
==== Quick start guide ====
 
* Baudrate - 926100, connect VCC33, GND, UART_TXD, UART_RXD  can work
 
* 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 ===
 
=== Software ===
Line 209: Line 222:
 
==== First complier > test case > timer ====
 
==== First complier > test case > timer ====
 
* command: mbed compile -m UNO_91H -t ARM --source TESTS/TARGET_RDA/timer/ --source ./
 
* 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 ./
+
* 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
 
* Explanation: -m MCU target, -t complier toolchain, --source source code directory -c clean before complie
 
* compile in progress
 
* compile in progress
Line 256: Line 270:
 
==== Flash ====
 
==== Flash ====
 
* Get official download tool from here http://bbs.rdamicro.com/forum.php?mod=viewthread&tid=108&extra=page%3D1
 
* 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/RDA5981-2
+
* or download from our github - https://github.com/Edragon/RDA
 
* RDA flash tool, notice baudrate is 921600, select the bin file complied above.
 
* RDA flash tool, notice baudrate is 921600, select the bin file complied above.
 +
==== 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
  
== RDA5856QE32 - Bluetooth ==
+
== RDA5856 - Bluetooth ==
 +
QE32 - QFN32, L / LE - QFN48, TE - TSSOP24 / MSOP24, T28E - TSSOP28
 
* Bluetooth v4.2, support BR/EDR and BLE
 
* Bluetooth v4.2, support BR/EDR and BLE
 
* Integrated broadcast FM tuner
 
* Integrated broadcast FM tuner
Line 271: Line 292:
 
RDA5981
 
RDA5981
 
* [[:File:Rda5981_datasheet.pdf|RDA5981 Datasheet - short brief only]]
 
* [[:File:Rda5981_datasheet.pdf|RDA5981 Datasheet - short brief only]]
 +
* [[:File:RDA5981A_DataSheet_v1.1.pdf|RDA5981A_DataSheet_v1.1]]
 
* [[:File:RDA5981C_DataSheet_v1.1.pdf|RDA5981C_DataSheet_v1.1.pdf]]
 
* [[:File:RDA5981C_DataSheet_v1.1.pdf|RDA5981C_DataSheet_v1.1.pdf]]
 
* [[:File:RDA5981X_hardware_design_guide_V1.0_update20170616.pdf|RDA5981 design guide CN]]
 
* [[:File:RDA5981X_hardware_design_guide_V1.0_update20170616.pdf|RDA5981 design guide CN]]
 +
 
RDA59xx
 
RDA59xx
 
* [[File:RDA5991.pdf|RDA5991]]
 
* [[File:RDA5991.pdf|RDA5991]]
 
* [[File:RDA5995_DataSheet_v1.2.pdf]]
 
* [[File:RDA5995_DataSheet_v1.2.pdf]]
 
+
RDA5856
 +
* [[:File:RDA5856Q32_Datasheet_V0.03.pdf|RDA5856Q32 Datasheet V0.03]]
 +
TSSOP24
 +
* [[:File:RDA5856TE_C95544.pdf|RDA5856TE Datasheet]]
 +
* [[File:RDA5856TE_hardware_design_manual_V1.1.pdf|RDA5856TE_hardware_design_manual_V1.1]]
 +
* [[:File:RDA5856_MSOP_24_EVB_V1.4_20160527.pdf|RDA5856_MSOP_24_EVB_V1.4]]
 +
RDA Flash downloader
 +
* [[File:RDA_flashtest_tool.zip]]
 
Resources
 
Resources
 
* [[:File:UNO_91H.pdf|Arduino UNO 91H Board Introduction]] - On board RDA5981 + RDA5856QE32
 
* [[:File:UNO_91H.pdf|Arduino UNO 91H Board Introduction]] - On board RDA5981 + RDA5856QE32

Latest revision as of 12:35, 19 January 2018

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

Pin Definition

Pin Definition, GPIO mapping see below

Pins Name Description UNO Definition (or USB) SD
  • Ext. FLASH
  • SPI
  • PSRAM
! Extra
1 IO4 General IOs PB_4
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 PB_1
4 IO2 General IOs PB_2
5 IO3 General IOs PB_3 SD_D0
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 PB_8 GPADC-1
9 IO7/ADC PB_7 SD_D1 Ordinary GPIO, can also be configured as ADC
10 IO5 General IOs PB_5 SPI, FLASH: CS
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 PB_9 SD_CLK
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 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

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, 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
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

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

RDA5856 - Bluetooth

QE32 - QFN32, L / LE - QFN48, TE - TSSOP24 / MSOP24, T28E - TSSOP28

  • 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

RDA5856

TSSOP24

RDA Flash downloader

Resources