Changes in APIs
New PxHndcall variants
New PxIntInitVectab and PxTrapInitVectab functions
In the TriCore PXROS-HR version, the interrupt and trap system was completely initialized by the PxInit
function. There is no need for user-specific customization of the interrupt and trap system.
In the ARM PXROS-HR version, to relax the hardware-related dependency of the low-level interrupt/trap system, new functions PxIntInitVectab
and PxTrapInitVectab
have been exposed to the user. These functions must be called before PxInit
, with the arguments being the pointers to user-defined functions for installing PXROS-HR interrupt and trap handlers.
These user-defined functions are usually part of BSP (Board Support Package). Their prototypes can be found in pxdef.h
.
void PxIntInitVectab(
PxInt_t maxintno,
ArmInstallExceptionHandler_t InstallInterruptHandler,
ArmInstallExceptionHandler_t InstallTrapHandler
);
void PxTrapInitVectab(
ArmInstallExceptionHandler_t InstallTrapHandler
);
Changes in API arguments
Interrupt handlers/service installation
All below-listed APIs for installing interrupt handlers/services contain additional arguments for setting the interrupt controller priority. Two least-urgent priorities (highest number priorities) are reserved by the PXROS-HR so that the user can use N-2
priorities, where N
is defined by the architecture, usually 8 or 16, depending on number of implemented bits in the NVIC register.
-
PxIntInstallHandler
-
PxIntInstallFastHandler
-
PxIntInstallFastContextHandler
-
PxIntInstallService
PxError_t PxIntInstallHandler(
PxInt_t intno,
PxUInt_t prio,
PxInterrupt_t intObj,
PxIntHandler_t inthandler,
PxArg_t arg
);
PxError_t PxIntInstallFastHandler(
PxInt_t intno,
PxUInt_t prio,
PxIntHandler_t inthandler,
PxArg_t arg
);
PxError_t PxIntInstallFastContextHandler(
PxInt_t intno,
PxUInt_t prio,
PxIntHandler_t inthandler,
PxArg_t arg
);
PxError_t PxIntInstallService(
PxInt_t intno,
PxUInt_t prio,
PxUInt_t service,
PxArg_t arg,
PxEvents_t events
);
PxTrapAbort
Two arguments present in the TriCore version of PXROS-HR are not present in the ARM version as they are irrelevant.
void PxTrapAbort (int trapno);
PxTrapInstallHandler
In PXROS-HR, this API installs the C-function handler as a trap handler for the trap class indicated by argument 'trapno'. Whenever this trap occurs, the handler is called with six arguments. In the ARM version, the arguments are:
-
the trap number.
-
a user defined argument.
-
identifier of the task that caused the trap.
-
contents of FSR (Fault Status Register).
-
contents of MMFAR (MemManage Fault Address Register) or BFAR (BusFault Address Register).
-
a pointer to the saved register frame.
Deprecated APIs
_PxHndcall
This PXROS-HR handler call is deprecated in the ARM version. Two new APIs providing more consistency and flexibility are implemented instead, see New PxHndcall variants.