Cypress技术william hill官网
直播中

李桂珍

7年用户 235经验值
私信 关注
[问答]

CY8C5868AXI-LP035:总线故障处理程序验证不会导致总线或内存管理错误

我尝试使用总线/内存/使用错误处理程序来创建简单异常日志。
因此,我已经定义了以下总线/内存/使用错误处理程序,并启用了相应的寄存器标志:
CyIntSetSysVector(CythIn Buth-FultTyrqn,Fulththand);
CyIntSetSysVector(CythIn MyMyMangeleIr.Irqn,Fulththand);
CyIntSetSysVector(CythIn)
SCB-≫SCCSR ScSrSrSr.UsgFultAtAy.MSK[ScBySHCSrBasFurtNaa[MSk] ScByScSrMyFrimtAnA/MSK;//允许使用/ /BUT/MPU故障
为了验证总线故障处理程序的正确运行,我根据一个示例项目实现了以下代码:
Unt32;
UIT32×T*pTrRebug=(Uti32×T*)和故障;
* pTrRebug=100U;
但是,此代码不会导致总线或内存管理错误。这是因为PSO5中没有MPU吗?还是我错过了别的什么?

以上来自于百度翻译


     以下为原文
  I'm trying to use the bus/memory/usage fault handlers to create simple exception logs.
So I have defined the following bus/memory/usage fault handlers and enabled the corresponding register flags:

CyIntSetSysVector(CY_INT_BUS_FAULT_IRQN, faultHandler);CyIntSetSysVector(CY_INT_MEM_MANAGE_IRQN, faultHandler);CyIntSetSysVector(CY_INT_USAGE_FAULT_IRQN, faultHandler); SCB->SHCSR |= SCB_SHCSR_USGFAULTENA_Msk | SCB_SHCSR_BUSFAULTENA_Msk | SCB_SHCSR_MEMFAULTENA_Msk; // enable Usage-/Bus-/MPU Fault

To verify the proper functioning of the bus fault handler, I've implemented the following code, according to an example project:

const uint32_t makingFault = 0u;uint32_t *ptrFault = (uint32_t *) &makingFault;*ptrFault = 100u;

However, this code does not lead to a bus or memory management fault. Is it due to the reason that there is no MPU available in PSoC5? Or did I miss something else?

回帖(1)

孙乙鑫

2018-9-12 10:12:52
你好,马丁,
是的,你的理解是正确的。在没有任何MPU的情况下编译pSOC5中的皮质M3。Mebug的异常数为0x04,保留在PSoC 5LP中。请使用PSoC 5lp从表4-2可以例外。PSoC 5LP除外。
最好的问候,
吉娜玛丽

以上来自于百度翻译


     以下为原文
  Hello Martin,
 
Yes, your understanding is correct. Cortex M3 in PSoC5 is compiled without any MPU. The exception number for MemFault is 0x04 and it is reserved in PSoC 5LP. Please make use of available exceptions in PSoC 5LP from Table 4-2. PSoC 5LP Exceptions.
 
Best Regards,
Geona Mary
举报

更多回帖

发帖
×
20
完善资料,
赚取积分