2 * @brief Error Signaling Module Driver Header File
10 * which are relevant for the Esm driver.
13 /* (c) Texas Instruments 2010, All rights reserved. */
20 /* USER CODE BEGIN (0) */
24 /* ESM General Definitions */
27 * @brief Alias name for ESM group 1
29 * This is an alias name for the ESM group 1.
31 * @note This value should be used for API argument @a group
36 * @brief Alias name for ESM group 2
38 * This is an alias name for the ESM group 2.
40 * @note This value should be used for API argument @a group
45 * @brief Alias name for ESM group 3
47 * This is an alias name for the ESM group 3.
49 * @note This value should be used for API argument @a group
54 * @brief Alias name for ESM group x channel 0
56 * This is an alias name for the ESM group x channel 0.
58 * @note This value should be used for API argument @a channel
60 #define esmCHANNEL0 0x0000000000000001ULL
63 * @brief Alias name for ESM group x channel 1
65 * This is an alias name for the ESM group x channel 1.
67 * @note This value should be used for API argument @a channel
69 #define esmCHANNEL1 0x0000000000000002ULL
72 * @brief Alias name for ESM group x channel 2
74 * This is an alias name for the ESM group x channel 2.
76 * @note This value should be used for API argument @a channel
78 #define esmCHANNEL2 0x0000000000000004ULL
81 * @brief Alias name for ESM group x channel 3
83 * This is an alias name for the ESM group x channel 3.
85 * @note This value should be used for API argument @a channel
87 #define esmCHANNEL3 0x0000000000000008ULL
90 * @brief Alias name for ESM group x channel 4
92 * This is an alias name for the ESM group x channel 4.
94 * @note This value should be used for API argument @a channel
96 #define esmCHANNEL4 0x0000000000000010ULL
99 * @brief Alias name for ESM group x channel 5
101 * This is an alias name for the ESM group x channel 5.
103 * @note This value should be used for API argument @a channel
105 #define esmCHANNEL5 0x0000000000000020ULL
108 * @brief Alias name for ESM group x channel 6
110 * This is an alias name for the ESM group x channel 6.
112 * @note This value should be used for API argument @a channel
114 #define esmCHANNEL6 0x0000000000000040ULL
117 * @brief Alias name for ESM group x channel 7
119 * This is an alias name for the ESM group x channel 7.
121 * @note This value should be used for API argument @a channel
123 #define esmCHANNEL7 0x0000000000000080ULL
126 * @brief Alias name for ESM group x channel 8
128 * This is an alias name for the ESM group x channel 8.
130 * @note This value should be used for API argument @a channel
132 #define esmCHANNEL8 0x0000000000000100ULL
135 * @brief Alias name for ESM group x channel 9
137 * This is an alias name for the ESM group x channel 9.
139 * @note This value should be used for API argument @a channel
141 #define esmCHANNEL9 0x0000000000000200ULL
143 /** @def esmCHANNEL10
144 * @brief Alias name for ESM group x channel 10
146 * This is an alias name for the ESM group x channel 10.
148 * @note This value should be used for API argument @a channel
150 #define esmCHANNEL10 0x0000000000000400ULL
152 /** @def esmCHANNEL11
153 * @brief Alias name for ESM group x channel 11
155 * This is an alias name for the ESM group x channel 11.
157 * @note This value should be used for API argument @a channel
159 #define esmCHANNEL11 0x0000000000000800ULL
161 /** @def esmCHANNEL12
162 * @brief Alias name for ESM group x channel 12
164 * This is an alias name for the ESM group x channel 12.
166 * @note This value should be used for API argument @a channel
168 #define esmCHANNEL12 0x0000000000001000ULL
170 /** @def esmCHANNEL13
171 * @brief Alias name for ESM group x channel 13
173 * This is an alias name for the ESM group x channel 13.
175 * @note This value should be used for API argument @a channel
177 #define esmCHANNEL13 0x0000000000002000ULL
179 /** @def esmCHANNEL14
180 * @brief Alias name for ESM group x channel 14
182 * This is an alias name for the ESM group x channel 14.
184 * @note This value should be used for API argument @a channel
186 #define esmCHANNEL14 0x0000000000004000ULL
188 /** @def esmCHANNEL15
189 * @brief Alias name for ESM group x channel 15
191 * This is an alias name for the ESM group x channel 15.
193 * @note This value should be used for API argument @a channel
195 #define esmCHANNEL15 0x0000000000008000ULL
197 /** @def esmCHANNEL16
198 * @brief Alias name for ESM group x channel 16
200 * This is an alias name for the ESM group x channel 16.
202 * @note This value should be used for API argument @a channel
204 #define esmCHANNEL16 0x0000000000010000ULL
206 /** @def esmCHANNEL17
207 * @brief Alias name for ESM group x channel 17
209 * This is an alias name for the ESM group x channel 17.
211 * @note This value should be used for API argument @a channel
213 #define esmCHANNEL17 0x0000000000020000ULL
215 /** @def esmCHANNEL18
216 * @brief Alias name for ESM group x channel 18
218 * This is an alias name for the ESM group x channel 18.
220 * @note This value should be used for API argument @a channel
222 #define esmCHANNEL18 0x0000000000040000ULL
224 /** @def esmCHANNEL19
225 * @brief Alias name for ESM group x channel 19
227 * This is an alias name for the ESM group x channel 19.
229 * @note This value should be used for API argument @a channel
231 #define esmCHANNEL19 0x0000000000080000ULL
233 /** @def esmCHANNEL20
234 * @brief Alias name for ESM group x channel 20
236 * This is an alias name for the ESM group x channel 20.
238 * @note This value should be used for API argument @a channel
240 #define esmCHANNEL20 0x0000000000100000ULL
242 /** @def esmCHANNEL21
243 * @brief Alias name for ESM group x channel 21
245 * This is an alias name for the ESM group x channel 21.
247 * @note This value should be used for API argument @a channel
249 #define esmCHANNEL21 0x0000000000200000ULL
251 /** @def esmCHANNEL22
252 * @brief Alias name for ESM group x channel 22
254 * This is an alias name for the ESM group x channel 22.
256 * @note This value should be used for API argument @a channel
258 #define esmCHANNEL22 0x0000000000400000ULL
260 /** @def esmCHANNEL23
261 * @brief Alias name for ESM group x channel 23
263 * This is an alias name for the ESM group x channel 23.
265 * @note This value should be used for API argument @a channel
267 #define esmCHANNEL23 0x0000000000800000ULL
269 /** @def esmCHANNEL24
270 * @brief Alias name for ESM group x channel 24
272 * This is an alias name for the ESM group x channel 24.
274 * @note This value should be used for API argument @a channel
276 #define esmCHANNEL24 0x0000000001000000ULL
278 /** @def esmCHANNEL25
279 * @brief Alias name for ESM group x channel 25
281 * This is an alias name for the ESM group x channel 25.
283 * @note This value should be used for API argument @a channel
285 #define esmCHANNEL25 0x0000000002000000ULL
287 /** @def esmCHANNEL26
288 * @brief Alias name for ESM group x channel 26
290 * This is an alias name for the ESM group x channel 26.
292 * @note This value should be used for API argument @a channel
294 #define esmCHANNEL26 0x0000000004000000ULL
296 /** @def esmCHANNEL27
297 * @brief Alias name for ESM group x channel 27
299 * This is an alias name for the ESM group x channel 27.
301 * @note This value should be used for API argument @a channel
303 #define esmCHANNEL27 0x0000000008000000ULL
305 /** @def esmCHANNEL28
306 * @brief Alias name for ESM group x channel 28
308 * This is an alias name for the ESM group x channel 28.
310 * @note This value should be used for API argument @a channel
312 #define esmCHANNEL28 0x0000000010000000ULL
314 /** @def esmCHANNEL29
315 * @brief Alias name for ESM group x channel 29
317 * This is an alias name for the ESM group x channel 29.
319 * @note This value should be used for API argument @a channel
321 #define esmCHANNEL29 0x0000000020000000ULL
323 /** @def esmCHANNEL30
324 * @brief Alias name for ESM group x channel 30
326 * This is an alias name for the ESM group x channel 30.
328 * @note This value should be used for API argument @a channel
330 #define esmCHANNEL30 0x0000000040000000ULL
332 /** @def esmCHANNEL31
333 * @brief Alias name for ESM group x channel 31
335 * This is an alias name for the ESM group x channel 31.
337 * @note This value should be used for API argument @a channel
339 #define esmCHANNEL31 0x0000000080000000ULL
341 /** @def esmCHANNEL32
342 * @brief Alias name for ESM group x channel 32
344 * This is an alias name for the ESM group x channel 32.
346 * @note This value should be used for API argument @a channel
348 #define esmCHANNEL32 0x0000000100000000ULL
350 /** @def esmCHANNEL33
351 * @brief Alias name for ESM group x channel 33
353 * This is an alias name for the ESM group x channel 33.
355 * @note This value should be used for API argument @a channel
357 #define esmCHANNEL33 0x0000000200000000ULL
359 /** @def esmCHANNEL34
360 * @brief Alias name for ESM group x channel 34
362 * This is an alias name for the ESM group x channel 34.
364 * @note This value should be used for API argument @a channel
366 #define esmCHANNEL34 0x0000000400000000ULL
368 /** @def esmCHANNEL35
369 * @brief Alias name for ESM group x channel 35
371 * This is an alias name for the ESM group x channel 35.
373 * @note This value should be used for API argument @a channel
375 #define esmCHANNEL35 0x0000000800000000ULL
377 /** @def esmCHANNEL36
378 * @brief Alias name for ESM group x channel 36
380 * This is an alias name for the ESM group x channel 36.
382 * @note This value should be used for API argument @a channel
384 #define esmCHANNEL36 0x0000001000000000ULL
386 /** @def esmCHANNEL37
387 * @brief Alias name for ESM group x channel 37
389 * This is an alias name for the ESM group x channel 37.
391 * @note This value should be used for API argument @a channel
393 #define esmCHANNEL37 0x0000002000000000ULL
395 /** @def esmCHANNEL38
396 * @brief Alias name for ESM group x channel 38
398 * This is an alias name for the ESM group x channel 38.
400 * @note This value should be used for API argument @a channel
402 #define esmCHANNEL38 0x0000004000000000ULL
404 /** @def esmCHANNEL39
405 * @brief Alias name for ESM group x channel 39
407 * This is an alias name for the ESM group x channel 39.
409 * @note This value should be used for API argument @a channel
411 #define esmCHANNEL39 0x0000008000000000ULL
413 /** @def esmCHANNEL40
414 * @brief Alias name for ESM group x channel 40
416 * This is an alias name for the ESM group x channel 40.
418 * @note This value should be used for API argument @a channel
420 #define esmCHANNEL40 0x0000010000000000ULL
422 /** @def esmCHANNEL41
423 * @brief Alias name for ESM group x channel 41
425 * This is an alias name for the ESM group x channel 41.
427 * @note This value should be used for API argument @a channel
429 #define esmCHANNEL41 0x0000020000000000ULL
431 /** @def esmCHANNEL42
432 * @brief Alias name for ESM group x channel 42
434 * This is an alias name for the ESM group x channel 42.
436 * @note This value should be used for API argument @a channel
438 #define esmCHANNEL42 0x0000040000000000ULL
440 /** @def esmCHANNEL43
441 * @brief Alias name for ESM group x channel 43
443 * This is an alias name for the ESM group x channel 43.
445 * @note This value should be used for API argument @a channel
447 #define esmCHANNEL43 0x0000080000000000ULL
449 /** @def esmCHANNEL44
450 * @brief Alias name for ESM group x channel 44
452 * This is an alias name for the ESM group x channel 44.
454 * @note This value should be used for API argument @a channel
456 #define esmCHANNEL44 0x0000100000000000ULL
458 /** @def esmCHANNEL45
459 * @brief Alias name for ESM group x channel 45
461 * This is an alias name for the ESM group x channel 45.
463 * @note This value should be used for API argument @a channel
465 #define esmCHANNEL45 0x0000200000000000ULL
467 /** @def esmCHANNEL46
468 * @brief Alias name for ESM group x channel 46
470 * This is an alias name for the ESM group x channel 46.
472 * @note This value should be used for API argument @a channel
474 #define esmCHANNEL46 0x0000400000000000ULL
476 /** @def esmCHANNEL47
477 * @brief Alias name for ESM group x channel 47
479 * This is an alias name for the ESM group x channel 47.
481 * @note This value should be used for API argument @a channel
483 #define esmCHANNEL47 0x0000800000000000ULL
485 /** @def esmCHANNEL48
486 * @brief Alias name for ESM group x channel 48
488 * This is an alias name for the ESM group x channel 48.
490 * @note This value should be used for API argument @a channel
492 #define esmCHANNEL48 0x0001000000000000ULL
494 /** @def esmCHANNEL49
495 * @brief Alias name for ESM group x channel 49
497 * This is an alias name for the ESM group x channel 49.
499 * @note This value should be used for API argument @a channel
501 #define esmCHANNEL49 0x0002000000000000ULL
503 /** @def esmCHANNEL50
504 * @brief Alias name for ESM group x channel 50
506 * This is an alias name for the ESM group x channel 50.
508 * @note This value should be used for API argument @a channel
510 #define esmCHANNEL50 0x0004000000000000ULL
512 /** @def esmCHANNEL51
513 * @brief Alias name for ESM group x channel 51
515 * This is an alias name for the ESM group x channel 51.
517 * @note This value should be used for API argument @a channel
519 #define esmCHANNEL51 0x0008000000000000ULL
521 /** @def esmCHANNEL52
522 * @brief Alias name for ESM group x channel 52
524 * This is an alias name for the ESM group x channel 52.
526 * @note This value should be used for API argument @a channel
528 #define esmCHANNEL52 0x0010000000000000ULL
530 /** @def esmCHANNEL53
531 * @brief Alias name for ESM group x channel 53
533 * This is an alias name for the ESM group x channel 53.
535 * @note This value should be used for API argument @a channel
537 #define esmCHANNEL53 0x0020000000000000ULL
539 /** @def esmCHANNEL54
540 * @brief Alias name for ESM group x channel 54
542 * This is an alias name for the ESM group x channel 54.
544 * @note This value should be used for API argument @a channel
546 #define esmCHANNEL54 0x0040000000000000ULL
548 /** @def esmCHANNEL55
549 * @brief Alias name for ESM group x channel 55
551 * This is an alias name for the ESM group x channel 55.
553 * @note This value should be used for API argument @a channel
555 #define esmCHANNEL55 0x0080000000000000ULL
557 /** @def esmCHANNEL56
558 * @brief Alias name for ESM group x channel 56
560 * This is an alias name for the ESM group x channel 56.
562 * @note This value should be used for API argument @a channel
564 #define esmCHANNEL56 0x0100000000000000ULL
566 /** @def esmCHANNEL57
567 * @brief Alias name for ESM group x channel 57
569 * This is an alias name for the ESM group x channel 57.
571 * @note This value should be used for API argument @a channel
573 #define esmCHANNEL57 0x0200000000000000ULL
575 /** @def esmCHANNEL58
576 * @brief Alias name for ESM group x channel 58
578 * This is an alias name for the ESM group x channel 58.
580 * @note This value should be used for API argument @a channel
582 #define esmCHANNEL58 0x0400000000000000ULL
584 /** @def esmCHANNEL59
585 * @brief Alias name for ESM group x channel 59
587 * This is an alias name for the ESM group x channel 59.
589 * @note This value should be used for API argument @a channel
591 #define esmCHANNEL59 0x0800000000000000ULL
593 /** @def esmCHANNEL60
594 * @brief Alias name for ESM group x channel 60
596 * This is an alias name for the ESM group x channel 60.
598 * @note This value should be used for API argument @a channel
600 #define esmCHANNEL60 0x1000000000000000ULL
602 /** @def esmCHANNEL61
603 * @brief Alias name for ESM group x channel 61
605 * This is an alias name for the ESM group x channel 61.
607 * @note This value should be used for API argument @a channel
609 #define esmCHANNEL61 0x2000000000000000ULL
611 /** @def esmCHANNEL62
612 * @brief Alias name for ESM group x channel 62
614 * This is an alias name for the ESM group x channel 62.
616 * @note This value should be used for API argument @a channel
618 #define esmCHANNEL62 0x4000000000000000ULL
620 /** @def esmCHANNEL63
621 * @brief Alias name for ESM group x channel 63
623 * This is an alias name for the ESM group x channel 63.
625 * @note This value should be used for API argument @a channel
627 #define esmCHANNEL63 0x8000000000000000ULL
632 /* USER CODE BEGIN (1) */
636 /* Esm Register Frame Definition */
638 * @brief Esm Register Frame Definition
640 * This type is used to access the Esm Registers.
642 /** @typedef esmBASE_t
643 * @brief Esm Register Frame Type Definition
645 * This type is used to access the Esm Registers.
647 typedef volatile struct esmBase
649 uint32_t EPENASET1; /* 0x0000 */
650 uint32_t EPENACLR1; /* 0x0004 */
651 uint32_t INTENASET1; /* 0x0008 */
652 uint32_t INTENACLR1; /* 0x000C */
653 uint32_t INTLVLSET1; /* 0x0010 */
654 uint32_t INTLVLCLR1; /* 0x0014 */
655 uint32_t ESTATUS1[3U]; /* 0x0018, 0x001C, 0x0020 */
656 uint32_t EPSTATUS; /* 0x0024 */
657 uint32_t INTOFFH; /* 0x0028 */
658 uint32_t INTOFFL; /* 0x002C */
659 uint32_t LTC; /* 0x0030 */
660 uint32_t LTCPRELOAD; /* 0x0034 */
661 uint32_t KEY; /* 0x0038 */
662 uint32_t ESTATUS2EMU; /* 0x003C */
663 uint32_t EPENASET4; /* 0x0040 */
664 uint32_t EPENACLR4; /* 0x0044 */
665 uint32_t INTENASET4; /* 0x0048 */
666 uint32_t INTENACLR4; /* 0x004C */
667 uint32_t INTLVLSET4; /* 0x0050 */
668 uint32_t INTLVLCLR4; /* 0x0054 */
669 uint32_t ESTATUS4[3U]; /* 0x0058, 0x005C, 0x0060 */
670 uint32_t ESTATUS5EMU; /* 0x0064 */
674 * @brief Esm Register Frame Pointer
676 * This pointer is used by the Esm driver to access the Esm registers.
678 #define esmREG ((esmBASE_t *)0xFFFFF500U)
680 /* USER CODE BEGIN (2) */
684 /* Esm Interface Functions */
686 uint32_t esmError(void);
687 void esmEnableError(uint64_t channels);
688 void esmDisableError(uint64_t channels);
689 void esmTriggerErrorPinReset(void);
690 void esmActivateNormalOperation(void);
691 void esmEnableInterrupt(uint64_t channels);
692 void esmDisableInterrupt(uint64_t channels);
693 void esmSetInterruptLevel(uint64_t channels, uint64_t flags);
694 void esmClearStatus(uint32_t group, uint64_t channels);
695 void esmClearStatusBuffer(uint64_t channels);
696 void esmSetCounterPreloadValue(uint32_t value);
698 uint64_t esmGetStatus(uint32_t group, uint64_t channels);
699 uint64_t esmGetStatusBuffer(uint64_t channels);
702 /** @fn void esmGroup1Notification(uint32_t channel)
703 * @brief Interrupt callback
704 * @param[in] channel - Group 1 channel
706 * This is a callback that is provided by the application and is called apon
707 * an interrupt. The parameter passed to the callback is group 1 channel caused the interrupt.
709 void esmGroup1Notification(uint32_t channel);
712 /** @fn void esmGroup2Notification(uint32_t channel)
713 * @brief Interrupt callback
714 * @param[in] channel - Group 2 channel
716 * This is a callback that is provided by the application and is called apon
717 * an interrupt. The parameter passed to the callback is group 2 channel caused the interrupt.
719 void esmGroup2Notification(uint32_t channel);
722 /* USER CODE BEGIN (3) */