1 Reply Latest reply on Jun 20, 2018 2:09 AM by geon

    CY8C5868AXI-LP035: Bus fault handler

    martin.zellweger_3055601

      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?