fix(esc_lan9252): 修复LAN9252 HBI访问模型和IRQ输出使能问题

- 修正HBI访问模型:将ESC核心CSR(0x0000-0x0FFF)改为通过ECAT_CSR_CMD/DATA
  间接端口访问,解决此前直接寻址导致核心寄存器恒读0/写丢弃的问题

- 新增csrRead/csrWrite/pramRead/pramWrite接口,正确实现LAN9252访问端口操作

- 添加PDI就绪检测:等待DL_STATUS bit0置位确认EEPROM加载完成和EtherCAT核心使能

- 实现IRQ引脚输出使能:配置IRQ_CFG和INT_EN寄存器,使EtherCAT事件能到达PB1,
  解决PDI_Isr未触发导致SAFEOP->OP无限挂起的问题

- 为ESC_EXMC硬件诊断添加CONFIG_ESC_EXMC_DIAG门控,默认关闭避免影响正常运行

- 修正system_gd32e50x.c中HXTAL故障诊断的寄存器偏移和位设置错
This commit is contained in:
cbb
2026-09-02 02:38:35 +08:00
parent cfe7725b26
commit 44d407390b
29 changed files with 1178 additions and 292 deletions
File diff suppressed because one or more lines are too long
+182 -20
View File
@@ -3,9 +3,12 @@
* @brief 应用启动初始化:模块成功置位,结束统一报告结果。
*
* 顺序:
* NVIC → SysTick → ESP32_EN 保持 → USART0 → AppSpi(尽早 HELLO 探活)→
* 复位源采集 → NVIC → SysTick → ESP32_EN 保持 → USART0 → AppSpi(尽早 HELLO 探活)→
* ADC → CANFD → OtaBootRequest → TaskManager → Scheduler →
* EtherCAT(+Sync 可选) → Watchdog → report
*
* 1.5.34:各模块 init 从"盲配置"改为带检查(寄存器回读 / 节拍验证 / 校准超时),
* 失败不置位;复位源/模块位图/critical 失败位图经 getter 导出供 SPI 0xA3 上报。
*/
#include "sys/initial.h"
@@ -30,6 +33,9 @@ void MainLoop(void);
}
uint32_t AppInitializer::s_mask = 0U;
uint8_t AppInitializer::s_initState = AppInitializer::kInitOk;
uint8_t AppInitializer::s_resetCause = 0U;
uint8_t AppInitializer::s_faultCodes[AppInitializer::kModuleCount] = {0U};
namespace {
@@ -62,6 +68,71 @@ void AppInitializer::mark(ModuleBit b)
s_mask |= static_cast<uint32_t>(b);
}
/** @brief ModuleBit(1<<N) → 数组索引 N。 */
static uint8_t moduleBitIndex(uint32_t bit)
{
uint8_t idx = 0U;
while (bit > 1U) {
bit >>= 1U;
++idx;
}
return idx;
}
void AppInitializer::setFault(ModuleBit b, uint8_t code)
{
const uint8_t idx = moduleBitIndex(static_cast<uint32_t>(b));
if (idx < kModuleCount) {
s_faultCodes[idx] = code;
}
}
uint8_t AppInitializer::faultCode(uint8_t module_index)
{
return (module_index < kModuleCount) ? s_faultCodes[module_index] : 0U;
}
uint8_t AppInitializer::faultCodes(uint8_t *out)
{
if (out == nullptr) {
return 0U;
}
for (uint8_t i = 0U; i < kModuleCount; ++i) {
out[i] = s_faultCodes[i];
}
return kModuleCount;
}
uint32_t AppInitializer::criticalFailMask()
{
uint32_t fail = 0U;
for (size_t i = 0; i < sizeof(kEntries) / sizeof(kEntries[0]); ++i) {
const InitEntry &e = kEntries[i];
if (e.critical && (s_mask & e.bit) == 0U) {
fail |= e.bit;
}
}
return fail;
}
/**
* @brief 采集 RCU_RSTSCK 复位源位图并清硬件标志。
* @note 必须在 init 最开头调用(早于任何可能读标志的模块);
* 清除不影响 BOOT 的 FWDGT 停留 OTA 判定——新的看门狗复位会由硬件重新置位。
*/
void AppInitializer::captureResetCause()
{
uint8_t cause = 0U;
if (rcu_flag_get(RCU_FLAG_PORRST) != RESET) cause |= kRstPor;
if (rcu_flag_get(RCU_FLAG_EPRST) != RESET) cause |= kRstEpr;
if (rcu_flag_get(RCU_FLAG_FWDGTRST) != RESET) cause |= kRstFwdgt;
if (rcu_flag_get(RCU_FLAG_WWDGTRST) != RESET) cause |= kRstWwdgt;
if (rcu_flag_get(RCU_FLAG_SWRST) != RESET) cause |= kRstSw;
if (rcu_flag_get(RCU_FLAG_LPRST) != RESET) cause |= kRstLp;
rcu_all_reset_flag_clear();
s_resetCause = cause;
}
void AppInitializer::report()
{
bool critical_ok = true;
@@ -89,51 +160,119 @@ void AppInitializer::report()
}
fail_list[fail_len] = '\0';
}
/* 故障码后缀 #XX(16 进制;canfd 高 4 位为通道号),0=成功不追加。
* 码值含义见 initial.h 注释与各模块头文件;网页按同一编码解码中文原因。 */
const uint8_t fc = s_faultCodes[moduleBitIndex(e.bit)];
if (fc != 0U && fail_len + 3U < sizeof(fail_list)) {
const char *hex = "0123456789ABCDEF";
fail_list[fail_len++] = '#';
fail_list[fail_len++] = hex[(fc >> 4) & 0xFU];
fail_list[fail_len++] = hex[fc & 0xFU];
fail_list[fail_len] = '\0';
}
}
/* 复位源随 init 报告输出一次(位图多位置位属正常,如 POR 常伴随 EPRST/SWRST) */
printf("[APP] reset_cause: 0x%02X (por=%d epr=%d fwdgt=%d wwdgt=%d sw=%d lp=%d)\r\n",
(unsigned)s_resetCause,
(s_resetCause & kRstPor) ? 1 : 0,
(s_resetCause & kRstEpr) ? 1 : 0,
(s_resetCause & kRstFwdgt) ? 1 : 0,
(s_resetCause & kRstWwdgt) ? 1 : 0,
(s_resetCause & kRstSw) ? 1 : 0,
(s_resetCause & kRstLp) ? 1 : 0);
if (critical_ok && all_ok) {
s_initState = kInitOk;
printf("[APP] init: OK (all modules)\r\n");
} else if (critical_ok) {
s_initState = kInitDegraded;
printf("[APP] init: OK (critical), skipped/failed: %s\r\n",
fail_list[0] != '\0' ? fail_list : "?");
} else {
s_initState = kInitCriticalFail;
printf("[APP] init: FAIL, modules: %s\r\n",
fail_list[0] != '\0' ? fail_list : "?");
}
/* 日志完整性自证:串口 TX 缓冲溢出会静默吞字节,1.5.40 及之前实测使 [ECAT] 诊断
* 出现 "bus eaabled"/"pdi_type=0x8Dexect" 等掉字,并两次导致 LAN9252 故障误定性。
* 1.5.41 起缓冲满时自旋腾位,仅 USART 外设异常才丢弃;非 0 即代表上面的日志不可全信。 */
const uint32_t dropped = Usart0::droppedBytes();
if (dropped != 0U) {
printf("[APP] WARN: uart dropped %u bytes, 以上日志可能不完整\r\n",
(unsigned)dropped);
}
}
void AppInitializer::init()
{
s_mask = 0U;
s_initState = kInitOk;
for (uint8_t i = 0U; i < kModuleCount; ++i) {
s_faultCodes[i] = 0U;
}
captureResetCause();
/* NVIC 优先级分组:写入后回读 AIRCR.PRIGROUP 验证(纯寄存器写,回读确认分组生效) */
nvic_priority_group_set(CONFIG_NVIC_PRIORITY_GROUP);
mark(kNvic);
if ((SCB->AIRCR & (0x7UL << 8U)) == (CONFIG_NVIC_PRIORITY_GROUP & (0x7UL << 8U))) {
mark(kNvic);
} else {
setFault(kNvic, kFaultNvicPrigroupMismatch);
}
SysTickTimer::initMs();
mark(kSysTick);
/* SysTick:内部验证节拍真实前进;失败不返回(FATAL 停机) */
if (SysTickTimer::initMs()) {
mark(kSysTick);
}
rcu_periph_clock_enable(RCU_GPIOC);
gpio_bit_set(CONFIG_ESP32_RESET_PORT, CONFIG_ESP32_RESET_PIN);
gpio_init(CONFIG_ESP32_RESET_PORT, GPIO_MODE_OUT_PP, GPIO_OSPEED_50MHZ, CONFIG_ESP32_RESET_PIN);
mark(kEsp32Hold);
/* ESP32 EN 自检:日志里能直接看出是上电即拉高,还是被外部钳住 */
APP_LOGI("[APP] ESP32_EN PC9=%d (1=released)\r\n",
(int)gpio_input_bit_get(CONFIG_ESP32_RESET_PORT, CONFIG_ESP32_RESET_PIN));
/* ESP32 EN 自检:回读为 1 才算成功(被外部钳低属硬件异常,标记失败但不阻塞其余模块) */
const bool esp32_released =
(gpio_input_bit_get(CONFIG_ESP32_RESET_PORT, CONFIG_ESP32_RESET_PIN) == SET);
if (esp32_released) {
mark(kEsp32Hold);
} else {
setFault(kEsp32Hold, kFaultEsp32HoldClamped);
}
APP_LOGI("[APP] ESP32_EN PC9=%d (1=released)\r\n", esp32_released ? 1 : 0);
Usart0::configurePins();
Usart0::init();
mark(kUsart0);
const uint8_t usartFault = Usart0::init();
if (usartFault == Usart0::kFaultOk) {
mark(kUsart0);
} else {
setFault(kUsart0, usartFault);
}
/* SPI 尽早就绪:OTA FINISH 跳转后 ESP32 用 HELLO 探活,不能等 CAN 上电延时 */
/* SPI 尽早就绪:OTA FINISH 跳转后 ESP32 用 HELLO 探活,不能等 CAN 上电延时。
* 从机无硬件自证手段(配置即生效),探活依赖 ESP32 侧 HELLO/PING(运行期)。 */
AppSpiCommandBus.init();
mark(kAppSpi);
Adc::init();
mark(kAdc);
/* ADC:带超时校准 + VREFINT→VDDA 采样链验证 */
const uint8_t adcFault = Adc::init();
if (adcFault == Adc::kFaultOk) {
mark(kAdc);
} else {
setFault(kAdc, adcFault);
LOG_ERR("[APP] ADC init FAIL fault=%u (1=RSTCLB timeout 2=CLB timeout 3=VDDA invalid)\r\n",
(unsigned)adcFault);
}
CanFd::init();
/* L0 通过才置 canfd 位 */
if (CanFd::selfTestL0()) {
/* L0 通过才置 canfd 位;故障码 = 原因 | (首个失败通道 << 4)。
* 无使能通道(canFault==Ok)属合法配置而非故障,照样置位。 */
uint8_t canFault = CanFd::kSelfTestOk;
uint8_t canFaultCh = 0U;
(void)CanFd::selfTestL0(&canFault, &canFaultCh);
if (canFault != CanFd::kSelfTestOk) {
setFault(kCanFd, (uint8_t)(canFault | (uint8_t)(canFaultCh << 4U)));
} else {
mark(kCanFd);
}
@@ -143,17 +282,28 @@ void AppInitializer::init()
TaskManager::init();
mark(kTaskManager);
SchedulerTimer::init();
mark(kScheduler);
/* 调度定时器:回读 + 100us 中断节拍前进验证 */
const uint8_t schedFault = SchedulerTimer::init();
if (schedFault == SchedulerTimer::kFaultOk) {
mark(kScheduler);
} else {
setFault(kScheduler, schedFault);
LOG_ERR("[APP] SchedulerTimer init FAIL fault=%u (1=CEN 2=PSC 3=CAR 4=no tick)\r\n",
(unsigned)schedFault);
}
/* ---- EtherCAT: EXMC 总线探活 → SSC 协议栈初始化 → SYNC0/IRQ 中断使能 ----
* 1.5.27:改经 EthercatSlave::init()(内部调用 EscLan9252::init 并记录
* chipId/AL 状态诊断,此前该函数无调用点、s_escReady 恒为 false)。
* 门控用 EscLan9252::isBusReady()(BYTE_TEST 通过)而非 isEscReady():
* 冷启动时 AL=INIT,SSC 必须照常启动并等待主站配置。
* 1.5.39:追加 isCoreReady() 门控——EscLan9252::init() 已等待 EEPROM(SII)
* 加载完成(DL_STATUS bit0);未加载时 EtherCAT 核心寄存器写静默丢弃,
* SSC 的 AL Event Mask/邮箱 SM 配置会全部落空(主站恒读 AL=INIT 的根因),
* 此时跳过 SSC 并以独立故障码上报。
* EEPROM 校验/烧录延迟到主循环执行,避免阻塞 init(烧录需 ~20s)。 */
EthercatSlave::init();
if (EscLan9252::isBusReady()) {
if (EscLan9252::isBusReady() && EscLan9252::isCoreReady()) {
const uint16_t sscResult = MainInit();
if (sscResult == 0U) {
mark(kEthercat);
@@ -161,14 +311,26 @@ void AppInitializer::init()
mark(kEthercatSync);
printf("[ECAT] SSC MainInit OK, sync ISR enabled\r\n");
} else {
setFault(kEthercat, kFaultEthercatSscFail);
printf("[ECAT] SSC MainInit FAIL (code=0x%04X)\r\n", (unsigned)sscResult);
}
} else if (EscLan9252::isBusReady()) {
setFault(kEthercat, kFaultEthercatCoreNotReady);
printf("[ECAT] EtherCAT core not ready (EEPROM not loaded), SSC skipped\r\n");
} else {
setFault(kEthercat, kFaultEthercatBusNotReady);
printf("[ECAT] EXMC bus not ready, SSC skipped\r\n");
}
Watchdog::init();
mark(kWatchdog);
/* 看门狗放最后:PSC/RLD 写入经硬件确认才置位 */
const uint8_t wdgFault = Watchdog::init();
if (wdgFault == Watchdog::kFaultOk) {
mark(kWatchdog);
} else {
setFault(kWatchdog, wdgFault);
LOG_ERR("[APP] Watchdog init FAIL fault=%u (1=PSC 2=RLD 3=pending 4=LSI not ready)\r\n",
(unsigned)wdgFault);
}
report();
}
+80 -1
View File
@@ -6,10 +6,12 @@
/**
* @brief 应用初始化器:按固定顺序启动模块,成功位置 1,末尾汇总。
* @note 汇总结果(模块位图 / critical 失败位图 / 复位源 / init 状态)经静态 getter 导出,
* 供 SPI 0xA3 INIT_STATUS 命令与身份块 [15] 上报 ESP32。
*/
class AppInitializer {
public:
/** 启动模块位(成功置 1) */
/** 启动模块位(成功置 1);与 SPI 0xA3 上报位图共用,改动须同步 ESP32 侧注释 */
enum ModuleBit : uint32_t {
kNvic = 1u << 0,
kSysTick = 1u << 1,
@@ -26,15 +28,92 @@ public:
kWatchdog = 1u << 12,
};
/** init 总体状态(身份块 [15] 与 0xA3 payload[9] 共用编码) */
enum InitState : uint8_t {
kInitOk = 0U, /**< 全部模块成功 */
kInitDegraded = 1U, /**< critical 全成功,非 critical 有失败/跳过 */
kInitCriticalFail = 2U, /**< 有 critical 模块失败 */
};
/** 复位源位图(0xA3 payload[8] 编码),多位置位属正常(如 POR 常伴随其它标志) */
enum ResetCauseBit : uint8_t {
kRstPor = 1u << 0, /**< 上电/掉电复位 */
kRstEpr = 1u << 1, /**< 外部引脚复位(NRST) */
kRstFwdgt = 1u << 2, /**< 独立看门狗复位 */
kRstWwdgt = 1u << 3, /**< 窗口看门狗复位 */
kRstSw = 1u << 4, /**< 软件复位(含 OTA 跳转) */
kRstLp = 1u << 5, /**< 低功耗复位 */
};
/** 模块数量(fault code 数组长度,与 ModuleBit 位序一致:bit N → 索引 N) */
static constexpr uint8_t kModuleCount = 13U;
/**
* @brief 模块故障码(0xA3 payload[12..24],每模块 1B,0=成功)。
*
* 各模块码值定义位置:
* - nvic : kFaultNvic*(本类下)
* - systick : kFaultSystick*(本类下;实际失败时 FATAL 停机不上报,仅备查)
* - esp32_hold : kFaultEsp32Hold*(本类下)
* - usart0 : Usart0::InitFault(device/usart0.h)
* - adc : Adc::InitFault(device/adc.h)
* - canfd : CanFd::SelfTestFault(device/canfd.h),
* **编码 = 原因码 | (首个失败通道号 << 4)**,通道 0/1/2
* - ota_boot_req: 纯软件,恒 0
* - app_spi : 无自证手段,恒 0
* - task_manager: 纯软件,恒 0
* - scheduler : SchedulerTimer::InitFault(device/timer.h)
* - ethercat : kFaultEthercat*(本类下)
* - ethercat_sync: 跟随 ethercat,恒 0
* - watchdog : Watchdog::InitFault(device/watchdog.h)
*/
enum NvicFault : uint8_t {
kFaultNvicOk = 0U,
kFaultNvicPrigroupMismatch = 1U, /**< AIRCR.PRIGROUP 回读与配置不一致 */
};
enum SystickFault : uint8_t {
kFaultSystickOk = 0U,
kFaultSystickConfig = 1U, /**< SysTick_Config 失败(备查,实际 FATAL 停机) */
kFaultSystickNoTick = 2U, /**< 节拍未前进(备查,实际 FATAL 停机) */
};
enum Esp32HoldFault : uint8_t {
kFaultEsp32HoldOk = 0U,
kFaultEsp32HoldClamped = 1U, /**< PC9 输出高后回读仍为 0(被外部钳低) */
};
enum EthercatFault : uint8_t {
kFaultEthercatOk = 0U,
kFaultEthercatBusNotReady = 1U, /**< EXMC/HBI 总线探活失败(BYTE_TEST 未通过) */
kFaultEthercatSscFail = 2U, /**< SSC MainInit 返回非 0 */
kFaultEthercatCoreNotReady = 3U, /**< EEPROM 未加载完成,EtherCAT 核心未使能(1.5.39) */
};
/**
* @brief 按固定顺序完成模块初始化(过程只置位,结束统一报告成败/失败模块)。
*/
static void init();
/** @brief 已成功初始化的模块位图。 */
static uint32_t moduleMask() { return s_mask; }
/** @brief 初始化失败的 critical 模块位图(0=无 critical 失败)。 */
static uint32_t criticalFailMask();
/** @brief init 总体状态(InitState 编码)。 */
static uint8_t initState() { return s_initState; }
/** @brief 本次上电复位源位图(ResetCauseBit 编码,init 开头采集并已清硬件标志)。 */
static uint8_t resetCause() { return s_resetCause; }
/** @brief 指定模块(ModuleBit 位序索引 0..12)的故障码,0=成功。 */
static uint8_t faultCode(uint8_t module_index);
/** @brief 将全部模块故障码拷贝到 out(至少 kModuleCount 字节),返回长度。 */
static uint8_t faultCodes(uint8_t *out);
private:
static uint32_t s_mask;
static uint8_t s_initState;
static uint8_t s_resetCause;
static uint8_t s_faultCodes[kModuleCount];
static void mark(ModuleBit b);
static void setFault(ModuleBit b, uint8_t code);
static void captureResetCause();
static void report();
};
+44 -5
View File
@@ -34,16 +34,55 @@ void SysTickTimer::delayMs(uint32_t ms)
}
/**
* @brief 初始化 1ms SysTick 时基。
* @brief SysTick 失效时的致命停机:裸寄存器 USART0(PA9) 输出 FATAL 后挂死。
* @param[in] 无。
* @param[out] 无。
* @retval 无返回值。
* @note 先更新 `SystemCoreClock`,再按 1kHz 频率配置 SysTick。
* @retval 无返回值(不返回)。
* @note 此时 USART0 驱动尚未初始化,只能裸写寄存器;
* 时钟树已是 180MHz(SystemInit 完成),BAUD=60 对应 3M(与工程 printf 一致)。
* 注意 system_gd32e50x.c 的 HXTAL FAIL 段有寄存器 bug(CTL0 写到 STAT0 偏移、
* 漏开 USART0EN),本段使用修正后的地址:APB2EN bit14=USART0EN、CTL0 @ +0x0C。
*/
void SysTickTimer::initMs()
static void fatalSystickHalt()
{
*((volatile uint32_t *)0x40021018U) |= (1U << 14) | (1U << 2) | (1U << 0); /* USART0EN|PAEN|AFEN */
{ volatile uint32_t _ctl = *((volatile uint32_t *)0x40010804U); /* PA9 → AF_PP */
_ctl &= ~(0xFU << 4); _ctl |= (0xBU << 4);
*((volatile uint32_t *)0x40010804U) = _ctl; }
*((volatile uint32_t *)0x40013808U) = 60U; /* BAUD: 180MHz/3M */
*((volatile uint32_t *)0x4001380CU) = (1U << 3) | (1U << 13); /* CTL0: TEN | UEN */
{ const char *_msg = "[APP] init: FATAL systick\r\n";
for(int i=0; _msg[i]; i++){
*((volatile uint32_t *)0x40013804U) = _msg[i]; /* DATA */
while((*((volatile uint32_t *)0x40013800U) & (1U << 7)) == 0U) {} } } /* STAT0.TBE */
while(1){ }
}
/**
* @brief 初始化 1ms SysTick 时基并验证中断真实触发。
* @param[in] 无。
* @param[out] 无。
* @retval bool true=节拍已前进;false=配置失败(不返回,直接 FATAL 停机)。
* @note 先更新 `SystemCoreClock`,再按 1kHz 频率配置 SysTick。
* 节拍验证失败时系统失去一切超时/延时基础,继续运行等于盲跑,
* 按致命错误处理(裸串口报告 + 挂死,与 HXTAL FAIL 同级)。
*/
bool SysTickTimer::initMs()
{
SystemCoreClockUpdate();
SysTick_Config(SystemCoreClock / 1000U);
if (SysTick_Config(SystemCoreClock / 1000U) != 0U) {
fatalSystickHalt();
}
/* 有界等待节拍前进:guard 预算约 50ms+,覆盖 1ms 节拍;
* 若无界等待,中断未触发时此处即死循环且无任何诊断。 */
const uint32_t start = s_ms;
volatile uint32_t guard = 2000000U;
while (s_ms == start) {
if (--guard == 0U) {
fatalSystickHalt();
}
}
return true;
}
/* ----- 中断入口 C 包装 ---------------------------------------------- */
+3 -2
View File
@@ -13,9 +13,10 @@ public:
* @brief 初始化 SysTick 为 1ms 系统节拍。
* @param[in] 无。
* @param[out] 无。
* @retval 无返回值。
* @retval bool true=配置成功且中断真实触发;false=配置失败或节拍未前进。
* @note 失败时系统失去时基(后续 delayMs 不可用),调用方应按致命错误处理。
*/
static void initMs();
static bool initMs();
/**
* @brief 执行阻塞式毫秒延时。
+5 -1
View File
@@ -502,7 +502,10 @@ void TaskRunner::runPending()
/* === HBI 周期诊断:每 20 秒重新跑一次 EXMC/HBI 探活,方便热插拔/焊接后观察 ===
* 1.5.27:EtherCAT 同步 ISR 激活后停止(diagDump 会把 EXMC 引脚切成 GPIO,
* 拆毁运行中的总线;诊断的 bit-bang 也与 HBI 事务互斥冲突)。 */
* 拆毁运行中的总线;诊断的 bit-bang 也与 HBI 事务互斥冲突)。
* 1.5.33:整块由 CONFIG_ESC_EXMC_DIAG 门控,默认关闭——硬件已确认全通,
* 不再每 20s 拆总线做探针;换板/补焊排查浮空时置 1 恢复。 */
#if CONFIG_ESC_EXMC_DIAG
static uint32_t s_lastDiagSec = 0xFFFFFFFFU;
if (!EthercatSync::isActive()
&& (g_app_uptime_sec >= s_lastDiagSec + 20U || s_lastDiagSec == 0xFFFFFFFFU)) {
@@ -511,6 +514,7 @@ void TaskRunner::runPending()
(unsigned long)g_app_uptime_sec);
EscExmcBus::diagDump();
}
#endif
/* 延迟 EEPROM 烧录已删除(1.5.29):ESI 镜像改由 EtherCAT 主站侧刷写
* (tools/ecat/ecat_flash_eeprom.py 经 ESC 0x0500 EEPROM 接口),