⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rtxconf.a51

📁 RTX51 CAN Program for the Infineon C505C, This program demonstrates how to transmit and receive CAN
💻 A51
📖 第 1 页 / 共 5 页
字号:
         INT_ENTRY     10
         INT_ENTRY     11
         INT_ENTRY     12
         INT_ENTRY     13
      ELSEIF (?RTX_SYSTEM_TIMER = 1)
         ; Do NOT include the Timer 1 Vector (INT-3)
         INT_ENTRY      0
         INT_ENTRY      1
         INT_ENTRY      2
         INT_ENTRY      4
         INT_ENTRY      5
         INT_ENTRY      8
         INT_ENTRY      9
         INT_ENTRY     10
         INT_ENTRY     11
         INT_ENTRY     12
         INT_ENTRY     13
      ELSEIF (?RTX_SYSTEM_TIMER = 2)
         ; Do NOT include the Timer 2 Vector (INT-5)
         INT_ENTRY      0
         INT_ENTRY      1
         INT_ENTRY      2
         INT_ENTRY      3
         INT_ENTRY      4
         INT_ENTRY      8
         INT_ENTRY      9
         INT_ENTRY     10
         INT_ENTRY     11
         INT_ENTRY     12
         INT_ENTRY     13
      ENDIF

      ;------------------------------------------------------------------
      ; The following table attaches the interrupt numbers (0..31) to the
      ; corresponding bits in the interrupt enable masks of the specific
      ; processor.
      ; All three interrupt enable register contents must be defined
      ; for every interrupt number (even when the specific processor contains
      ; only one interrupt mask).
      ; Syntax: DB IE-content, IE1-content, IE2-content
      ;
      ?RTX?RTX_INT_TO_BIT_TABLE?RTXCONF  SEGMENT  CODE
                        RSEG  ?RTX?RTX_INT_TO_BIT_TABLE?RTXCONF

         ?RTX_INT_TO_BIT_TABLE_BASE:
                        DB 01H, 00H, 00H    ; INT_0   (P3.2/INT0)
                        DB 02H, 00H, 00H    ; INT_1   (Timer 0)
                        DB 04H, 00H, 00H    ; INT_2   (P3.3/INT1)
                        DB 08H, 00H, 00H    ; INT_3   (Timer 1)
                        DB 10H, 00H, 00H    ; INT_4   (Ser. channel)
                        DB 20H, 00H, 00H    ; INT_5   (Timer 2)
                        DB 00H, 00H, 00H    ; INT_6   not used
                        DB 00H, 00H, 00H    ; INT_7   not used
                        DB 00H, 01H, 00H    ; INT_8   (A/D-Converter)
                        DB 00H, 02H, 00H    ; INT_9   (P1.4/INT2)
                        DB 00H, 04H, 00H    ; INT_10  (P1.0/INT3/CC0)
                        DB 00H, 08H, 00H    ; INT_11  (P1.1/INT4/CC1)
                        DB 00H, 10H, 00H    ; INT_12  (P1.2/INT5/CC2)
                        DB 00H, 20H, 00H    ; INT_13  (P1.3/INT6/CC3)

      ;------------------------------------------------------------------
      ; Define the greatest supported interrupt number
      ?RTX_MAX_INT_NBR      EQU   13

PCON    DATA    87H

ENTER_IDLE       MACRO
;;
;;      Enter Idle Mode
;;      ---------------
;;      To be used whenever entering idle state.
;;
            ORL     PCON, #01H          ; Set idle mode (leave by interrupt)
            ORL     PCON, #20H          ; (peripherals stay active)
         ENDM

ELSEIF (?RTX_CPU_TYPE = 4)
   ;**********
   ;* Type 4 *
   ;**********
      ;------------------------------------------------------------------
      ; Define the number and addresses of the interrupt enable registers
      ; 80517/537 -> 3 interrupt enable registers
      ; (Set the not used registers to the same address as ?RTX_IE)

      INT_EN_MASK_NUMBER   EQU 3
      ?RTX_IE              DATA  0A8H
      ?RTX_IEN1            DATA  0B8H
      ?RTX_IEN2            DATA  09AH

      ;------------------------------------------------------------------
      ; Generate the interrupt entry points supported by the peripherals
      ; of the selected CPU type.
      IF (?RTX_SYSTEM_TIMER = 0)
         ; Do NOT include the Timer 0 Vector  (INT-1)
         INT_ENTRY      0
         INT_ENTRY      2
         INT_ENTRY      3
         INT_ENTRY      4
         INT_ENTRY      5
         INT_ENTRY      8
         INT_ENTRY      9
         INT_ENTRY     10
         INT_ENTRY     11
         INT_ENTRY     12
         INT_ENTRY     13
         INT_ENTRY     16
         INT_ENTRY     19
      ELSEIF (?RTX_SYSTEM_TIMER = 1)
         ; Do NOT include the Timer 1 Vector (INT-3)
         INT_ENTRY      0
         INT_ENTRY      1
         INT_ENTRY      2
         INT_ENTRY      4
         INT_ENTRY      5
         INT_ENTRY      8
         INT_ENTRY      9
         INT_ENTRY     10
         INT_ENTRY     11
         INT_ENTRY     12
         INT_ENTRY     13
         INT_ENTRY     16
         INT_ENTRY     19
      ELSEIF (?RTX_SYSTEM_TIMER = 2)
         ; Do NOT include the Timer 2 Vector (INT-5)
         INT_ENTRY      0
         INT_ENTRY      1
         INT_ENTRY      2
         INT_ENTRY      3
         INT_ENTRY      4
         INT_ENTRY      8
         INT_ENTRY      9
         INT_ENTRY     10
         INT_ENTRY     11
         INT_ENTRY     12
         INT_ENTRY     13
         INT_ENTRY     16
         INT_ENTRY     19
      ENDIF

      ;------------------------------------------------------------------
      ; The following table attaches the interrupt numbers (0..31) to the
      ; corresponding bits in the interrupt enable masks of the specific
      ; processor.
      ; All three interrupt enable register contents must be defined
      ; for every interrupt number (even when the specific processor contains
      ; only one interrupt mask).
      ; Syntax: DB IE-content, IE1-content, IE2-content
      ;
      ?RTX?RTX_INT_TO_BIT_TABLE?RTXCONF  SEGMENT  CODE
                        RSEG  ?RTX?RTX_INT_TO_BIT_TABLE?RTXCONF

         ?RTX_INT_TO_BIT_TABLE_BASE:
                        DB 01H, 00H, 00H    ; INT_0   (P3.2/INT0)
                        DB 02H, 00H, 00H    ; INT_1   (Timer 0)
                        DB 04H, 00H, 00H    ; INT_2   (P3.3/INT1)
                        DB 08H, 00H, 00H    ; INT_3   (Timer 1)
                        DB 10H, 00H, 00H    ; INT_4   (Ser. channel 0)
                        DB 20H, 00H, 00H    ; INT_5   (Timer 2/ ext. reload)
                        DB 00H, 00H, 00H    ; INT_6   not used
                        DB 00H, 00H, 00H    ; INT_7   not used
                        DB 00H, 01H, 00H    ; INT_8   (A/D-Converter)
                        DB 00H, 02H, 00H    ; INT_9   (P1.4/INT2/CC4)
                        DB 00H, 04H, 00H    ; INT_10  (P1.0/INT3/CC0)
                        DB 00H, 08H, 00H    ; INT_11  (P1.1/INT4/CC1)
                        DB 00H, 10H, 00H    ; INT_12  (P1.2/INT5/CC2)
                        DB 00H, 20H, 00H    ; INT_13  (P1.3/INT6/CC3)
                        DB 00H, 00H, 00H    ; INT_14  not used
                        DB 00H, 00H, 00H    ; INT_15  not used
                        DB 00H, 00H, 01H    ; INT_16  (Serial Channel 1)
                        DB 00H, 00H, 00H    ; INT_17  not used
                        DB 00H, 00H, 00H    ; INT_18  not used
                        DB 00H, 00H, 08H    ; INT_19  (Compare timer ov.)

      ;------------------------------------------------------------------
      ; Define the greatest supported interrupt number
      ?RTX_MAX_INT_NBR      EQU   19

PCON    DATA    87H

ENTER_IDLE       MACRO
;;
;;      Enter Idle Mode
;;      ---------------
;;      To be used whenever entering idle state.
;;
            ORL     PCON, #01H          ; Set idle mode (leave by interrupt)
            ORL     PCON, #20H          ; (peripherals stay active)
         ENDM


ELSEIF (?RTX_CPU_TYPE = 21)
   ;**********
   ;* Type 21 *
   ;**********
      ;------------------------------------------------------------------
      ; Define the number and addresses of the interrupt enable registers
      ; C515C -> 3 interrupt enable registers
      ; (Set the not used registers to the same address as ?RTX_IE)

      INT_EN_MASK_NUMBER   EQU 3
      ?RTX_IE              DATA  0A8H
      ?RTX_IEN1            DATA  0B8H
      ?RTX_IEN2            DATA  09AH

      ;------------------------------------------------------------------
      ; Generate the interrupt entry points supported by the peripherals
      ; of the selected CPU type.
      IF (?RTX_SYSTEM_TIMER = 0)
         ; Do NOT include the Timer 0 Vector  (INT-1)
         INT_ENTRY      0		; INT_0	 (P3.2/INT0)
										; INT_1	 (Timer 0)
         INT_ENTRY      2		; INT_2	 (P3.3/INT1)
         INT_ENTRY      3		; INT_3	 (Timer 1)
         INT_ENTRY      4		; INT_4	 (Ser. channel 0)
         INT_ENTRY      5		; INT_5	 (Timer 2/ ext. reload)
										; INT_6	 not used(WDT)
										; INT_7	 not used(EAL)
         INT_ENTRY      8		; INT_8	 (A/D-Converter)
         INT_ENTRY      9		; INT_9	 (P1.4/INT2/CC4)
         INT_ENTRY     10		; INT_10	 (P1.0/INT3/CC0)
         INT_ENTRY     11		; INT_11	 (P1.1/INT4/CC1)
         INT_ENTRY     12		; INT_12	 (P1.2/INT5/CC2)
         INT_ENTRY     13		; INT_13	 (P1.3/INT6/CC3)
										; INT_14	 not used(SWDT)
										; INT_15	 not used(EXEN2)
         							; INT_16	 not used
			INT_ENTRY     17		; INT_17	 CAN Controller
			INT_ENTRY     18		; INT_18	 SSC
         INT_ENTRY     19		; INT_19	 not used
         INT_ENTRY     20		; INT_20	 INT7
         INT_ENTRY     21		; INT_21	 INT8
      ELSEIF (?RTX_SYSTEM_TIMER = 1)
         ; Do NOT include the Timer 1 Vector (INT-3)
         INT_ENTRY      0		; INT_0	 (P3.2/INT0)
			INT_ENTRY		1		; INT_1	 (Timer 0)
         INT_ENTRY      2		; INT_2	 (P3.3/INT1)
         							; INT_3	 (Timer 1)
         INT_ENTRY      4		; INT_4	 (Ser. channel 0)
         INT_ENTRY      5		; INT_5	 (Timer 2/ ext. reload)
										; INT_6	 not used(WDT)
										; INT_7	 not used(EAL)
         INT_ENTRY      8		; INT_8	 (A/D-Converter)
         INT_ENTRY      9		; INT_9	 (P1.4/INT2/CC4)
         INT_ENTRY     10		; INT_10	 (P1.0/INT3/CC0)
         INT_ENTRY     11		; INT_11	 (P1.1/INT4/CC1)
         INT_ENTRY     12		; INT_12	 (P1.2/INT5/CC2)
         INT_ENTRY     13		; INT_13	 (P1.3/INT6/CC3)
										; INT_14	 not used(SWDT)
										; INT_15	 not used(EXEN2)
         							; INT_16	 not used
			INT_ENTRY     17		; INT_17	 CAN Controller
			INT_ENTRY     18		; INT_18	 SSC
         INT_ENTRY     19		; INT_19	 not used
         INT_ENTRY     20		; INT_20	 INT7
         INT_ENTRY     21		; INT_21	 INT8


      ELSEIF (?RTX_SYSTEM_TIMER = 2)
         ; Do NOT include the Timer 2 Vector (INT-5)
         INT_ENTRY      0		; INT_0	 (P3.2/INT0)
			INT_ENTRY		1		; INT_1	 (Timer 0)
         INT_ENTRY      2		; INT_2	 (P3.3/INT1)
         INT_ENTRY      3		; INT_3	 (Timer 1)
         INT_ENTRY      4		; INT_4	 (Ser. channel 0)
					         		; INT_5	 (Timer 2/ ext. reload)
										; INT_6	 not used(WDT)
										; INT_7	 not used(EAL)

         INT_ENTRY      8		; INT_8	 (A/D-Converter)
         INT_ENTRY      9		; INT_9	 (P1.4/INT2/CC4)
         INT_ENTRY     10		; INT_10	 (P1.0/INT3/CC0)
         INT_ENTRY     11		; INT_11	 (P1.1/INT4/CC1)
         INT_ENTRY     12		; INT_12	 (P1.2/INT5/CC2)
         INT_ENTRY     13		; INT_13	 (P1.3/INT6/CC3)
										; INT_14	 not used(SWDT)
										; INT_15	 not used(EXEN2)

         							; INT_16	 not used
			INT_ENTRY     17		; INT_17	 CAN Controller
			INT_ENTRY     18		; INT_18	 SSC
         							; INT_19	 not used
         INT_ENTRY     20		; INT_20	 INT7
         INT_ENTRY     21		; INT_21	 INT8
      ENDIF

      ;------------------------------------------------------------------
      ; The following table attaches the interrupt numbers (0..31) to the
      ; corresponding bits in the interrupt enable masks of the specific
      ; processor.
      ; All three interrupt enable register contents must be defined
      ; for every interrupt number (even when the specific processor contains
      ; only one interrupt mask).
      ; Syntax: DB IE-content, IE1-content, IE2-content
      ;
      ?RTX?RTX_INT_TO_BIT_TABLE?RTXCONF  SEGMENT  CODE
                        RSEG  ?RTX?RTX_INT_TO_BIT_TABLE?RTXCONF

         ?RTX_INT_TO_BIT_TABLE_BASE:
                        DB 01H, 00H, 00H    ; INT_0   (P3.2/INT0)
                        DB 02H, 00H, 00H    ; INT_1   (Timer 0)
                        DB 04H, 00H, 00H    ; INT_2   (P3.3/INT1)
                        DB 08H, 00H, 00H    ; INT_3   (Timer 1)
                        DB 10H, 00H, 00H    ; INT_4   (Ser. channel 0)
                        DB 20H, 00H, 00H    ; INT_5   (Timer 2/ ext. reload)
                        DB 00H, 00H, 00H    ; INT_6   not used(WDT)
                        DB 00H, 00H, 00H    ; INT_7   not used(EAL)

                        DB 00H, 01H, 00H    ; INT_8   (A/D-Converter)
                        DB 00H, 02H, 00H    ; INT_9   (P1.4/INT2/CC4)
                        DB 00H, 04H, 00H    ; INT_10  (P1.0/INT3/CC0)
                        DB 00H, 08H, 00H    ; INT_11  (P1.1/INT4/CC1)
                        DB 00H, 10H, 00H    ; INT_12  (P1.2/INT5/CC2)
                        DB 00H, 20H, 00H    ; INT_13  (P1.3/INT6/CC3)
                        DB 00H, 00H, 00H    ; INT_14  not used(SWDT)
                        DB 00H, 00H, 00H    ; INT_15  not used(EXEN2)

                        DB 00H, 00H, 00H    ; INT_16  not used
                        DB 00H, 00H, 02H    ; INT_17  CAN Controller
                        DB 00H, 00H, 04H    ; INT_18  SSC
                        DB 00H, 00H, 00H    ; INT_19  not used
                        DB 00H, 00H, 10H    ; INT_20  (P7.0/INT7)
                        DB 00H, 00H, 20H    ; INT_21  (P4.5/INT8)

      ;------------------------------------------------------------------
      ; Define the greatest supported interrupt number
      ?RTX_MAX_INT_NBR      EQU   21

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -