Renesas R5F21387CNFP#30
- Part No.:
- R5F21387CNFP#30
- Manufacturer:
- Renesas
- Category:
- Microcontrollers
- Package:
- 80-LQFP
- Datasheet:
-
R5F21387CNFP#30.pdf
- Description:
- IC MCU 16BIT 48KB FLASH 80LQFP
- Quantity:
- Payment:

- Shipping:

Inventory:2,866
Please send an inquiry. Send us your inquiry, and we will respond immediately.
Product details
Overview
R5F21387CNFP#30 from Renesas is a 16-bit R8C CPU core microcontroller with 48 KB program flash, 4 KB data flash (BGO-capable), and 4 KB RAM, operating at up to 20 MHz (50 ns min instruction time) across 1.8–5.5 V supply. It integrates UART0/1/2 (with I²C mode), LIN hardware module, 10-bit 20-channel ADC, dual 8-bit DACs, six timer units (RA–RG), DTC, and voltage detection for embedded control in consumer and industrial systems.
For engineers reviewing the R5F21387CNFP#30 datasheet, R5F21387CNFP#30 pinout, R5F21387CNFP#30 application, or R5F21387CNFP#30 equivalent, key selection criteria include its 80-pin LQFP package, −20°C to +85°C N-version temperature grade, background operation data flash, real-time clock (Timer RE), and hardware LIN support via UART0 and Timer RA.
Technical Context
The R5F21387CNFP#30 implements the R8C CPU core with 89 fundamental instructions, 16×16→32-bit multiplier, and multiply-accumulate capability. Its memory map spans 1 Mbyte, with fixed interrupt vector table at 0FFDCh–0FFFFh and data flash blocks A–D mapped to 03000h–03FFFh.
Peripheral integration includes three UART channels (UART2 supporting I²C bus mode), dedicated LIN hardware using UART0 and Timer RA, Timer RD with complementary PWM for three-phase motor control, and DTC with 39 activation sources enabling autonomous data transfers without CPU intervention.
Key Specifications
| Parameter | Value and Actual Design Meaning |
|---|---|
| CPU Core | R8C 16-bit core with 89 instructions, 16×16→32-bit multiplier, and MAC unit |
| Flash Memory | 48 KB program ROM + 4 KB data flash (1 KB × 4 blocks) with background operation (BGO) |
| RAM | 4 KB on-chip RAM used for data storage and stack operations |
| Operating Voltage | 1.8–5.5 V supply range supports battery-powered and wide-input industrial designs |
| Max Clock Frequency | 20 MHz (50 ns min instruction time at VCC = 2.7–5.5 V) |
| ADC/DAC | 10-bit resolution × 20 channels with sample-and-hold; dual 8-bit DAC outputs (DA0, DA1) |
| Timers | Timer RA (8-bit), RB (8-bit), RC (16-bit, 4 registers), RD (16-bit × 2, 4 registers each), RE (real-time clock), RF (16-bit), RG (16-bit, 2 registers) |
Pinout & Package
Package: 80-pin LQFP (PLQP0080KB-A, previous code 80P6Q-A), 12 mm × 12 mm body, 0.5 mm pitch.
| Pin/Terminal | Circuit Role | Design Meaning |
|---|---|---|
| P0_0–P0_7 | Analog input / digital I/O / DA1/DA0 | AN0–AN7, DA1, DA0, TRCIOA/TRCTRG - support ADC sampling, DAC output, and timer trigger routing |
| P1_0–P1_7 | Analog input / key interrupt / serial I/O | AN8–AN11, KI0–KI3, TXD0/RXD0, CLK0 - enable touch-key interfaces and primary UART0 communication |
| P2_0–P2_7 | Timer RD I/O / TRDIOx / TRDCLK | Eight dedicated pins for Timer RD's dual 16-bit channels, supporting complementary PWM and encoder phase counting |
| P4_2 | Analog reference input | VREF pin - provides external reference voltage for ADC precision calibration |
| XIN/XOUT | High-speed crystal oscillator interface | Supports 20 MHz crystal for main system clock; XOUT can accept external clock input if XIN is left open |
| XCIN/XCOUT | 32 kHz real-time clock oscillator | Connects to 32.768 kHz crystal for Timer RE real-time clock and low-power stop-mode timing |
| RESET | Active-low reset input | Hardware reset assertion resets CPU, peripherals, and registers; debounced externally or via internal voltage detector |
| MODE | Boot mode configuration | Connected to VCC via resistor to select single-chip mode; required for normal flash execution |
Key Features
| Feature | Design Value |
|---|---|
| Background Operation Data Flash | Enables firmware updates or parameter logging while application code executes - no CPU stall during flash write/erase |
| Hardware LIN Module | Combines UART0 and Timer RA to implement LIN 2.0/2.1 physical layer and protocol timing without software overhead |
| Real-Time Clock (Timer RE) | 8-bit timer with calendar mode (seconds/minutes/hours/days-of-week) driven by XCIN 32 kHz oscillator for battery-backed timekeeping |
| Dual 8-bit DAC Outputs | DA0 and DA1 provide analog voltage generation for sensor biasing, audio tone generation, or closed-loop control references |
| 10-bit 20-Channel ADC with Sweep Mode | Simultaneous scanning of up to 20 analog inputs with automatic channel sequencing and trigger synchronization |
| Low-Power Stop Mode (2.0 µA) | Halts CPU and most peripherals while retaining RAM content and wake-up capability via INT0–INT4 or key inputs |
Applications
| Home Appliance Control | Office Equipment Motor Drive |
|---|---|
Use Scenario: Microcontroller in washing machine main board managing water valve, motor phase control, and user interface. IC Role / Device Role / Timing Role: R5F21387CNFP#30 serves as central controller executing motor commutation logic via Timer RD complementary PWM, reading hall sensors via ADC, and handling keypad interrupts. Use Value: Integrated LIN module enables communication with door lock or display modules; BGO data flash stores cycle count and error logs without halting wash cycles. | Use Scenario: Embedded controller in multifunction printer managing paper feed stepper motor and toner density feedback. IC Role / Device Role / Timing Role: R5F21387CNFP#30 runs closed-loop motor control using Timer RB programmable waveform generation and reads optical encoder signals via Timer RG phase counting mode. Use Value: Dual 8-bit DACs generate precise bias voltages for laser diode current control; 20-channel ADC monitors multiple thermal and current sensors simultaneously. |
| Audio System Front-End | Consumer IoT Sensor Hub |
Use Scenario: Signal processor in portable speaker handling volume control, EQ, and Bluetooth audio packet parsing. IC Role / Device Role / Timing Role: R5F21387CNFP#30 decodes UART2 I²C-mode commands from host MCU, adjusts DAC output levels, and monitors battery voltage via ADC channel AN0. Use Value: Hardware UART2 I²C mode eliminates bit-banged software I²C overhead; 48 KB flash accommodates firmware with multiple audio profiles and OTA update routines. | Use Scenario: Central node in smart home sensor network aggregating temperature, humidity, and motion data before wireless transmission. IC Role / Device Role / Timing Role: R5F21387CNFP#30 samples environmental sensors via 10-bit ADC sweep mode, timestamps readings using Timer RE real-time clock, and transmits via UART1 to ESP32 host. Use Value: 2.0 µA stop mode extends battery life over months; data flash stores calibration offsets per sensor without requiring external EEPROM. |
Equivalent & Alternatives
The following parts are listed as comparable options for similar microcontroller applications.
| Alternative Part | Technical Difference | Application Difference | Selection Advice |
|---|---|---|---|
| R5F21388CNFP | 64 KB program ROM, 6 KB data flash, same 80-pin LQFP package and peripheral set | Higher firmware capacity for complex protocols or larger UI assets; identical pinout and clock/peripheral behavior | Select when firmware size exceeds 48 KB or long-term field calibration data storage >4 KB is required |
| R5F21387CDFP | Same memory and peripherals, but −40°C to +85°C extended temperature grade (D version) | Required for automotive cabin modules or outdoor industrial enclosures where ambient exceeds 85°C | Choose for deployments outside commercial temperature range; otherwise R5F21387CNFP#30 suffices |
Compared with R5F21388CNFP, the R5F21387CNFP#30 offers optimal cost/performance balance for mid-complexity applications; versus R5F21387CDFP, it trades extended temperature tolerance for lower unit cost in controlled environments.
Availability
R5F21387CNFP#30 is available at Aetrix Electronics and suitable for home appliance control, office equipment motor drive, audio system front-end, and consumer IoT sensor hub applications requiring stable component supply, long-term lifecycle support, and consistent parametric performance.
Supply support for R5F21387CNFP#30 includes scheduled delivery planning, volume procurement assistance, BOM continuity management, traceable sourcing, and lifecycle availability coordination for OEM customers, industrial embedded developers, connected-device designers, and electronics production programs.
Manufacturer
Renesas Electronics Corporation is a global semiconductor manufacturer specializing in microcontrollers, analog, power, and SoC solutions for automotive, industrial, and consumer markets.
The R8C/38C Group, including R5F21387CNFP#30, was designed for cost-sensitive, low-to-mid complexity embedded control applications demanding high EMI/EMS immunity, integrated analog peripherals, and robust flash reliability in consumer and industrial equipment.
FAQ
What is the maximum operating frequency and corresponding instruction execution time for the R5F21387CNFP#30?
The R5F21387CNFP#30 operates at up to 20 MHz with a minimum instruction execution time of 50 ns when VCC is 2.7–5.5 V. At lower frequencies such as 5 MHz (VCC = 1.8–5.5 V), the minimum instruction time is 200 ns. These values are measured under specified voltage and temperature conditions and reflect the R8C CPU core's deterministic timing behavior.
Does the R5F21387CNFP#30 support hardware LIN communication, and how is it implemented?
Yes, the R5F21387CNFP#30 includes a dedicated hardware LIN module that combines UART0 and Timer RA to meet LIN 2.0/2.1 physical layer requirements. This implementation handles baud rate generation, sync field detection, and checksum calculation in hardware, reducing CPU load and ensuring timing compliance without software bit-banging.
How does the background operation (BGO) function work in the R5F21387CNFP#30 data flash?
The R5F21387CNFP#30 supports background operation (BGO) on its 4 KB data flash (1 KB × 4 blocks), allowing program execution to continue uninterrupted while flash erase or write operations occur. BGO is enabled via dedicated SFR bits and requires proper interrupt masking and status polling - no CPU stall occurs, enabling real-time logging or firmware patching.
What are the key low-power modes supported by the R5F21387CNFP#30, and what is the typical current consumption in each?
The R5F21387CNFP#30 supports wait mode (4.0 µA at 3.0 V, f(XCIN) = 32 kHz) and stop mode (2.0 µA at 3.0 V). In stop mode, the CPU, most peripherals, and high-speed clocks halt while RAM and certain wake-up sources (INT0–INT4, key inputs) remain active. Wait mode retains more peripheral clocks and offers faster wake-up latency.
Can the R5F21387CNFP#30 operate with an external 32.768 kHz crystal for real-time clock functionality, and which pins are used?
Yes, the R5F21387CNFP#30 uses the XCIN and XCOUT pins (P4_3 and P4_4) to connect a 32.768 kHz crystal for Timer RE real-time clock operation. This low-frequency oscillator drives the 8-bit Timer RE in calendar mode (seconds/minutes/hours/days-of-week) and remains active in stop mode, enabling accurate timekeeping with minimal power draw.
R5F21387CNFP#30 Specifications
- Product attributes
- Attribute value
- Manufacturer:
- Renesas
- Package/Case:
- 80-LQFP
- Series:
- R8C/3x/38C
- Packaging:
- Tray
- Product Status:
- Active
- Programmable:
- Not Verified
- Core Processor:
- R8C
- Core Size:
- 16-Bit
- Speed:
- 20MHz
- Connectivity:
- I2C, LINbus, SIO, SSU, UART/USART
- Peripherals:
- POR, PWM, Voltage Detect, WDT
- Number of I/O:
- 75
- Program Memory Size:
- 48KB (48K x 8)
- Program Memory Type:
- FLASH
- EEPROM Size:
- 4K x 8
- RAM Size:
- 4K x 8
- Voltage - Supply (Vcc/Vdd):
- 1.8V ~ 5.5V
- Data Converters:
- A/D 20x10b; D/A 2x8b
- Oscillator Type:
- Internal
- Operating Temperature:
- -20°C ~ 85°C (TA)
- Grade:
- -
- Qualification:
- -
- Mounting Type:
- Surface Mount
- Supplier Device Package:
R5F21387CNFP#30 FAQ
1.How can I place an order for R5F21387CNFP#30 through Aetrix?
Please submit a Request for Quotation (RFQ) for R5F21387CNFP#30 on Aetrix. Our sales agent will provide a competitive quotation and guide you through the order confirmation once you accept the terms.
2.Are the price and stock information for R5F21387CNFP#30 reliable?
The price and inventory of R5F21387CNFP#30 are updated periodically and may fluctuate due to market conditions. Stock and pricing data are typically refreshed every 24 hours. Quotation validity for R5F21387CNFP#30 is usually 5 days.
3.What payment methods are accepted for R5F21387CNFP#30?
We accept Wire Transfer, PayPal, Credit Card, Western Union, MoneyGram, and Escrow for R5F21387CNFP#30 transactions.
Note: Certain payment methods may incur a processing fee.
4.How is shipping managed for R5F21387CNFP#30?
R5F21387CNFP#30 orders can be shipped via leading logistics carriers, including DHL, UPS, FedEx, TNT, or Registered Mail.
Once your R5F21387CNFP#30 order is processed, you will receive an email with the shipment details and tracking number.
Note: Tracking information may take up to 24 hours to appear. Express delivery typically takes 3–5 business days.
5.How can I obtain technical support or documentation for R5F21387CNFP#30?
For technical support, including R5F21387CNFP#30 datasheets, pinout diagrams, or application guidance, please contact our engineering support team. They can provide detailed documentation and assistance for your R5F21387CNFP#30 requirements.
6.How does Aetrix verify that R5F21387CNFP#30 is sourced from the original manufacturer or authorized distributors?
All R5F21387CNFP#30 products on Aetrix are procured from qualified distributors and authorized channels. Our dedicated quality assurance team conducts strict verification, including traceability checks and, if necessary, third-party testing. This ensures that R5F21387CNFP#30 meets industry standards.
7.What is the process for return or replacement of R5F21387CNFP#30?
All R5F21387CNFP#30 units undergo pre-shipment inspection (PSI). If there is an issue with R5F21387CNFP#30, returns or replacements are accepted under the following conditions:
1.Quantity discrepancies, incorrect items, or visible external defects (such as breakage or corrosion), acknowledged by Aetrix.
2.The issue is reported within 90 days of delivery.
3.The R5F21387CNFP#30 part is unused and in its original packaging.
Return procedure for R5F21387CNFP#30:
1.Submit a request within 90 days.
2.Obtain a Return Material Authorization (RMA) from Aetrix.
R5F21387CNFP#30 Tags

-
ATTINY4-TSHR
Microchip Technology

-
ATTINY10-TSHR
Microchip Technology

-
ATTINY10-TS8R
Microchip Technology

-
ATTINY202-SSNR
Microchip Technology

-
ATTINY202-SSFR
Microchip Technology

-
ATTINY402-SSNR
Microchip Technology

-
PIC16F15213T-I/MF
Microchip Technology

-
PIC16F15213-E/MF
Microchip Technology

-
PIC10F200T-I/OT
Microchip Technology

-
ATTINY412-SSNR
Microchip Technology

-
PIC10F202T-I/OT
Microchip Technology

-
ATTINY404-SSNR
Microchip Technology
Tech Hub
TTL and CMOS logic families differ in thresholds, loading, output drive, power and timing. This engineering guide compares 74HC and 74HCT, calculates noise margins and checks 3.3 V/5 V compatibility.
A practical engineering guide to 3.3V and 5V logic compatibility, input thresholds, resistor dividers, translator ICs, MOSFET level shifting, I2C pull-ups, timing limits and power-sequencing risks.
The 74HC595 uses push-pull logic outputs, while the TPIC6B595 uses 50 V open-drain DMOS sinks for higher-power loads. This guide compares timing, current limits, 3.3 V interfacing, load wiring, thermal…
The 74HC595 converts serial data into eight stable parallel outputs. This guide covers pin functions, shift and storage timing, OE and MR behavior, drive-current limits, cascading, voltage compatibilit…
A technical comparison of level-sensitive latches and edge-triggered flip-flops, covering timing windows, setup and hold limits, master–slave operation, time borrowing, race-through, HDL inference and…
A D latch stores one bit while Enable controls when data can pass. This reference covers gate-level operation, truth tables, transparency, setup and hold timing, LE versus OE, common ICs and practical …
An SR latch stores one bit through cross-coupled feedback. This engineering reference covers NOR and NAND implementations, truth tables, forbidden-state recovery, gated operation, switch debouncing, fa…
Latch circuits retain one bit through feedback. This technical reference covers SR and D latches, truth tables, transparency, timing limits, latch-versus-flip-flop behavior, applications and common log…
An engineering guide to LED driver operation, constant-current and constant-voltage outputs, linear and switching topologies, dimming, IC selection, calculations, replacement compatibility, and fault c…
Operational amplifier guide covering op amp basics, feedback, ideal vs real op amps, common configurations, buffer circuits, offset, bias current, gain-bandwidth, slew rate, rail-to-rail limits and sel…

