Welcome to AB32VG1_Datasheet’s documentation!¶
Introduction¶
This document provides information on AB32VG1 microcontrollers, such as description, function overview, pin assignment, and definition, electrical characteristics and packaging.
Description¶
AB32VG1 devices are based on the 32-bit RISC-V core operating at up to 120MHz. AB32VG1 devices incorporate high-speed embedded memories with Flash memory of up to 1Mbyte, up to 192Kbytes of RAM.
- Peripheral and Interfaces
Three 32-bit timers;
Three multi-function 32-bit timers, support Capture and PWM mode;
WatchDog;
Three full-duplex UART;
Two SPI;
IR controller;
SD Card Host controller;
SPDIF receiver;
Audio interface IIS;
Full speed USB 2.0 HOST/DEVICE controller;
Sixteen Channels 10-bit SARADC;
Integrate IRTC;
Build in PMU, such as charger/buck/LDO;
- Temperature
Operating temperature: -40℃ to +85℃;
Storage temperature: -65℃ to +150℃;
Memories¶
Embedded Flash memory¶
The AB32VG1 devices embed up to 1Mbyte of Flash memory that can be used for storing programs and data.
Embedded SRAM¶
SRAM0-SRAM3(0x10000-0x30000): 128Kbytes
AECRAM, DECRAM, ENCRAM(0x50000-0x57a00): 30Kbytes
ICRAM(0x60000-0x68000): 32Kbytes
Reset and clock controller¶
Clock management¶
The devices receives the following clock source inputs:
- Internal oscillator
2MHz RC oscillator
- External oscillator
clock: 26MHz(generated form a crystal/ceramic resonator)
System reset sources¶
The product contains multiple reset sources,which include:
POR reset
MCLR reset
WKP 10S reset
LVD reset
UART0 key match reset
UART1 key match reset
UART2 key match reset
Wakeup software shut down reset
VUSB insert reset
WDT reset
The first three reset source will reset all chip except the part which in RTC, and the other reset sources will reset all chip except the part which in RTC or some register in CORE.
General purpose inputs/outputs(GPIOs)¶
Each of the GPIO pins can be configured by software as output (with pull-up or pull-down), as input (with pull-up or pull-down) or as peripheral alternate function. Most of the GPIO pins are shared with digital or analog alternate functions. All GPIOs are high-current-capable and have speed selection to better manage internal noise, power consumption. In general, it has the following features:
Control GPIO input/output direction by using direction register
Internal pull-up/pull-down resistor by using pull-up/pull-down resistor control register
Select suitable output driving current capability
Audio decode¶
The audio decoding characteristics of the system are as follows:
Support MPEG1/2/2.5 decode
Support SBC decode
MPEG-1 decode:
Support MPEG1/2/2.5 Layer III decode (Layer I,II coming later)
Support bit rate from 8K to 448K Kbit/s
Support sample frequency 8/11.025/12/16/22.5/24/32/44.1/48 KHz
Support working at system clock or diver n
SBC decode:
Support band 4/8
Support block 4/8/12/16
infrared-receiver(IR)¶
Infrared receiver is a device that can receive infrared signal and can independently complete the output from infrared signal compatible with TTL level signal. The infrared receiver(IR) features of the product are as follows:
Set IR RX bit select
Enable IR RX
Wait for pending or interrupt
Read IRRXDAT or detect RPTPND
Linear feedback shift register and cyclic redundant check(LFSR and CRC)¶
The Linear Feedback Shift Register (LFSR) is the linear function of the output, given the output of the previous state, used as the displacement register of the input.The xor operation is the most common single-bit linear function: the xor operation is performed on some bits of the register as input, followed by the whole shift of each bit in the register.
Cyclic Redundancy check (CRC) is a data transfer error check function that performs polynomial calculations on the data and attach the results to the frame. The receiving device performs a similar algorithm to ensure the correctness and integrity of the data transfer.If the CRC fails to pass, the system repeatedly copies the data to the hard disk, falling into an infinite loop, resulting in the replication process cannot be completed.
The features of the linear feedback shift register and cyclic redundancy check are as follows:
Support LFSR32: X32+X30+X26+X25
Support CRC16: X16+X12+X5+1
CRC16:
Select which data source
Write CRCDAT to calculate CRC16
Finish, can read CRCRES
LFSR32:
Select which data source
Write LFCRCCON bit8 to trigger LFSR
Finish, can read LFSRRES
Low power mode¶
The product supports two low-power modes to achieve the best compromise between low-power consumption, short startup time and available wakeup sources:
sleep mode¶
Sleep mode will auto gate system clock, close memory access, close RC2M, but some asynchronous clock should be disable by software
Sleep mode wake up source as follow. After wakeup, software run continue or enter interrupt if enable:
BT wakeup
port external interrupt wakeup
RTC 1s or alarm wakeup
SPDIF online wakeup
IR receive data or repeat press wakeup
sniff mode¶
Sniff mode will auto gate system clock, close memory access, close RC2M, but some asynchronous clock should be disable by software. Sniff also change VDDIO/VDDCORE voltage by LPMCON
Sniff mode wake up source as follow. After wakeup, software run continues or enter interrupt if enable:
BT wakeup
Port external interrupt wakeup
RTC 1s or alarm wakeup
SPDIF online wakeup
IR receive data or repeat press wakeup
Pulse width modulation(PWM)¶
Four channel PWM for Breathing-lamp
Real time clock(RTC)¶
The real-time clock (RTC) is an independent BCD timer/counter. Dedicated registers contain the second, minute, hour (in 12/24 hour), week day, date, month, year, in BCD (binary- coded decimal) format. Correction for 28, 29 (leap year), 30, and 31 day of the month are performed automatically. The RTC provides a programmable alarm and programmable periodic interrupts with wakeup from Stop and Standby modes. The sub-seconds value is also available in binary format.
It is clocked by a 32.768 kHz external crystal, resonator or oscillator, the internal low-power RC oscillator or the high-speed external clock divided by 128. The internal low-speed RC has a typical frequency of 32 kHz. The RTC can be calibrated using an external 512 Hz output to compensate for any natural quartz deviation.
The system’s features:
Support 32bit Independent power supply real time counter.
Support alarm interrupt and second interrupt.
Secure digital memory control(SD_CTL)¶
The system’s SD card host controller can support SD/MMC card devices.
SD memory Card Spec (Ver2.0) / MMC Spec (Ver4.3) compatible.
CRC7 and CRC16 Generator.
Support Interrupt and DMA Data transfer mode.
Support 1-bit or 4-bit data bus width.
Support up to 50MHz in data transfer mode for SD.
Support up to 50MHz in data transfer mode for MMC.
Serial peripheral interface(SPI)¶
SPI can support different mode
general 3 wire mode, 1-bit clock in/out, 1-bit data output, 1-bit data input.
2 wire mode, 1-bit clock in/out, 1-bit data output or input.
2 data bus mode, 1-bit clock in/out, 2-bit data output or input.
SPI Normal 1bit-Mode Operation Flow:
Set 3-wire mode or 2-wire mode and select the pin map.
Select RXSEL for Transmit or receive.
Configure clock frequency .
Select one of the four timing mode.
Enable SPI module by setting SPIEN ‘1’.
Set SPIIE ‘1’ if needed.
Write data to SPIBUF to kick-start the process.
Wait for SPIPND to change to ‘1’, or wait for interrupt.
Read received data from SPIBUF if needed.
Go to Step 8 to start another process if needed or turn off SPI1by clearing SPIIE and SPIEN.
SPI Normal multi-bit-Mode Operation Flow:
Set data bus width(bus 2) and select the pin map.
Select RXSEL for Transmit or receive.
Configure clock frequency .
Select one of the four timing mode.
Enable SPI module by setting SPIEN ‘1’.
Set SPIIE ‘1’ if needed.
Write data to SPIBUF to kick-start the process.
If data bus width are 2 bit, write SPIBUF twice kick-start the transmission.
However, when receive data, only need write once to kick-start receive process.
Wait for SPIPND to change to ‘1’, or wait for interrupt.
Read received data from SPIBUF if needed.
Go to Step 8 to start another process if needed or turn off SPI by clearing SPIIE and SPIEN.
SPI DMA Mode Operation Flow:
Set IO in the correct direction and data width mode.
Select RXSEL for DMA direction.
Configure clock frequency .
Select one of the four timing modes.
Enable SPI module by setting SPIEN to ‘1’.
Set SPIIE ‘1’ if needed.
configure SPI1DMAADR.
Write data to SPI1_DMACNT to kick-start a DMA process.
Wait for SPIPND to change to ‘1’, or wait for interrupt.
Go to Step 8 to start another DMA process if needed or turn off SPI1 by clearing SPI1EN.
Timers¶
Timer0/1/2, only support 32bit timer function.
Timer3/4/5, can be configured to Timer-mode, Counter-mode, Capture-mode and PWM-mode.
Universal asynchronous receiver transmitter(UART)¶
It features:
UART is a serial port capable of asynchronous transmission.
The UART can function in full duplex mode.
Universal seria bus full speed(USB FS)¶
USB FS support 4 Endpoints (Endpoint 0, 1, 2, 3).Support Endpoint 0, Endpoint 1 and Endpoint 2 and Endpoint 3 supports both TX and RX transaction:
EP0: RX/TX share 64 bytes
EP1: RX is 64 bytes; TX is 64 bytes
EP2: RX is 256 bytes; TX is 256 bytes
EP3: RX is 1023 bytes; TX is 1023 bytes
Watchdog timer(WDT)¶
The independent watchdog is based on a 12-bit downcounter and 8-bit prescaler. It is clocked from an independent 32 kHz internal RC and as it operates independently from the main clock, it can operate in Stop and Standby modes. It can be used either as a watchdog to reset the device when a problem occurs, or as a free-running timer for application timeout management. It is hardware- or software-configurable through the option bytes.
User guide:
configure WDT reset or interrupt
Select WDT time out
Clear WDT
Pinouts and pin description¶

Parameter conditions¶
Package information¶

SYMBOL |
MILLIMETER |
||
---|---|---|---|
MIN |
NOM |
MAX |
|
A |
~ |
~ |
1.60 |
A1 |
0.05 |
~ |
0.15 |
A2 |
1.35 |
1.40 |
1.45 |
A3 |
0.59 |
0.64 |
0.69 |
b |
0.18 |
~ |
0.26 |
b1 |
0.17 |
0x20 |
0.23 |
c |
0.13 |
~ |
0.17 |
c1 |
0.12 |
0.13 |
0.14 |
D |
8.80 |
9.00 |
9.20 |
D1 |
6.90 |
7.00 |
7.10 |
E |
8.80 |
9.00 |
9.20 |
E1 |
6.90 |
7.00 |
7.10 |
eB |
8.10 |
~ |
8.25 |
e |
0.50BSC |
||
L |
0.40 |
~ |
0.65 |
L1 |
1.00REF |
||
θ |
0 |
~ |
\(7^o\) |