1. Overview
The CH591 is a sophisticated 32-bit RISC microcontroller designed for a wide range of applications requiring integrated wireless communication and peripheral control. It features a 2Mbps Bluetooth® Low Energy (BLE) 5.4 communication module, a full-speed USB device controller and transceiver, and a segment LCD driver module. Additionally, it incorporates essential peripherals such as SPI, two UARTs, and six ADCs, providing rich resources for embedded system development.
2. Specifications
2.1 Key Features
- Processor: Qingke RISC processor (WCH RISC-V4C) with RV32IMAC instruction set and self-expanding instructions.
- Interrupts: Fast programmable interrupt controller and hardware interrupt stack.
- Wireless Communication: Integrated 2.4GHz RF transceiver, baseband, and link control.
- Bluetooth: Complies with Bluetooth Low Energy 5.4 specifications, supporting 2Mbps and 1Mbps data rates.
- RF Performance: Receiving sensitivity -95dBm, programmable +4.5dBm transmission power.
- Protocol Stack: Optimized protocol stack and application layer API provided.
- Sensors: Built-in temperature sensor.
- Real-Time Clock (RTC): Built-in RTC supporting timing and trigger modes.
- USB: Integrated USB 2.0 full-speed transceiver, supporting full/low speed device mode.
- Analog-to-Digital Converter (ADC): 6 external analog signal channels and 2 internal signal channels.
- Display Driver: Segment LCD support for 64 dots (16*4) LCD panels.
- Peripherals: 2 UARTs, 10 PWM channels, and 1 SPI interface.
- GPIOs: 20 General Purpose Input/Output pins, with 4 supporting 5V signal input.
- Power Supply: Supports a minimum 1.7V power supply.
- Security: AES-128 encryption and decryption, unique chip ID.
2.2 Electrical Characteristics
The following table details the electrical characteristics of the CH591 microcontroller.
| Name | Parameter description | Min. | Max. | Unit |
|---|---|---|---|---|
| TA | Ambient temperature during operation | -40 | 85 | °C |
| TS | Ambient temperature during storage | -55 | 125 | °C |
| VDD33 | System supply voltage (VDD33 is connected to power, GND is connected to ground) | -0.4 | 4.2 | V |
| VIO33 | I/O supply voltage (VIO33 is connected to power, GND is connected to ground) | -0.4 | 4.2 | V |
| VIO | Voltage on input/output pins | -0.4 | VIO33+0.4 | V |
| VIO5 | Voltage on input/output pins that support 5V withstand voltage | -0.4 | 5.5 | V |
| VDCI | Voltage on VDCID/VDCIA pin (if external DC-DC is used) | -0.4 | VDD33+0.4 | V |
| VXCK | Voltage on PA10/PA11 after X32MI/X32MO/enabling LSE | -0.3 | 1.4 | V |
2.3 Package Information
The CH591 series is available in various packages, each with specific dimensions and lead configurations. Refer to the table and diagrams below for detailed package information.
| Package | Body size | Lead pitch | Description | Ordering Information |
|---|---|---|---|---|
| QFN28 | 4*4mm | 0.4mm | Quad no-lead 28-pin | CH591F |
| QFN20 | 3*3mm | 0.4mm | Quad no-lead 20-pin | CH591D |
| TSSOP16 | 4.4*5.0mm | 0.65mm | Thin shrink small outline 16-pin | CH591R |
2.4 Model Comparison
The CH591 series offers different variants (CH591F, CH591D, CH591R) with varying features and package types. The table below provides a comparison of their key specifications.
| Part No. | CodeFlash +BootLoader +DataFlash | RAM | Timer | Capture | PWM | UART | SPI | BLE | ADC and TS | USB host | USB device | Min. supply voltage | Segment LCD | I/O | Package |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| CH591F | 192+24+32K | 24+2K | 4 | 4 | 4+6 | 2 | √ | 8+1 | - | - | 2.3V | 16*4 | 20 | QFN28 | |
| CH591D | 192+24+32K | 24+2K | 3 | 3 | 3+4 | 2 | √ | 4+1 | - | √ | 2.3V | - | 12 | QFN20 | |
| CH591R | 192+24+32K | 24+2K | 4 | 4 | 4+3 | 2 | √ | 4+1 | - | - | 2.3V | - | 10 | TSSOP16 |
3. Pinout and Diagrams
3.1 CH591 Block Diagram
The internal architecture of the CH591 microcontroller is illustrated in the block diagram below, showing the interconnection of its core components and peripherals.
3.2 Chip Photos and Pinout Diagrams
Visual references for the CH591 chip variants and their respective pinout diagrams are provided below to aid in physical identification and connection planning.
3.3 Application Schematics
The following diagrams provide examples of typical application circuits for the CH591, including power supply, USB Type-C interface, and general connections for various peripherals. This image also contains a pinout diagram for the CH591R variant. These schematics serve as a guide for integrating the CH591 into your designs.
4. Setup and Connections
This section provides general guidelines for setting up the CH591 microcontroller in a development environment. Specific connections will depend on your application and the chosen CH591 variant.
4.1 Power Supply
- Connect the VDD33 pin to a stable power supply within the specified voltage range (refer to Electrical Characteristics).
- Ensure proper grounding by connecting all GND pins to the system ground.
- Utilize decoupling capacitors near the power pins to ensure stable operation, as shown in the application schematics (Figure 13).
4.2 Clock Source
- For external crystal oscillators, connect them to the X32MI and X32MO pins as per the datasheet recommendations.
- Ensure appropriate load capacitors are used for stable oscillation.
4.3 USB Interface (for CH591D)
- Connect the USB D+ and D- lines to the corresponding pins on the CH591D.
- Refer to the USB Type-C schematic in Figure 13 for example connections, including any necessary external components for USB functionality.
4.4 Peripheral Connections
- Connect external devices (e.g., sensors, displays, other microcontrollers) to the appropriate GPIO, UART, SPI, or ADC pins as required by your application.
- Pay close attention to voltage levels, especially when interfacing with 5V components, utilizing the 5V tolerant GPIOs where applicable.
- For Segment LCD applications (CH591F), connect the LCD panel segments to the designated LCD driver pins.
5. Operating Principles
The CH591 microcontroller operates based on firmware programmed onto its internal flash memory. Development typically involves writing code using a compatible IDE and toolchain, then flashing the compiled binary to the device.
5.1 Firmware Development
- Utilize the WCH-provided SDK and development tools for writing and compiling your application code.
- The RISC-V architecture allows for flexible programming, often using C/C++.
- Refer to the official documentation (datasheet and EVT) for detailed programming guides and examples.
5.2 Flashing and Debugging
- The CH591 typically supports in-circuit programming via a dedicated programmer or through its USB interface (for variants with USB device support).
- Debugging can be performed using standard JTAG/SWD interfaces or through serial communication, depending on the development board and tools.
5.3 BLE Communication
- The integrated BLE 5.4 module can be configured for various roles (e.g., Central, Peripheral, Broadcaster, Observer).
- Use the provided BLE protocol stack and APIs to implement wireless communication functionalities in your application.
6. Maintenance and Care
To ensure the longevity and reliable operation of your CH591 microcontroller, follow these general maintenance and care guidelines:
- Handling: Always handle the microcontroller with anti-static precautions (e.g., anti-static wrist strap, mat) to prevent electrostatic discharge (ESD) damage.
- Storage: Store unused chips in their original anti-static packaging in a dry, temperature-controlled environment.
- Cleaning: If necessary, clean the chip surface with a soft, dry brush or lint-free cloth. Avoid using harsh chemicals or abrasive materials.
- Environmental Conditions: Operate the CH591 within the specified ambient temperature and humidity ranges to prevent performance degradation or damage.
- Power Supply: Ensure a stable and clean power supply. Voltage fluctuations or over-voltage can permanently damage the device.
- Soldering: Follow proper soldering techniques to avoid thermal stress or short circuits. Refer to industry standards for soldering small-pitch components.
7. Troubleshooting
This section provides general troubleshooting tips for common issues encountered when working with microcontrollers like the CH591. For specific issues, consult the datasheet and development community resources.
7.1 Power-Related Issues
- No Power/Device Not Responding:
- Verify power supply voltage is within the VDD33 specification.
- Check all power and ground connections for continuity and correct polarity.
- Ensure decoupling capacitors are correctly placed and functional.
7.2 Programming/Flashing Issues
- Programming Fails:
- Confirm the programmer is correctly connected to the device's programming pins.
- Ensure the correct device model is selected in the programming software.
- Check for driver issues with the programmer or USB interface.
- Verify the power supply is stable during the programming process.
7.3 Peripheral Malfunction
- I/O Pins Not Responding:
- Check pin configurations in your firmware (input/output, pull-up/down).
- Verify physical connections to external components.
- Ensure the I/O voltage (VIO33) is correctly supplied.
- BLE Communication Errors:
- Check antenna connections and impedance matching.
- Verify BLE stack initialization and configuration in firmware.
- Ensure no interference from other 2.4GHz devices.
- USB Not Enumerating (CH591D):
- Check D+ and D- line connections and any external components in the USB circuit.
- Verify USB initialization code in firmware.
- Test with different USB cables and host ports.
8. Warranty and Support
For detailed technical support, documentation, and development resources, please refer to the official WCH website and the specific product documentation for the CH591 series.
8.1 Official Documentation
- Datasheet: Provides comprehensive technical specifications, electrical characteristics, and pin descriptions.
https://www.wch-ic.com/downloads/CH592DS1_PDF.html - EVT (Evaluation Tool/Development Kit): Contains development resources, example code, and tools for working with the CH591.
https://www.wch.cn/downloads/file/442.html?time=2024-10-17%2013:49:18&code=138OlXAkvjFb2r9wwJ1zILZ7fhBXFXXgmmWaIrKU
8.2 Manufacturer Website
For additional resources, software downloads, and community forums, visit the WCH official website:
Official Website: https://www.wch-ic.com Source · https://manuals.plus/ae/1005007922845812