push {}

General discussions about working with the Astrobe IDE and programming ARM Cortex-M0, M3, M4 and M7 microcontrollers.
gray
Posts: 109
Joined: Tue Feb 12, 2019 2:59 am
Location: Mauritius

Re: push {}

Post by gray » Sat Dec 28, 2019 4:54 am

FWIW, I enable the handlers from my Exceptions.Init, which corresponds to your Traps.Init, both called from Main.mod, ie. right before the application code starts. At this point, I can simply write to SCB_SHCSR.

Code: Select all

CONST
  SCB_SHCSR = MCU.NVICBase + 0D24H;
  MEMFAULTENA = 16;
  BUSFAULTENA = 17;
  USGFAULTENA = 18;
  
PROCEDURE Init*;
  (* init vectors and stuff *)
  SYSTEM.PUT(SCB_SHCSR, {MEMFAULTENA , BUSFAULTENA, USGFAULTENA})
END Init;

Post Reply