SYS/BIOS  7.00
Hwi.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020, Texas Instruments Incorporated - https://www.ti.com
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  *
32  */
323 /*
324  * ======== Hwi.h ========
325  */
326 
327 /* BIOS 6.x compatibility, use -Dxdc_std__include to disable */
329 #include <xdc/std.h>
332 #include <stdbool.h>
333 #include <stddef.h>
334 #include <stdint.h>
335 
336 #include <ti/sysbios/BIOS.h>
337 
339 
340 /*
341  * First time Hwi.h is included within a compilation unit:
342  * -undefine any previous Hwi_ short names
343  * -do short-to-long name conversions.
344  * -include all short-named Hwi API definitions.
345  *
346  * All subsequent includes:
347  * -undefine any previous Hwi_ short names
348  * -perform short-to-long name converions
349  * -Do not include short-named Hwi API definitins
350  * because the long name Hwi API definitions are
351  * already known to the compiler.
352  */
353 
355 #define do_hwi_undef_short_names
356 #define do_hwi_short_to_long_name_conversion
357 #include "Hwi_defs.h"
360 #ifndef ti_sysbios_family_arm_v6m_Hwi__include
361 #define ti_sysbios_family_arm_v6m_Hwi__include
362 
363 #include <ti/sysbios/hal/Hwi.h>
366 #ifdef __cplusplus
367 extern "C" {
368 #endif
369 
370 /*
371  * Error and Assert Ids
372  */
377 #define Hwi_E_badIntNum "intnum: %d is out of range"
378 
382 #define Hwi_E_alreadyDefined "Hwi already defined: intr# %d"
383 
388 #define Hwi_E_hwiLimitExceeded "Too many interrupts defined"
389 
393 #define Hwi_E_exception "hardware exception id = %d, pc = 0x%08x"
394 
398 #define Hwi_E_noIsr "no ISR, id = %d, pc = 0x%08x"
399 
403 #define Hwi_E_NMI "NMI: %s"
404 
408 #define Hwi_E_hardFault "Hard-fault: %s"
409 
413 #define Hwi_E_memFault "Mem-fault: %s, addresss: 0x%08x"
414 
418 #define Hwi_E_busFault "Bus-fault: %s, address: 0x%08x"
419 
423 #define Hwi_E_usageFault "Usage-fault: %s"
424 
428 #define Hwi_E_svCall "SvCall: svNum = %d"
429 
433 #define Hwi_E_debugMon "Debug-monitor: %s"
434 
438 #define Hwi_E_reserved "reserved %s %d"
439 
443 #define Hwi_E_stackOverflow "ISR stack overflow"
444 
445 typedef struct Hwi_Struct Hwi_Struct;
446 typedef struct Hwi_Struct Hwi_Object;
449 
451 /* included for backward compatibility with DPL but not required otherwise */
452 typedef struct Hwi_Struct Hwi_Struct2;
453 typedef struct Hwi_Struct2__ Hwi_Struct2__;
464 typedef struct Hwi_HookSet Hwi_HookSet;
466 typedef struct Hwi_Params Hwi_Params;
467 
471 typedef struct Hwi_NVIC Hwi_NVIC;
482 
486 typedef void (*Hwi_FuncPtr)(uintptr_t);
487 
491 typedef void (*Hwi_VectorFuncPtr)(void );
492 
497 
498 /* ExcHookFunc */
500 
509 struct Hwi_HookSet {
510  void (*registerFxn)(int arg1);
511  void (*createFxn)(Hwi_Handle arg1, Error_Block* arg2);
512  void (*beginFxn)(Hwi_Handle arg1);
513  void (*endFxn)(Hwi_Handle arg1);
514  void (*deleteFxn)(Hwi_Handle arg1);
515 };
516 
517 typedef struct { int length; const Hwi_HookSet *elem; } Hwi_Hook;
518 
534 };
535 
540 
547  size_t hwiStackPeak;
548  size_t hwiStackSize;
549  void * hwiStackBase;
550 };
551 
556 struct Hwi_CCR {
560  uint8_t STKALIGN;
561  uint8_t BFHFNMIGN;
565  uint8_t DIV_0_TRP;
566  uint8_t UNALIGN_TRP;
570  uint8_t USERSETMPEND;
571  uint8_t NONEBASETHRDENA;
572 };
577 struct Hwi_NVIC {
578  uint32_t RES_00;
579  uint32_t ICTR;
580  uint32_t RES_08;
581  uint32_t RES_0C;
582  uint32_t STCSR;
583  uint32_t STRVR;
584  uint32_t STCVR;
585  uint32_t STCALIB;
586  uint32_t RES_20 [56];
587  uint32_t ISER [8];
588  uint32_t RES_120 [24];
589  uint32_t ICER [8];
590  uint32_t RES_1A0 [24];
591  uint32_t ISPR [8];
592  uint32_t RES_220 [24];
593  uint32_t ICPR [8];
594  uint32_t RES_2A0 [24];
595  uint32_t IABR [8];
596  uint32_t RES_320 [56];
597  uint8_t IPR [240];
598  uint32_t RES_4F0 [516];
599  uint32_t CPUIDBR;
600  uint32_t ICSR;
601  uint32_t VTOR;
602  uint32_t AIRCR;
603  uint32_t SCR;
604  uint32_t CCR;
605  uint8_t SHPR[12];
606  uint32_t SHCSR;
607  uint8_t MMFSR;
608  uint8_t BFSR;
609  uint16_t UFSR;
610  uint32_t HFSR;
611  uint32_t DFSR;
612  uint32_t MMAR;
613  uint32_t BFAR;
614  uint32_t AFSR;
615  uint32_t PFR0;
616  uint32_t PFR1;
617  uint32_t DFR0;
618  uint32_t AFR0;
619  uint32_t MMFR0;
620  uint32_t MMFR1;
621  uint32_t MMFR2;
622  uint32_t MMFR3;
623  uint32_t ISAR0;
624  uint32_t ISAR1;
625  uint32_t ISAR2;
626  uint32_t ISAR3;
627  uint32_t ISAR4;
628  uint32_t RES_D74[5];
629  uint32_t CPACR;
630  uint32_t RES_D8C[93];
631  uint32_t STI;
632  uint32_t RES_F04[12];
633  uint32_t FPCCR;
634  uint32_t FPCAR;
635  uint32_t FPDSCR;
636  uint32_t MVFR0;
637  uint32_t MVFR1;
638  uint32_t RES_F48[34];
639  uint32_t PID4;
640  uint32_t PID5;
641  uint32_t PID6;
642  uint32_t PID7;
643  uint32_t PID0;
644  uint32_t PID1;
645  uint32_t PID2;
646  uint32_t PID3;
647  uint32_t CID0;
648  uint32_t CID1;
649  uint32_t CID2;
650  uint32_t CID3;
651 };
652 
657 extern volatile Hwi_NVIC Hwi_nvic;
658 
664  void * threadHandle;
665  void * threadStack;
667  void * r0;
668  void * r1;
669  void * r2;
670  void * r3;
671  void * r4;
672  void * r5;
673  void * r6;
674  void * r7;
675  void * r8;
676  void * r9;
677  void * r10;
678  void * r11;
679  void * r12;
680  void * sp;
681  void * lr;
682  void * pc;
683  void * psr;
684  void * ICSR;
685  void * MMFSR;
686  void * BFSR;
687  void * UFSR;
688  void * HFSR;
689  void * DFSR;
690  void * MMAR;
691  void * BFAR;
692  void * AFSR;
693 };
694 
695 /* Module_State */
697  char *taskSP; /* 0x0 */
698  bool excActive; /* 0x4 */
699  void * excContext; /* 0x8 */
700  void * excStack; /* 0xc */
701  void * isrStack; /* 0x10 */
702  void * isrStackBase; /* 0x14 */
703  unsigned int swiTaskKeys; /* 0x18 */
704  void * isrStackSize;
707  volatile bool vnvicFlushRequired;
708  uint8_t *intAffinity;
709  uint32_t *intAffinityMasks;
711  bool initDone;
712 };
713 
714 /* Object */
715 struct Hwi_Struct {
719  uintptr_t arg;
721  uintptr_t irp;
731  uint8_t priority;
732  int16_t intNum;
733  void * *hookEnv;
734 };
735 
739 typedef void (*Hwi_ExcHandlerFuncPtr)(unsigned int* arg1, unsigned int arg2);
740 
757 extern const bool Hwi_dispatcherAutoNestingSupport;
758 
774 extern const bool Hwi_dispatcherSwiSupport;
775 
791 extern const bool Hwi_dispatcherTaskSupport;
792 
806 extern const bool Hwi_dispatcherIrpTrackingSupport;
815 extern const int Hwi_NUM_INTERRUPTS;
816 
823 extern const int Hwi_NUM_PRIORITIES;
824 
829 extern const Hwi_Hook Hwi_hooks;
830 
835 extern const Hwi_VectorFuncPtr Hwi_nullIsrFunc;
836 
869 extern const Hwi_ExcHandlerFuncPtr Hwi_excHandlerFunc;
885 extern const Hwi_ExcHookFunc Hwi_excHookFunc;
886 
909 extern const unsigned int Hwi_disablePriority;
910 
940 extern const unsigned int Hwi_priGroup;
941 
973 extern const unsigned int Hwi_numSparseInterrupts;
974 
981 extern const uint32_t Hwi_ccr;
984 struct Hwi_Params {
989  Hwi_MaskingOption maskSetting;
993  uintptr_t arg;
997  bool enableInt;
1004  int eventId;
1035 };
1036 
1074 extern unsigned int Hwi_Disable();
1075 
1108 extern unsigned int Hwi_Enable();
1109 
1132 extern void Hwi_Restore(uint32_t key);
1133 
1135 extern void Hwi_init(void);
1136 
1137 /* Instance_init */
1138 extern int Hwi_Instance_init(Hwi_Object *obj, int intNum, Hwi_FuncPtr hwiFxn, const Hwi_Params *prms, Error_Block *eb);
1139 
1140 /* Instance_finalize */
1141 extern void Hwi_Instance_finalize(Hwi_Object *obj, int ec);
1144 extern Hwi_Handle Hwi_create(int intNum, Hwi_FuncPtr hwiFxn, const Hwi_Params *prms, Error_Block *eb);
1145 
1146 extern Hwi_Handle Hwi_construct(Hwi_Struct *obj, int intNum, Hwi_FuncPtr hwiFxn, const Hwi_Params *prms, Error_Block *eb);
1147 
1148 extern void Hwi_delete(Hwi_Handle *handle);
1149 
1150 extern void Hwi_destruct(Hwi_Struct *obj);
1151 
1217 extern bool Hwi_getStackInfo(Hwi_StackInfo *stkInfo, bool computeStackDepth);
1218 
1289 extern bool Hwi_getCoreStackInfo(Hwi_StackInfo *stkInfo, bool computeStackDepth, unsigned int coreId);
1298 extern void Hwi_startup(void);
1299 
1304 extern void Hwi_switchFromBootStack(void);
1312 extern void Hwi_post(unsigned int intNum);
1313 
1322 extern char *Hwi_getTaskSP(void);
1334 extern unsigned int Hwi_disableInterrupt(unsigned int intNum);
1335 
1345 extern unsigned int Hwi_enableInterrupt(unsigned int intNum);
1346 
1357 extern void Hwi_restoreInterrupt(unsigned int intNum, unsigned int key);
1358 
1367 extern void Hwi_clearInterrupt(unsigned int intNum);
1368 
1377 extern Hwi_FuncPtr Hwi_getFunc(Hwi_Handle hwi, uintptr_t *arg);
1378 
1405 extern void Hwi_setFunc(Hwi_Handle hwi, Hwi_FuncPtr fxn, uintptr_t arg);
1406 
1415 extern void * Hwi_getHookContext(Hwi_Handle hwi, int id);
1416 
1424 extern void Hwi_setHookContext(Hwi_Handle hwi, int id, void * hookContext);
1425 
1433 extern uintptr_t Hwi_getIrp(Hwi_Handle hwi);
1434 
1451 extern void Hwi_plug(unsigned int intNum, void *fxn);
1452 
1460 extern Hwi_Handle Hwi_getHandle(unsigned int intNum);
1461 
1476 extern void Hwi_setPriority(unsigned int intNum, unsigned int priority);
1477 
1484 extern void Hwi_excSetBuffers(void * excContextBuffer, void * excStackBuffer);
1485 
1493 extern void Hwi_reconfig(Hwi_Handle hwi, Hwi_FuncPtr fxn, const Hwi_Params *params);
1494 
1496 extern Hwi_Handle Hwi_construct2(Hwi_Struct2 *hwi, int intNum, Hwi_FuncPtr hwiFxn, const Hwi_Params *prms);
1497 extern void Hwi_initNVIC(void);
1498 extern void Hwi_initStacks(void * hwiStack);
1499 extern int Hwi_postInit(Hwi_Object *hwi, Error_Block *eb);
1500 extern void Hwi_excHandlerAsm(void);
1501 extern void Hwi_excHandler(unsigned int *excStack, unsigned int lr);
1502 extern void Hwi_excHandlerMin(unsigned int *excStack, unsigned int lr);
1503 extern void Hwi_excHandlerMax(unsigned int *excStack, unsigned int lr);
1504 extern void Hwi_excFillContext(unsigned int *excStack);
1505 extern void Hwi_excNmi(unsigned int *excStack);
1506 extern void Hwi_excHardFault(unsigned int *excStack);
1507 extern void Hwi_excMemFault(unsigned int *excStack);
1508 extern void Hwi_excBusFault(unsigned int *excStack);
1509 extern void Hwi_excUsageFault(unsigned int *excStack);
1510 extern void Hwi_excSvCall(unsigned int *excStack);
1511 extern void Hwi_excDebugMon(unsigned int *excStack);
1512 extern void Hwi_excReserved(unsigned int *excStack, unsigned int excNum);
1513 extern void Hwi_excNoIsr(unsigned int *excStack, unsigned int excNum);
1514 extern void Hwi_excDumpRegs(unsigned int lr);
1515 extern void Hwi_pendSV(void);
1516 extern void Hwi_setStackLimit(void * stackBase);
1517 extern unsigned int Hwi_swiDisableNull(void);
1518 extern void Hwi_swiRestoreNull(unsigned int key);
1519 extern void Hwi_dispatch(void);
1520 extern unsigned int Hwi_dispatchC(uintptr_t irp, uint32_t dummy1, uint32_t dummy2, Hwi_Object *hwi);
1521 extern void Hwi_doSwiRestore(unsigned int tskKey);
1522 extern void Hwi_doTaskRestore(unsigned int tskKey);
1523 extern unsigned int Hwi_swiDisable();
1524 extern void Hwi_swiRestore(unsigned int key);
1525 extern void Hwi_swiRestoreHwi(unsigned int key);
1526 extern unsigned int Hwi_taskDisable();
1527 extern void Hwi_taskRestoreHwi(unsigned int key);
1535 extern void Hwi_switchFromBootStack(void);
1536 
1537 /* checkStack */
1538 extern void Hwi_checkStack(void);
1539 
1540 /* initStack */
1541 extern void Hwi_initStack(void);
1542 
1543 /* initStackMin */
1544 extern void Hwi_initStackMin(void);
1545 
1546 /* switchAndRunFunc */
1547 extern void Hwi_switchAndRunFunc(void (*func)(void));
1550 /*
1551  * ======== SYSTEM FUNCTIONS ========
1552  */
1553 
1554 /* Params_init */
1555 extern void Hwi_Params_init(Hwi_Params *prms);
1556 
1558 /* Params_copy */
1559 extern void Hwi_Params_copy(Hwi_Params *dst, Hwi_Params *src);
1562 /* Object_first */
1563 extern Hwi_Handle Hwi_Object_first(void);
1564 
1565 /* Object_next */
1566 extern Hwi_Handle Hwi_Object_next(Hwi_Object *obj);
1567 
1568 /*
1569  * ======== STATE STRUCTURES ========
1570  */
1571 
1573 extern Hwi_Module_State Hwi_Module_state;
1574 
1575 #define Hwi_module ((Hwi_Module_State *) &(Hwi_Module_state))
1576 
1577 #define Hwi_Object_heap() NULL
1578 
1579 static inline Hwi_Handle Hwi_handle(Hwi_Struct *str)
1580 {
1581  return ((Hwi_Handle)str);
1582 }
1583 
1584 static inline Hwi_Struct * Hwi_struct(Hwi_Handle h)
1585 {
1586  return ((Hwi_Struct *)h);
1587 }
1590 #ifdef __cplusplus
1591 }
1592 #endif
1593 
1594 #endif /* ti_sysbios_family_arm_v6m_Hwi__include */
1595 
1597 #if defined(ti_sysbios_family_arm_v6m_Hwi__nolocalnames)
1598 #define do_hwi_undef_short_names
1599 #include "Hwi_defs.h"
1600 #endif
1601 
void * r0
Definition: Hwi.h:667
void * hwiStackBase
Definition: Hwi.h:549
void Hwi_destruct(Hwi_Struct *obj)
uint32_t PID0
Definition: Hwi.h:643
const int Hwi_NUM_INTERRUPTS
The Cortex M0 NVIC supports up to 256 interrupts/exceptions.
bool enableInt
Enable this interrupt when object is created? Default is true.
Definition: Hwi.h:997
void * BFAR
Definition: Hwi.h:691
uint32_t PID2
Definition: Hwi.h:645
uint8_t * intAffinity
Definition: Hwi.h:708
void Hwi_setFunc(Hwi_Handle hwi, Hwi_FuncPtr fxn, uintptr_t arg)
Overwrite Hwi function and arg.
void(* deleteFxn)(Hwi_Handle arg1)
Definition: Hwi.h:514
uint8_t MMFSR
Definition: Hwi.h:607
uint32_t ISAR1
Definition: Hwi.h:624
int priority
Interrupt priority.
Definition: Hwi.h:1014
Hwi_Handle Hwi_getHandle(unsigned int intNum)
Returns Hwi_handle associated with intNum.
void(* Hwi_ExcHandlerFuncPtr)(unsigned int *arg1, unsigned int arg2)
Hwi exception handler function type definition.
Definition: Hwi.h:739
BIOS_ThreadType
Current thread type definitions.
Definition: BIOS.h:189
const unsigned int Hwi_numSparseInterrupts
If Hwi.dispatchTableSize is initialized by the user then Hwi.numSparseInterrupts is set to the value ...
uint32_t AIRCR
Definition: Hwi.h:602
size_t hwiStackPeak
Definition: Hwi.h:547
uint32_t CID1
Definition: Hwi.h:648
uint32_t BFAR
Definition: Hwi.h:613
uint16_t UFSR
Definition: Hwi.h:609
uint32_t SHCSR
Definition: Hwi.h:606
uint32_t CPACR
Definition: Hwi.h:629
const unsigned int Hwi_priGroup
The PRIGROUP setting. Default is 0.
void * excStack
Definition: Hwi.h:700
void * r9
Definition: Hwi.h:676
void * MMFSR
Definition: Hwi.h:685
void * dispatchTable
Definition: Hwi.h:706
void ** hookEnv
Definition: Hwi.h:733
char * taskSP
Definition: Hwi.h:697
uint32_t SCR
Definition: Hwi.h:603
void * UFSR
Definition: Hwi.h:687
void * r7
Definition: Hwi.h:674
void * r5
Definition: Hwi.h:672
uint32_t STRVR
Definition: Hwi.h:583
volatile Hwi_NVIC Hwi_nvic
Physical Nested Vectored Interrupt Controller Device. short name is "Hwi_nvic" long name is "ti_sysbi...
uint32_t VTOR
Definition: Hwi.h:601
void Hwi_setHookContext(Hwi_Handle hwi, int id, void *hookContext)
Set hook instance&#39;s context for a Hwi.
unsigned int Hwi_Disable()
Globally disable interrupts.
uint8_t priority
Interrupt priority.
Definition: Hwi.h:731
void Hwi_excSetBuffers(void *excContextBuffer, void *excStackBuffer)
Set the exception context and stack buffer pointers.
uint32_t FPCCR
Definition: Hwi.h:633
uint32_t PID6
Definition: Hwi.h:641
uint32_t PFR0
Definition: Hwi.h:615
uint32_t MVFR0
Definition: Hwi.h:636
uint32_t MMFR0
Definition: Hwi.h:619
Definition: Hwi.h:984
Only this interrupt is disabled (not support on cortexM devices)
Definition: Hwi.h:529
Hwi_Struct * Hwi_Instance
Definition: Hwi.h:448
void * vectorTableBase
Definition: Hwi.h:705
unsigned int Hwi_Enable()
Globally enable interrupts.
void * ICSR
Definition: Hwi.h:684
All interrupts are disabled (not support on cortexM devices)
Definition: Hwi.h:527
bool Hwi_getStackInfo(Hwi_StackInfo *stkInfo, bool computeStackDepth)
Get Hwi stack usage Info.
uint32_t STCSR
Definition: Hwi.h:582
void * r3
Definition: Hwi.h:670
void * r1
Definition: Hwi.h:668
uint32_t ISAR2
Definition: Hwi.h:625
Definition: Hwi.h:715
size_t hwiStackSize
Definition: Hwi.h:548
bool useDispatcher
Use the interrupt dispatcher with this interrupt. Default is true.
Definition: Hwi.h:1034
bool initDone
Definition: Hwi.h:711
All current and lower priority interrupts are disabled. (default for all cortexM devices) ...
Definition: Hwi.h:533
void Hwi_Restore(uint32_t key)
restore global interrupts to the state they were in prior Hwi_disable().
uint32_t FPCAR
Definition: Hwi.h:634
void * r6
Definition: Hwi.h:673
unsigned int Hwi_enableInterrupt(unsigned int intNum)
Enable a specific interrupt.
void * BFSR
Definition: Hwi.h:686
Runtime error manager.
Hwi_Handle Hwi_create(int intNum, Hwi_FuncPtr hwiFxn, const Hwi_Params *prms, Error_Block *eb)
uint32_t PID7
Definition: Hwi.h:642
uint32_t DFR0
Definition: Hwi.h:617
void(* Hwi_FuncPtr)(uintptr_t)
Hwi create function type definition.
Definition: Hwi.h:486
const unsigned int Hwi_disablePriority
The priority that BASEPRI is set to by Hwi_disable().
uint32_t RES_08
Definition: Hwi.h:580
User supplies interrupt enable masks (not support on cortexM devices)
Definition: Hwi.h:531
void * HFSR
Definition: Hwi.h:688
uint32_t CID3
Definition: Hwi.h:650
void * r2
Definition: Hwi.h:669
uint32_t PID4
Definition: Hwi.h:639
Hwi_MaskingOption
Interrupt masking options.
Definition: Hwi.h:523
void * excContext
Definition: Hwi.h:699
const int Hwi_NUM_PRIORITIES
The Cortex M0 NVIC supports up to 256 interrupt priorities.
Definition: Hwi.h:517
void Hwi_delete(Hwi_Handle *handle)
void Hwi_post(unsigned int intNum)
Generate an interrupt for test purposes.
Hwi_Handle Hwi_Object_next(Hwi_Object *obj)
Hwi_Handle Hwi_construct(Hwi_Struct *obj, int intNum, Hwi_FuncPtr hwiFxn, const Hwi_Params *prms, Error_Block *eb)
uint32_t ISAR4
Definition: Hwi.h:627
No interrupts are disabled (not support on cortexM devices)
Definition: Hwi.h:525
void * r10
Definition: Hwi.h:677
uint32_t MMFR3
Definition: Hwi.h:622
unsigned int Hwi_disableInterrupt(unsigned int intNum)
Disable a specific interrupt.
uint32_t ICTR
Definition: Hwi.h:579
uint32_t CCR
Definition: Hwi.h:604
SYS/BIOS Top-Level Manager.
void * pc
Definition: Hwi.h:682
Error block.
Definition: Error.h:152
void Hwi_Params_init(Hwi_Params *prms)
void * sp
Definition: Hwi.h:680
void(* Hwi_VectorFuncPtr)(void)
Hwi vector function type definition.
Definition: Hwi.h:491
uint32_t ISAR0
Definition: Hwi.h:623
void * r12
Definition: Hwi.h:679
void * MMAR
Definition: Hwi.h:690
void * AFSR
Definition: Hwi.h:692
void * DFSR
Definition: Hwi.h:689
uint8_t BFSR
Definition: Hwi.h:608
Nested Vectored Interrupt Controller.
Definition: Hwi.h:577
uint32_t CPUIDBR
Definition: Hwi.h:599
void(* beginFxn)(Hwi_Handle arg1)
Definition: Hwi.h:512
Hwi_FuncPtr fxn
Definition: Hwi.h:720
void(* endFxn)(Hwi_Handle arg1)
Definition: Hwi.h:513
uint32_t ICSR
Definition: Hwi.h:600
void Hwi_reconfig(Hwi_Handle hwi, Hwi_FuncPtr fxn, const Hwi_Params *params)
Reconfigure a dispatched interrupt.
Hwi_FuncPtr Hwi_getFunc(Hwi_Handle hwi, uintptr_t *arg)
Get Hwi function and arg.
uint32_t FPDSCR
Definition: Hwi.h:635
uintptr_t irp
Definition: Hwi.h:721
uintptr_t arg
ISR function argument. Default is 0.
Definition: Hwi.h:719
int length
Definition: Hwi.h:517
uint32_t AFR0
Definition: Hwi.h:618
uint32_t PID3
Definition: Hwi.h:646
int eventId
Interrupt event ID (Interrupt Selection Number)
Definition: Hwi.h:1004
void * psr
Definition: Hwi.h:683
uint32_t AFSR
Definition: Hwi.h:614
BIOS_ThreadType threadType
Definition: Hwi.h:663
void Hwi_plug(unsigned int intNum, void *fxn)
Plug a non dispatched interrupt vector with an ISR address.
volatile bool vnvicFlushRequired
Definition: Hwi.h:707
void Hwi_restoreInterrupt(unsigned int intNum, unsigned int key)
Restore a specific interrupt&#39;s enabled/disabled state.
uint32_t DFSR
Definition: Hwi.h:611
void * isrStackSize
Definition: Hwi.h:704
Exception Context - Register contents at the time of an exception.
Definition: Hwi.h:662
void * isrStackBase
Definition: Hwi.h:702
void Hwi_setPriority(unsigned int intNum, unsigned int priority)
Set an interrupt&#39;s relative priority.
uint32_t PID5
Definition: Hwi.h:640
Hwi_VectorFuncPtr * vectorTable
Definition: Hwi.h:710
Hwi_Struct * Hwi_Handle
Definition: Hwi.h:447
uint32_t MMFR1
Definition: Hwi.h:620
uint32_t STCVR
Definition: Hwi.h:584
uint32_t MMAR
Definition: Hwi.h:612
Definition: Hwi.h:696
unsigned int swiTaskKeys
Definition: Hwi.h:703
const Hwi_ExcHookFunc Hwi_excHookFunc
User Exception hook function.
Hwi_MaskingOption maskSetting
maskSetting. Default is Hwi_MaskingOption "Hwi_MaskingOption_SELF"
Definition: Hwi.h:989
uint32_t MVFR1
Definition: Hwi.h:637
void(* registerFxn)(int arg1)
Definition: Hwi.h:510
uint32_t RES_0C
Definition: Hwi.h:581
void * threadHandle
Definition: Hwi.h:664
uintptr_t arg
ISR function argument. Default is 0.
Definition: Hwi.h:993
Hwi_Handle Hwi_Object_first(void)
uint32_t STI
Definition: Hwi.h:631
uint32_t CID2
Definition: Hwi.h:649
uint32_t CID0
Definition: Hwi.h:647
void * Hwi_getHookContext(Hwi_Handle hwi, int id)
Get hook instance&#39;s context for a Hwi.
size_t threadStackSize
Definition: Hwi.h:666
uintptr_t Hwi_getIrp(Hwi_Handle hwi)
Get address of interrupted instruction.
void * lr
Definition: Hwi.h:681
Structure contains Hwi stack usage info.
Definition: Hwi.h:546
int16_t intNum
Definition: Hwi.h:732
uint32_t ISAR3
Definition: Hwi.h:626
void * r8
Definition: Hwi.h:675
uint32_t RES_00
Definition: Hwi.h:578
void * r11
Definition: Hwi.h:678
uint32_t STCALIB
Definition: Hwi.h:585
SecureCB_Arg arg
Definition: SecureCB.h:146
void * r4
Definition: Hwi.h:671
void(* createFxn)(Hwi_Handle arg1, Error_Block *arg2)
Definition: Hwi.h:511
uint32_t MMFR2
Definition: Hwi.h:621
void(* Hwi_ExceptionHookFuncPtr)(Hwi_ExcContext *arg1)
Exception hook function type definition.
Definition: Hwi.h:496
bool excActive
Definition: Hwi.h:698
void * threadStack
Definition: Hwi.h:665
Hwi hook set type definition.
Definition: Hwi.h:509
uint32_t PFR1
Definition: Hwi.h:616
void Hwi_clearInterrupt(unsigned int intNum)
Clear a specific interrupt.
void * isrStack
Definition: Hwi.h:701
uint32_t HFSR
Definition: Hwi.h:610
uint32_t * intAffinityMasks
Definition: Hwi.h:709
uint32_t PID1
Definition: Hwi.h:644
Hwi_ExceptionHookFuncPtr Hwi_ExcHookFunc
Definition: Hwi.h:499
© Copyright 1995-2021, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale