Developing a Debug Board on the K1921VG015 Microcontroller
A detailed walkthrough of designing a four-layer debug board for the Russian RISC-V microcontroller K1921VG015, covering JTAG, ADC, I2C peripherals, NFC, CAN, UART, SPI interfaces, and lessons learned from the layout process.
Introduction
This article describes the development of a debug board for the K1921VG015 microcontroller, a 32-bit chip based on the RISC-V architecture. According to its documentation, this microcontroller is "designed for industrial and consumer applications" including monitoring systems and automation. The goal was to create a comprehensive evaluation platform that exposes all the chip's peripherals for testing and development.
Programming and Debug Interface
The board uses JTAG for in-circuit programming and debugging. It's compatible with the Olimex ARM-USB-OCD-H and J-Link adapters. Two physical buttons are provided: Reset for resetting the board and SERVEN for entering service mode, which is needed for initial firmware flashing.
Indicators and Audio
Six LEDs are installed on the board: two for power indication (3.3V and 5V rails) and three connected to GPIO ports (GPIOB13, GPIOB14, GPIOB15) for user-programmable status indication. A buzzer connected to GPIOC14 provides audio notification capability for alarms or user feedback.
ADC and Analog Inputs
The board utilizes several ADC channels for different measurement purposes:
- ADC_CH6: Connected to a photodiode for ambient light measurement
- ADC_CH7: Connected to a sigma-delta ADC with a MAX4466EXK+T microphone preamplifier for audio signal capture
- ADC_CH10: Internal temperature sensor built into the microcontroller
The remaining ADC channels (ADC_CH0 through ADC_CH5) are routed to expansion connectors for external use. It's worth noting that ADC_CH0 through ADC_CH7 are placed in a dedicated block without remapping capability, which constrains the board layout somewhat.
I2C Peripherals
The single I2C bus connects four devices:
- LM75AD — a digital temperature sensor for environmental monitoring
- AT24HC16 — EEPROM for non-volatile data storage
- TPA626-VR-S — current and voltage monitor for power rail diagnostics
- PN7150B0HN — NFC reader for contactless communication
The fact that there is only one I2C interface turned out to be a significant limitation. With four devices sharing a single bus, bandwidth and addressing become concerns. The author specifically noted: "We really miss having a second I2C interface."
NFC Reader
The NFC functionality uses the PN7150B0HN chip. An unconventional trapezoidal antenna was designed directly on the PCB to keep costs down and simplify assembly. However, provisions for connecting an external antenna were also included, allowing the use of larger or application-specific antennas when the on-board one is insufficient.
UART Interfaces
The microcontroller has five UART ports, utilized as follows:
- UART0: Connected to a CP2105-F01-GMR USB-to-UART bridge for PC communication
- UART1: Routed to an expansion connector
- UART2: Connected to an RS-485 transceiver
- UART3: Connected to a second RS-485 transceiver
- UART4: Routed to an expansion connector
The two RS-485 interfaces enable industrial communication in noisy environments with long cable runs. An interesting documentation quirk: the manufacturer uses the terminology "RX/TX instead of the more common MISO/MOSI" for SPI documentation, which caused some initial confusion during development.
CAN Interfaces
Two independent CAN bus interfaces are available:
- CAN0: On GPIOB8/GPIOB9
- CAN1: On GPIOB10/GPIOB11
Both use TJA1040T transceivers for the physical layer. CAN is essential for automotive and industrial applications, and having two independent buses allows for redundancy or bridging between separate CAN networks.
SPI and QSPI Interfaces
The microcontroller provides two SPI buses and one QSPI interface:
- QSPI-Flash: Connected to a MX66L51235FZ2I-10G flash memory chip in an 8-WSON package, providing high-speed external storage
- SPI1: Routed to an expansion connector for external devices
- SPI2: Connected to a microSD card slot for removable storage
USB Connectivity
A USB Type-C connector serves double duty: it provides USB 2.0 Full-Speed Device connectivity and can power the entire board. This simplifies the development setup — a single USB cable to a laptop provides both communication and power.
Additional Features
TAMPER Inputs: Three tamper-detection inputs are provided for enclosure intrusion detection. DIP switches are included on the board to simulate tamper events during development without needing physical enclosure sensors.
WAKEUP Buttons: Three buttons allow testing of different low-power wakeup modes — standby, stop, and sleep. These are critical for battery-powered applications where the microcontroller needs to minimize power consumption between events.
RTC Battery: A CR1220 coin cell in an S8411-45R holder maintains the real-time clock when main power is removed.
Voltage Reference: A precision RS3112-2.5XSF3 voltage reference provides a stable 2.5V for ADC calibration, labeled as AREF on the board.
Shield Connector: An expansion header allows connecting additional modules such as cameras or Ethernet adapters, extending the board's capabilities beyond what's built in.
PCB Design
The board was designed as a four-layer PCB: two internal layers dedicated to ground and power planes, with the two outer layers carrying signal traces. The microcontroller comes in a 100-pin LQFP100 package.
"The first thing worth noting from a routing perspective is the pin ordering on the chip." The manufacturer organized the GPIO ports in a logical, sequential manner around the package, which significantly simplified trace routing compared to some other microcontrollers where pin assignments seem almost random.
Criticisms and Missing Features
Despite the generally positive experience, the author identified several limitations of the K1921VG015:
- No second I2C interface — a significant limitation for complex designs
- No Ethernet MAC — requires external PHY and MAC for network connectivity
- No SDIO interface — microSD must use slower SPI mode
- No SAI (Serial Audio Interface) — limits audio applications
- Documentation available only in Russian — a barrier for international adoption
Conclusion
The K1921VG015 is a capable RISC-V microcontroller with well-organized pin assignments that make PCB design straightforward. However, the missing interfaces (second I2C, Ethernet, SDIO, SAI) limit its applicability in more complex designs. The source files for this debug board will be published on GitHub after full testing is completed.
FAQ
What is this article about in one sentence?
This article explains the core idea in practical terms and focuses on what you can apply in real work.
Who is this article for?
It is written for engineers, technical leaders, and curious readers who want a clear, implementation-focused explanation.
What should I read next?
Use the related articles below to continue with closely connected topics and concrete examples.