0.概述
7801暂时无错误注入,无法直接进中断看错误情况,具体效果后续看7840的带错误注入的测试情况。
1.简介

2.特性

3.功能

4.调试
可以看到在库文件里面有ecc_sram的库。

在官方GPIO代码里面写了点测试代码

成功打开2bit中断

因为没有错误注入,没法直接测试,回头瞅瞅7840加了错误注入的测试结果
调试看到状态值始终为0。回头找个有问题的芯片测下能不能近中断。

cpp
#include "ac780x_ecc_sram_reg.h"
#include "ac780x_ecc_sram.h"
ECC_SRAM_ConfigType g_eccSranCfg;
void ECC_SRAM_CallBack()
{
// 0: no error, 1: 2 bit error, 2/3: 1 bit error
unsigned int eccSramStatus = ECC_SRAM_GetErrStatus();
if (1 == eccSramStatus)
{
unsigned int ErrAddr1bit = ECC_SRAM_Get1BitErrAddr();
}
if (2 == eccSramStatus)
{
unsigned int ErrAddr2bit = ECC_SRAM_Get2BitErrAddr();
}
}
void Ecc_SramInit()
{
g_eccSranCfg.interruptEn = 1;
g_eccSranCfg.resetEn = 1;
g_eccSranCfg.callBack = ECC_SRAM_CallBack;
ECC_SRAM_Init(&g_eccSranCfg);
}