CY8C5868AXI-LP035: Bus fault handler

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MaZe_3055601
Level 1
Level 1
Welcome! First question asked

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?

0 Likes
1 Solution
GeonaP_26
Moderator
Moderator
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

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

View solution in original post

0 Likes
1 Reply
GeonaP_26
Moderator
Moderator
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

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

0 Likes