Browse Source

refactor: Move more layout configuration to common file

main
Mathias Rasmussen 4 years ago
parent
commit
e2765d02c1
  1. 23
      Common.inc
  2. 34
      targets/A.inc
  3. 34
      targets/B.inc
  4. 184
      targets/Base.inc
  5. 27
      targets/C.inc
  6. 34
      targets/D.inc
  7. 12
      targets/E.inc
  8. 34
      targets/F.inc
  9. 34
      targets/G.inc
  10. 34
      targets/H.inc
  11. 34
      targets/I.inc
  12. 15
      targets/J.inc
  13. 34
      targets/K.inc
  14. 34
      targets/L.inc
  15. 12
      targets/M.inc
  16. 34
      targets/N.inc
  17. 34
      targets/O.inc
  18. 34
      targets/P.inc
  19. 4
      targets/Q.inc
  20. 34
      targets/R.inc
  21. 34
      targets/S.inc
  22. 34
      targets/T.inc
  23. 12
      targets/U.inc
  24. 27
      targets/V.inc
  25. 2
      targets/W.inc
  26. 34
      targets/Z.inc

23
Common.inc

@ -239,29 +239,6 @@ Set_MCU_Clk_48MHz MACRO
setb Flag_Clock_At_48MHz setb Flag_Clock_At_48MHz
ENDM ENDM
Initialize_Adc MACRO
mov REF0CN, #0Ch ;; Set vdd (3.3V) as reference. Enable temp sensor and bias
IF MCU_48MHZ == 0
mov ADC0CF, #59h ;; ADC clock 2MHz, PGA gain 1
ELSE
mov ADC0CF, #0B9h ;; ADC clock 2MHz, PGA gain 1
ENDIF
mov ADC0MX, #10h ;; Select temp sensor input
mov ADC0CN0, #80h ;; ADC enabled
mov ADC0CN1, #01h ;; Common mode buffer enabled
ENDM
Start_Adc MACRO
mov ADC0CN0, #90h ;; ADC start
ENDM
Read_Adc_Result MACRO
mov Temp1, ADC0L
mov Temp2, ADC0H
ENDM
Stop_Adc MACRO
ENDM
Set_RPM_Out MACRO Set_RPM_Out MACRO
ENDM ENDM
Clear_RPM_Out MACRO Clear_RPM_Out MACRO

34
targets/A.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -90,17 +88,12 @@ A_pwm EQU 0 ;o
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 1
$include (Base.inc) $include (Base.inc)
@ -128,26 +121,3 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
Set_LED_0 MACRO
ENDM
Clear_LED_0 MACRO
ENDM
Set_LED_1 MACRO
ENDM
Clear_LED_1 MACRO
ENDM
Set_LED_2 MACRO
ENDM
Clear_LED_2 MACRO
ENDM
Set_LED_3 MACRO
ENDM
Clear_LED_3 MACRO
ENDM

34
targets/B.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -91,17 +89,12 @@ C_com EQU 0 ;o
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 1
$include (Base.inc) $include (Base.inc)
@ -127,26 +120,3 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
Set_LED_0 MACRO
ENDM
Clear_LED_0 MACRO
ENDM
Set_LED_1 MACRO
ENDM
Clear_LED_1 MACRO
ENDM
Set_LED_2 MACRO
ENDM
Clear_LED_2 MACRO
ENDM
Set_LED_3 MACRO
ENDM
Clear_LED_3 MACRO
ENDM

184
targets/Base.inc

@ -11,23 +11,24 @@ RTX_SKIP EQU P0SKIP ; Set to 1 for SKIP
RTX_PIN EQU Rcp_In ; RTX pin RTX_PIN EQU Rcp_In ; RTX pin
;**** **** **** **** ****
; PWM pin routing and polarity setup
;**** **** **** **** ****
$if NOT CUSTOM_PWM_SETUP
IF PWM_ACTIVE_HIGH == 1 ; fet active high
pON LIT 'setb'
pOFF LIT 'clr'
ELSE ; fet active low
pON LIT 'clr'
pOFF LIT 'setb'
ENDIF
IF COMPWM_ACTIVE_HIGH == 1 ; comfet active high
cON LIT 'setb'
cOFF LIT 'clr'
ELSE ; comfet active low
cON LIT 'clr'
cOFF LIT 'setb'
Initialize_Xbar MACRO
mov XBR2, #40h ;; Xbar enabled
mov XBR1, #02h ;; CEX0 and CEX1 routed to pins
IF ESCNO = E_
All_pwmFETs_off ; For unlocking of HIP2103/4 driver circuits
call wait100ms
AcomFET_on
BcomFET_on
CcomFET_on
call wait1ms
All_comFETs_off
ENDIF ENDIF
ENDM
Set_Pwm_Polarity MACRO Set_Pwm_Polarity MACRO
IF PCA0_POWER_MODULE == PCA0CPM0 IF PCA0_POWER_MODULE == PCA0CPM0
@ -37,6 +38,12 @@ ELSE
ENDIF ENDIF
ENDM ENDM
$endif
;**** **** **** **** ****
; Comparator setup and phase change
;**** **** **** **** ****
IF COMP_PORT == 0 IF COMP_PORT == 0
CMP_CN0 EQU CMP0CN0 CMP_CN0 EQU CMP0CN0
CMP_MD EQU CMP0MD CMP_MD EQU CMP0MD
@ -47,26 +54,11 @@ CMP_MD EQU CMP1MD
CMP_MX EQU CMP1MX CMP_MX EQU CMP1MX
ENDIF ENDIF
Initialize_Xbar MACRO
mov XBR2, #40h ;; Xbar enabled
mov XBR1, #02h ;; CEX0 and CEX1 routed to pins
IF ESCNO = E_
All_pwmFETs_off ; For unlocking of HIP2103/4 driver circuits
call wait100ms
AcomFET_on
BcomFET_on
CcomFET_on
call wait1ms
All_comFETs_off
ENDIF
ENDM
Initialize_Comparator MACRO Initialize_Comparator MACRO
mov CMP_CN0, #80h ;; Comparator enabled, no hysteresis mov CMP_CN0, #80h ;; Comparator enabled, no hysteresis
mov CMP_MD, #00h ;; Comparator response time 100ns mov CMP_MD, #00h ;; Comparator response time 100ns
ENDM ENDM
Read_Comp_Out MACRO Read_Comp_Out MACRO
mov A, CMP_CN0 ;; Read comparator output mov A, CMP_CN0 ;; Read comparator output
IF ESCNO == O_ IF ESCNO == O_
@ -90,7 +82,73 @@ Set_Comp_Phase_C MACRO
ENDM ENDM
;**** **** **** **** ****
; PWM phase change
;**** **** **** **** ****
$if NOT CUSTOM_PWM_PHASE
; All pwm and com pins must be on port 1
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
Set_Pwm_A MACRO
IF FETON_DELAY == 0
cON P_AcomFET
mov P1SKIP, #(NOT (1 SHL A_pwm))
ELSE
mov P1SKIP, #(NOT ((1 SHL A_pwm) + (1 SHL A_com)))
ENDIF
ENDM
Set_Pwm_B MACRO
IF FETON_DELAY == 0
cON P_BcomFET
mov P1SKIP, #(NOT (1 SHL B_pwm))
ELSE
mov P1SKIP, #(NOT ((1 SHL B_pwm) + (1 SHL B_com)))
ENDIF
ENDM
Set_Pwm_C MACRO
IF FETON_DELAY == 0
cON P_CcomFET
mov P1SKIP, #(NOT (1 SHL C_pwm))
ELSE
mov P1SKIP, #(NOT ((1 SHL C_pwm) + (1 SHL C_com)))
ENDIF
ENDM
Set_Pwms_Off MACRO
mov P1SKIP, #0FFh
ENDM
$endif
;**** **** **** **** ****
; Fets on/off toggling
;**** **** **** **** ****
$if NOT CUSTOM_FET_TOGGLING
IF PWM_ACTIVE_HIGH == 1 ; fet active high
pON LIT 'setb'
pOFF LIT 'clr'
ELSE ; fet active low
pON LIT 'clr'
pOFF LIT 'setb'
ENDIF
IF COMPWM_ACTIVE_HIGH == 1 ; comfet active high
cON LIT 'setb'
cOFF LIT 'clr'
ELSE ; comfet active low
cON LIT 'clr'
cOFF LIT 'setb'
ENDIF
ApwmFET_on MACRO ApwmFET_on MACRO
pON P_ApwmFET pON P_ApwmFET
@ -170,38 +228,58 @@ All_comFETs_Off MACRO
CcomFET_off CcomFET_off
ENDM ENDM
$endif
IF ALL_FETS_ON_PORT1 == 1
Set_Pwm_A MACRO
IF FETON_DELAY == 0
cON P_AcomFET
mov P1SKIP, #(NOT (1 SHL A_pwm))
ELSE
mov P1SKIP, #(NOT ((1 SHL A_pwm) + (1 SHL A_com)))
ENDIF
$if NOT CUSTOM_LED
Set_LED_0 MACRO
ENDM
Clear_LED_0 MACRO
ENDM
Set_LED_1 MACRO
ENDM
Clear_LED_1 MACRO
ENDM
Set_LED_2 MACRO
ENDM
Clear_LED_2 MACRO
ENDM
Set_LED_3 MACRO
ENDM
Clear_LED_3 MACRO
ENDM ENDM
Set_Pwm_B MACRO
IF FETON_DELAY == 0
cON P_BcomFET
mov P1SKIP, #(NOT (1 SHL B_pwm))
$endif
;**** **** **** **** ****
; ADC and temperature measurement
;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
Initialize_Adc MACRO
mov REF0CN, #0Ch ;; Set vdd (3.3V) as reference. Enable temp sensor and bias
IF MCU_48MHZ == 0
mov ADC0CF, #59h ;; ADC clock 2MHz, PGA gain 1
ELSE ELSE
mov P1SKIP, #(NOT ((1 SHL B_pwm) + (1 SHL B_com)))
mov ADC0CF, #0B9h ;; ADC clock 2MHz, PGA gain 1
ENDIF ENDIF
mov ADC0MX, #10h ;; Select temp sensor input
mov ADC0CN0, #80h ;; ADC enabled
mov ADC0CN1, #01h ;; Common mode buffer enabled
ENDM ENDM
Set_Pwm_C MACRO
IF FETON_DELAY == 0
cON P_CcomFET
mov P1SKIP, #(NOT (1 SHL C_pwm))
ELSE
mov P1SKIP, #(NOT ((1 SHL C_pwm) + (1 SHL C_com)))
ENDIF
Start_Adc MACRO
mov ADC0CN0, #90h ;; ADC start
ENDM ENDM
Set_Pwms_Off MACRO
mov P1SKIP, #0FFh
Read_Adc_Result MACRO
mov Temp1, ADC0L
mov Temp2, ADC0H
ENDM ENDM
ENDIF
Stop_Adc MACRO
ENDM

27
targets/C.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -102,7 +100,7 @@ P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 0
$set(CUSTOM_PWM_PHASE)
$include (Base.inc) $include (Base.inc)
@ -161,26 +159,3 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
Set_LED_0 MACRO
ENDM
Clear_LED_0 MACRO
ENDM
Set_LED_1 MACRO
ENDM
Clear_LED_1 MACRO
ENDM
Set_LED_2 MACRO
ENDM
Clear_LED_2 MACRO
ENDM
Set_LED_3 MACRO
ENDM
Clear_LED_3 MACRO
ENDM

34
targets/D.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -90,17 +88,12 @@ A_pwm EQU 0 ;o
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 1
$include (Base.inc) $include (Base.inc)
@ -126,26 +119,3 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
Set_LED_0 MACRO
ENDM
Clear_LED_0 MACRO
ENDM
Set_LED_1 MACRO
ENDM
Clear_LED_1 MACRO
ENDM
Set_LED_2 MACRO
ENDM
Clear_LED_2 MACRO
ENDM
Set_LED_3 MACRO
ENDM
Clear_LED_3 MACRO
ENDM

12
targets/E.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -90,17 +88,13 @@ A_pwm EQU 0 ;o
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 1
$set(CUSTOM_LED)
$include (Base.inc) $include (Base.inc)

34
targets/F.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -90,17 +88,12 @@ A_pwm EQU 0 ;o
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 1
$include (Base.inc) $include (Base.inc)
@ -126,26 +119,3 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
Set_LED_0 MACRO
ENDM
Clear_LED_0 MACRO
ENDM
Set_LED_1 MACRO
ENDM
Clear_LED_1 MACRO
ENDM
Set_LED_2 MACRO
ENDM
Clear_LED_2 MACRO
ENDM
Set_LED_3 MACRO
ENDM
Clear_LED_3 MACRO
ENDM

34
targets/G.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -90,17 +88,12 @@ A_pwm EQU 0 ;o
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 1
$include (Base.inc) $include (Base.inc)
@ -126,26 +119,3 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
Set_LED_0 MACRO
ENDM
Clear_LED_0 MACRO
ENDM
Set_LED_1 MACRO
ENDM
Clear_LED_1 MACRO
ENDM
Set_LED_2 MACRO
ENDM
Clear_LED_2 MACRO
ENDM
Set_LED_3 MACRO
ENDM
Clear_LED_3 MACRO
ENDM

34
targets/H.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -91,17 +89,12 @@ C_com EQU 0 ;o
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 1
$include (Base.inc) $include (Base.inc)
@ -127,26 +120,3 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
Set_LED_0 MACRO
ENDM
Clear_LED_0 MACRO
ENDM
Set_LED_1 MACRO
ENDM
Clear_LED_1 MACRO
ENDM
Set_LED_2 MACRO
ENDM
Clear_LED_2 MACRO
ENDM
Set_LED_3 MACRO
ENDM
Clear_LED_3 MACRO
ENDM

34
targets/I.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -89,17 +87,12 @@ C_pwm EQU 0 ;o
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 1
$include (Base.inc) $include (Base.inc)
@ -123,26 +116,3 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
Set_LED_0 MACRO
ENDM
Clear_LED_0 MACRO
ENDM
Set_LED_1 MACRO
ENDM
Clear_LED_1 MACRO
ENDM
Set_LED_2 MACRO
ENDM
Clear_LED_2 MACRO
ENDM
Set_LED_3 MACRO
ENDM
Clear_LED_3 MACRO
ENDM

15
targets/J.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -89,17 +87,13 @@ A_pwm EQU 0 ;o
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 1
$set(CUSTOM_LED)
$include (Base.inc) $include (Base.inc)
@ -125,9 +119,6 @@ P2_SKIP EQU 0FFh
; MCU specific macros * ; MCU specific macros *
;********************** ;**********************
Set_LED_0 MACRO Set_LED_0 MACRO
clr P0.LED_0 clr P0.LED_0
ENDM ENDM

34
targets/K.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -90,17 +88,12 @@ A_com EQU 0 ;o
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 1
$include (Base.inc) $include (Base.inc)
@ -126,26 +119,3 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
Set_LED_0 MACRO
ENDM
Clear_LED_0 MACRO
ENDM
Set_LED_1 MACRO
ENDM
Clear_LED_1 MACRO
ENDM
Set_LED_2 MACRO
ENDM
Clear_LED_2 MACRO
ENDM
Set_LED_3 MACRO
ENDM
Clear_LED_3 MACRO
ENDM

34
targets/L.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -89,17 +87,12 @@ C_pwm EQU 0 ;o
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 1
$include (Base.inc) $include (Base.inc)
@ -121,26 +114,3 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
Set_LED_0 MACRO
ENDM
Clear_LED_0 MACRO
ENDM
Set_LED_1 MACRO
ENDM
Clear_LED_1 MACRO
ENDM
Set_LED_2 MACRO
ENDM
Clear_LED_2 MACRO
ENDM
Set_LED_3 MACRO
ENDM
Clear_LED_3 MACRO
ENDM

12
targets/M.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -92,17 +90,13 @@ A_pwm EQU 1 ;o
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 1
$set(CUSTOM_LED)
$include (Base.inc) $include (Base.inc)

34
targets/N.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -91,17 +89,12 @@ A_com EQU 0 ;o
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 1
$include (Base.inc) $include (Base.inc)
@ -127,26 +120,3 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
Set_LED_0 MACRO
ENDM
Clear_LED_0 MACRO
ENDM
Set_LED_1 MACRO
ENDM
Clear_LED_1 MACRO
ENDM
Set_LED_2 MACRO
ENDM
Clear_LED_2 MACRO
ENDM
Set_LED_3 MACRO
ENDM
Clear_LED_3 MACRO
ENDM

34
targets/O.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -90,17 +88,12 @@ A_pwm EQU 0 ;o
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 1
$include (Base.inc) $include (Base.inc)
@ -124,26 +117,3 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
Set_LED_0 MACRO
ENDM
Clear_LED_0 MACRO
ENDM
Set_LED_1 MACRO
ENDM
Clear_LED_1 MACRO
ENDM
Set_LED_2 MACRO
ENDM
Clear_LED_2 MACRO
ENDM
Set_LED_3 MACRO
ENDM
Clear_LED_3 MACRO
ENDM

34
targets/P.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -92,17 +90,12 @@ A_pwm EQU 1 ;o
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 1
$include (Base.inc) $include (Base.inc)
@ -128,26 +121,3 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
Set_LED_0 MACRO
ENDM
Clear_LED_0 MACRO
ENDM
Set_LED_1 MACRO
ENDM
Clear_LED_1 MACRO
ENDM
Set_LED_2 MACRO
ENDM
Clear_LED_2 MACRO
ENDM
Set_LED_3 MACRO
ENDM
Clear_LED_3 MACRO
ENDM

4
targets/Q.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -102,7 +100,7 @@ P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 1 COMP_PORT EQU 1
ALL_FETS_ON_PORT1 EQU 0
$set(CUSTOM_PWM_PHASE, CUSTOM_LED)
$include (Base.inc) $include (Base.inc)

34
targets/R.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -89,17 +87,12 @@ C_pwm EQU 0 ;o
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 1
$include (Base.inc) $include (Base.inc)
@ -125,26 +118,3 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
Set_LED_0 MACRO
ENDM
Clear_LED_0 MACRO
ENDM
Set_LED_1 MACRO
ENDM
Clear_LED_1 MACRO
ENDM
Set_LED_2 MACRO
ENDM
Clear_LED_2 MACRO
ENDM
Set_LED_3 MACRO
ENDM
Clear_LED_3 MACRO
ENDM

34
targets/S.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -89,17 +87,12 @@ A_com EQU 0 ;o
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 1
$include (Base.inc) $include (Base.inc)
@ -125,26 +118,3 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
Set_LED_0 MACRO
ENDM
Clear_LED_0 MACRO
ENDM
Set_LED_1 MACRO
ENDM
Clear_LED_1 MACRO
ENDM
Set_LED_2 MACRO
ENDM
Clear_LED_2 MACRO
ENDM
Set_LED_3 MACRO
ENDM
Clear_LED_3 MACRO
ENDM

34
targets/T.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -91,17 +89,12 @@ C_com EQU 0 ;o
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 1
$include (Base.inc) $include (Base.inc)
@ -127,26 +120,3 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
Set_LED_0 MACRO
ENDM
Clear_LED_0 MACRO
ENDM
Set_LED_1 MACRO
ENDM
Clear_LED_1 MACRO
ENDM
Set_LED_2 MACRO
ENDM
Clear_LED_2 MACRO
ENDM
Set_LED_3 MACRO
ENDM
Clear_LED_3 MACRO
ENDM

12
targets/U.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -92,17 +90,13 @@ A_pwm EQU 1 ;o
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 1
$set(CUSTOM_LED)
$include (Base.inc) $include (Base.inc)

27
targets/V.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -102,7 +100,7 @@ P_CcomFET EQU P0.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 0
$set(CUSTOM_PWM_PHASE)
$include (Base.inc) $include (Base.inc)
@ -161,26 +159,3 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
Set_LED_0 MACRO
ENDM
Clear_LED_0 MACRO
ENDM
Set_LED_1 MACRO
ENDM
Clear_LED_1 MACRO
ENDM
Set_LED_2 MACRO
ENDM
Clear_LED_2 MACRO
ENDM
Set_LED_3 MACRO
ENDM
Clear_LED_3 MACRO
ENDM

2
targets/W.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
;**** **** **** **** **** ;**** **** **** **** ****
; Bootloader definitions ; Bootloader definitions

34
targets/Z.inc

@ -27,8 +27,6 @@
; ;
;**** **** **** **** **** ;**** **** **** **** ****
TEMP_LIMIT EQU 49 ; Temperature measurement ADC value for which main motor power is limited at 80degC (low byte, assuming high byte is 1)
TEMP_LIMIT_STEP EQU 9 ; Temperature measurement ADC value increment for another 10degC
@ -90,17 +88,12 @@ A_com EQU 0 ;o
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port ; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0 COMP_PORT EQU 0
ALL_FETS_ON_PORT1 EQU 1
$include (Base.inc) $include (Base.inc)
@ -125,26 +118,3 @@ P2_DIGITAL EQU (1 SHL DebugPin)
P2_PUSHPULL EQU (1 SHL DebugPin) P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
Set_LED_0 MACRO
ENDM
Clear_LED_0 MACRO
ENDM
Set_LED_1 MACRO
ENDM
Clear_LED_1 MACRO
ENDM
Set_LED_2 MACRO
ENDM
Clear_LED_2 MACRO
ENDM
Set_LED_3 MACRO
ENDM
Clear_LED_3 MACRO
ENDM
Loading…
Cancel
Save