未解决
实践复盘|瑞萨RH850平台:底层Flash与信息安全域的工程适配经验Engineering Retrospective | Renesas RH850 Platform: Practical Adaptation of Low-Level Flash and Cybersecurity Subsystems


企业微信截图_1793174911114.png

导语

芯片数据手册描绘了硬件的理想能力集合,但车规基础软件的量产开发,远不止照着手册完成功能实现。瑞萨RH850作为全球底盘、域控、动力领域广泛使用的车规MCU,家族内部不同子型号的硬件细节差异,往往要依靠大量实机边界测试才能够被充分感知。本文来自知从科技多个RH850量产项目的工程复盘,聚焦信息安全ICUM与Flash存储子系统的调测过程,分享如何识别、消化平台隐性硬件行为,把芯片硬件能力转化为稳定可用的量产软件能力。

一、RH850:主流车规MCU平台的持续迭代

瑞萨RH850系列作为业界主流车规MCU,广泛应用于底盘、域控、动力等对功能安全有高要求的车载控制器。RH850产品家族持续迭代演进,从早期P/E/C等系列的40nm工艺升级到了U2系列28nm工艺,进而带来算力、功耗、外设综合性能的大幅提升。另一方面,升级的同时,Flash控制器、ICUM信息安全子系统等关键模块内部行为也随之发生变化。即便同属一个产品家族,不同子型号在外设行为上存在细微差异,这给AUTOSAR CP BSW的跨型号移植适配带来现实挑战。

很多开发人员会默认同家族芯片仅为简单版本升级,直接复用已有软件实现;然而量产实践证明,跨子型号移植不能仅静态研读手册、简单拷贝现有代码、依赖AI修正,充分的实机调试、量产测试是必不可少环节。

二、量产调测中的两类底层硬件行为与软件化解方案

2.1  DataFlash擦除边界行为与SHE密钥更新逻辑优化

在一个RH850/P1M C的底盘项目中,知从团队使用RFP编程工具执行Block级擦除操作后,在回读校验环节观测到特殊现象:某64字节Block内,绝大部分地址读值符合预期,但局部8字节地址的回读值表现异常。初步排查Lock Bit、OTP保护位均未置位,常规闪存保护机制无法解释该地址段的读值差异。查阅瑞萨《EEPROM Emulation Library》文档,EEL库引入Complementary Read作为库自检手段;而硬件层面,对于已执行擦除但尚未重新编程的数据闪存,其读取值本身是未定义的,直接普通读取的值是未定义的,可能偏向于被擦除之前的值。知从团队判断该现象并非擦除操作局部失败,而是该硬件特性带来的结果。

该底层行为直接影响SHE密钥更新业务逻辑:当业务发起密钥注入时,软件流程通常需要先擦除旧密钥再写入新密钥。如果待写入密钥与片内已有密钥完全一致,擦除后的不确定读值可能被上层比对逻辑误判为“片内仍存在旧密钥”或“写入未生效”,进而引发UDS密钥更新服务异常。该问题的根源在于SHE抽象接口层缺少对“密钥相同”这一语义的显式表达,而非底层Flash擦除操作本身存在缺陷。单纯调整擦除时序、增加多次擦除重试,无法稳定消除该边界场景带来逻辑歧义。

知从团队最终选择在SHE抽象接口层做语义扩展,新增返回状态码,显式表征待注入密钥与片内现存密钥完全一致;交由UDS服务层解析该状态码并输出对应诊断响应,将底层硬件行为带来的不确定性收敛至软件接口语义层面,隔离底层对上层诊断业务的扰动。通过此次改动,知从的信息安全解决方案的鲁棒性得到了提升,避免了错误返回密钥更新失败的状态。

2.2 ICUM专属Secure DFlash访问的控制器实例切换适配

RH850/P1H-C 的 Data Flash 在硬件上划分为 DF Bank0 与 DF Bank1 两套地址域:Bank0 自 0xFF200000 起由 FACI0 管辖,Bank1 落在 0xFF300000~0xFF307FFF(32KB)并由 FACI1 管辖。地址落在哪一 Bank,就必须选用对应的 FACI 实例完成编程与擦除——这是 Flash 访问路径的硬约束,而非软件层可随意复用的“通用 DFlash 接口”。

项目开发初期,对 Secure Data Flash 的物理 Bank、Option 配置起点与控制器实例之间的对应关系尚未完全厘清,曾出现以 FACI0 去操作 0xFF30xxxx 区间、或将 Bank 映射与安全存储配置混为一谈的情况,反复测试访问失败。在逐一排除地址映射配置错误、权限与保护位、时钟与供电等常规因素后,团队围绕 FAD 地址选路逻辑、OPBT11(Secure Data Flash 起始)与实机擦写行为开展多轮对照观测与板级验证,最终定位到访问约束的本质:FACI 与 Data Flash Bank 一一绑定;错 Bank 即错控制器,必然失败。

在此基础上,项目将 ICUM 密钥与安全凭证的持久化区域明确配置在 0xFF210000~0xFF21FFFF(落于 DF Bank0),并统一通过 FACI0 完成该安全存储域的编程擦除;同时对 0xFF300000~0xFF307FFF(DF Bank1)的访问切换至 FACI1。通过把“地址区间—Bank—FACI”三条链路对齐,ICUM 安全存储通路得以稳定闭环,为密钥与安全凭证的可靠落盘提供了可验证、可复现的工程基础。

知从团队将FACI实例切换逻辑封装进密码组件底层驱动,对上层密码接口完全透明,上层业务无需感知控制器切换细节,保障ICUM安全闪存读写链路稳定可用,支撑密钥、证书等安全数据持久化业务。通过这一改进,知从科技信息安全方案的可靠性和兼容性等到了更进一步的提升。

三、从现象到产品沉淀:面向OEM规范验证的软件栈能力

上面两个典型场景,只是RH850平台适配过程中众多工程适配场景的缩影。很多这类场景不会暴露在常规功能测试,往往要走到边界压力、长期耐久测试阶段才显现。这也是量产基础软件与Demo开发本质区别:Demo只需要功能跑通;车规量产软件,要求充分认知各类隐性硬件行为,并给出可控的软件化解方案。

知从科技完成在RH850平台上的全系列适配,从早期的P1、F1、C1,到现在主推的U2A、U2B、U2C,知从科技有全套的Autosar CP、信息安全库固件、功能安全库固件,以及相关的Bootloader产品,全部经由量产检验,覆盖的应用有包括:EPS转向、EMB制动、智驾、座舱、车身域控、底盘域控,等等,终端客户覆盖国内外主流车厂。知从科技所有项目都可以支持到客户量产。

四、产业协同:持续深化MCU平台的软件价值共创

知从科技是坐落于上海临港新片区的高新技术企业、上海专精特新企业,专注于全栈车控基础软件产品研发与技术服务,拥有ISO 26262 ASIL-D软件产品认证、达到ASPICE CL3能力等级。同时知从科技也是AUTOSAR组织会员单位、AUTOSAR中国中心成员,产品矩阵覆盖AUTOSAR基础软件、功能安全、信息安全、FOTA以及配套工程服务,服务国内外整车厂与零部件企业。

作为瑞萨的重要合作伙伴,知从科技已经完成RH850系列多代型号的深度软件适配与量产项目落地。展望未来,知从科技将继续深化与生态伙伴的协同,紧跟各大厂商的产品迭代,持续打磨基础软件、功能安全和信息安全等配套解决方案,共同助力国内汽车控制器产业高质量量产落地。

注:文中芯片相关行为描述来源于知从科技量产项目工程实测,参考瑞萨官方公开手册文档;知从科技产品、项目案例及企业介绍表述引自知从科技官网公开资料。本文属于行业工程实践分享,不构成任何产品承诺。


Preface

Datasheets outline the theoretical hardware capabilities of microchips, yet series-production development of automotive-grade basic software involves far more than merely implementing functions per the documentation. As a widely adopted automotive MCU for chassis, domain controller and powertrain applications worldwide, the Renesas RH850 family exhibits subtle hardware discrepancies across its sub-variants. These nuances can only be fully characterized through extensive real-device boundary testing. This article summarizes engineering takeaways from multiple RH850 mass-production projects undertaken by ZC Technology. It focuses on the commissioning of the ICUM cybersecurity module and Flash storage subsystem, illustrating how to identify and accommodate implicit hardware behaviors of the platform, and translate chip hardware capabilities into stable, production-ready software functions.

1. RH850: Continuous Evolution of a Mainstream Automotive-Grade MCU Platform

The Renesas RH850 series is an industry-standard automotive MCU deployed widely in chassis, domain controller and powertrain ECUs with stringent functional safety requirements. The RH850 product family has undergone iterative upgrades: shifting from the 40 nm process used in early P/E/C series to the 28 nm process of the U2 series, delivering marked improvements in computing performance, power consumption and integrated peripheral specifications. Meanwhile, internal behaviors of critical modules including the Flash controller and ICUM cybersecurity subsystem have evolved alongside the process upgrade. Even within the same product family, minor peripheral behavioral differences exist between sub-variants, posing tangible challenges for cross-variant porting and adaptation of AUTOSAR CP BSW.

Many developers assume that chips within one family represent simple version upgrades and directly reuse existing software implementations. Mass-production experience, however, proves that cross-sub-variant porting cannot rely solely on static datasheet review, straightforward code reuse or AI-assisted revisions. Sufficient real-hardware debugging and production validation testing are mandatory.

2. Two Types of Underlying Hardware Behaviors Encountered in Production Commissioning and Software Mitigation Strategies

2.1 DataFlash Erase Boundary Behavior and Optimization of SHE Key Update Logic

During a chassis project based on RH850/P1M-C, the ZC team performed block-level erase operations using the RFP programming tool. A distinct anomaly was observed during readback verification: within a 64-byte block, most addresses returned expected values, while an 8-byte local segment showed abnormal read results. Initial checks confirmed that lock bits and OTP protection bits remained unset, and standard flash protection mechanisms failed to account for this deviation. Reference to Renesas’ EEPROM Emulation Library documentation notes that the library employs Complementary Read for internal self-check. At the hardware level, read values from data flash that has been erased but not reprogrammed are undefined; raw reads may retain values close to those prior to erasure. The team concluded that this phenomenon stemmed from this hardware characteristic rather than a localized erase failure.

This low-level behavior directly impacted the SHE key update workflow. In typical implementations, the software erases old keys before writing new ones upon a key injection request. When the incoming key is identical to the one already stored on-chip, indeterminate post-erase readbacks may be misinterpreted by upper-layer comparison logic as residual old keys or unsuccessful writes, triggering faults in the UDS key update service. The root cause lies in the absence of explicit semantics for “identical key” at the SHE abstraction layer, rather than a defect in the underlying Flash erase operation itself. Simple adjustments to erase timing or repeated erase retries cannot reliably resolve logical ambiguity in this boundary scenario.

The ZC team implemented semantic extension at the SHE abstraction layer by adding a new return status code to explicitly indicate that the injected key matches the existing on-chip key. The UDS service layer interprets this code and returns the corresponding diagnostic response. This approach constrains uncertainty introduced by hardware behavior within the semantics of the software interface, isolating upper-layer diagnostic services from underlying disturbances. This enhancement improves the robustness of ZC’s cybersecurity solution and prevents false reporting of key update failures.

2.2 Controller Instance Switching Adaptation for ICUM Exclusive Secure DFlash Access

On the RH850/P1H-C, Data Flash is hardware-partitioned into two address banks: DF Bank0 starting at 0xFF200000, controlled by FACI0; DF Bank1 spanning 0xFF300000–0xFF307FFF (32 KB), controlled by FACI1. Programming and erase operations must use the FACI instance corresponding to the target bank. This represents a hard constraint for Flash access paths, not a generic DFlash interface that software may reuse arbitrarily.

In the early project phase, the mapping between the physical bank of Secure Data Flash, the starting address defined by option configuration and controller instances was not fully clarified. Attempts to access the 0xFF30xxxx range via FACI0, or confusion between bank mapping and secure storage configuration, led to repeated access failures. After ruling out common root causes including incorrect address mapping, permission and protection bit settings, clock and power supply issues, the team conducted multiple rounds of comparative observation and board-level validation targeting FAD address routing logic, OPBT11 (Secure Data Flash start address) and real-device read-write behavior. The core constraint was identified: each FACI instance is bound exclusively to one Data Flash bank. Operating on the wrong bank with a mismatched FACI instance will invariably fail.

Based on this finding, the project configured persistent storage for ICUM keys and security credentials within 0xFF210000–0xFF21FFFF (DF Bank0), with all programming and erase operations for this secure storage domain handled uniformly via FACI0. Access to 0xFF300000–0xFF307FFF (DF Bank1) is routed to FACI1. Aligning address range, bank and FACI controller establishes a stable closed-loop access path for ICUM secure storage, delivering a verifiable and reproducible engineering foundation for reliable persistence of keys and security credentials.

The FACI instance switching logic is encapsulated within the low-level driver of the crypto component and remains fully transparent to upper crypto APIs. Application layers require no awareness of controller switching details, ensuring stable read/write access to ICUM secure flash for persistent storage of keys, certificates and other security assets. This upgrade further boosts the reliability and compatibility of ZC Technology’s cybersecurity offering.

3. From Observation to Productized Capability: Software Stack Validation Against OEM Specifications

The two cases above represent only a fraction of adaptation challenges encountered on the RH850 platform. Many such issues do not surface during standard functional testing and only emerge under boundary stress or long-duration durability tests. This marks a fundamental distinction between demo software and production-grade automotive basic software: demos only require feature execution, while automotive production software demands full comprehension of implicit hardware behaviors plus controlled software mitigation strategies.

ZC Technology has completed full-platform adaptation for the RH850 family, covering legacy variants including P1, F1 and C1 as well as the currently promoted U2A, U2B and U2C. The company delivers a complete portfolio of AUTOSAR CP stacks, cybersecurity firmware libraries, functional safety firmware libraries and associated bootloader products, all validated through mass-production deployments. Use cases include EPS steering, EMB braking, intelligent driving, cockpit, body domain controllers and chassis domain controllers, serving mainstream domestic and global OEMs. All ZC projects are production-ready for customers.

4. Industrial Collaboration: Co-Creating Sustained Software Value for MCU Platforms

ZC Technology is a high-tech and Shanghai Specialized, Refined, Differential and Innovative (“Little Giant”) enterprise based in Lingang New Area, Shanghai. It focuses on full-stack automotive control basic software R&D and technical services, holding ISO 26262 ASIL-D certification for software products and ASPICE CL3 capability. ZC is also an AUTOSAR member and part of the AUTOSAR China Center. Its product portfolio spans AUTOSAR basic software, functional safety, cybersecurity, FOTA and complementary engineering services for global vehicle manufacturers and tier suppliers.

As a key Renesas partner, ZC Technology has delivered in-depth software adaptation and mass-production rollout across multiple RH850 generations. Moving forward, ZC will continue to deepen collaboration with ecosystem partners, keep pace with semiconductor product roadmaps, and refine solutions for basic software, functional safety and cybersecurity. Together with partners, it will support high-quality mass production of automotive controllers in China.

Note: Hardware behavior descriptions herein are derived from real engineering measurements from ZC Technology’s mass-production projects, cross-referenced against official public Renesas documentation. Statements regarding ZC’s products, project references and corporate profile are sourced from its official website. This article is shared for industry engineering reference only and does not constitute any product warranty.


发布于 2026-10-28 16:08:58
写回答
好问题0
好问题0
已收藏
收藏问题
写回答