David Giles
/
CM-MBED_RSEDP_Test_Suite_LPC1768_V3
This is a complete listing of the RS-EDP software for the mbed module to support the RS-EDP platform.
HeaderFiles/RS-EDP_AM_MC2_Globals.h@0:5b7639d1f2c4, 2010-11-19 (annotated)
- Committer:
- DavidGilesHitex
- Date:
- Fri Nov 19 09:49:16 2010 +0000
- Revision:
- 0:5b7639d1f2c4
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
DavidGilesHitex | 0:5b7639d1f2c4 | 1 | /* Global External Registers */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 2 | /* ************************* */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 3 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 4 | extern struct MotorFlags |
DavidGilesHitex | 0:5b7639d1f2c4 | 5 | { |
DavidGilesHitex | 0:5b7639d1f2c4 | 6 | unsigned RunMotor :1u; |
DavidGilesHitex | 0:5b7639d1f2c4 | 7 | unsigned Direction :1u; |
DavidGilesHitex | 0:5b7639d1f2c4 | 8 | unsigned SystemTest :1u; |
DavidGilesHitex | 0:5b7639d1f2c4 | 9 | unsigned Delay_Ramps_Flag :1u; |
DavidGilesHitex | 0:5b7639d1f2c4 | 10 | unsigned Motor_Fault_RPM_Flag :1u; |
DavidGilesHitex | 0:5b7639d1f2c4 | 11 | unsigned Motor_Fault_Current_Flag :1u; |
DavidGilesHitex | 0:5b7639d1f2c4 | 12 | unsigned Motor_Fault_Av_Current_Flag :1u; |
DavidGilesHitex | 0:5b7639d1f2c4 | 13 | unsigned Motor_Fault_Ext_Comparator_Flag : 1u; |
DavidGilesHitex | 0:5b7639d1f2c4 | 14 | unsigned unused :8u; |
DavidGilesHitex | 0:5b7639d1f2c4 | 15 | } Flags; |
DavidGilesHitex | 0:5b7639d1f2c4 | 16 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 17 | extern volatile uint16_t FlagsShort; |
DavidGilesHitex | 0:5b7639d1f2c4 | 18 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 19 | extern volatile uint16_t instantaneous_rpm; /* RPM Value without filtering */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 20 | extern volatile uint16_t average_rpm; /* RPM Value with filtering */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 21 | extern volatile uint16_t RPM_target; /* Target RPM from demand pot or I2C */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 22 | extern volatile uint16_t instantaneous_motor_current; /* Motor current without filtering, 0 - 1023*/ |
DavidGilesHitex | 0:5b7639d1f2c4 | 23 | extern volatile uint16_t average_motor_current; /* Motor current with filtering, 0 - 1023 */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 24 | extern volatile uint16_t instantaneous_vbus; /* Vbus voltage without filering, 0 - 1023 */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 25 | extern volatile uint16_t average_vbus; /* Vbus value with filtering, 0 - 1023 */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 26 | extern volatile uint16_t instantaneous_demand_pot; /* Demand pot without filtering, 0 - 1023 */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 27 | extern volatile uint16_t average_demand_pot; /* Demand pot with filtering, 0 - 1023 */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 28 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 29 | extern volatile uint16_t motor_ramp_up_speed; /* Parameter comes from I2C packet */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 30 | extern volatile uint16_t motor_ramp_down_speed; /* Parameter comes from I2C packet */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 31 | extern volatile uint16_t motor_demand_forward_speed; /* Parameter comes from I2C packet */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 32 | extern volatile uint16_t motor_demand_reverse_speed; /* Parameter comes from I2C packet */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 33 | extern volatile uint16_t actual_speed; /* Motor speed controlled via I2C packet */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 34 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 35 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 36 | extern volatile uint16_t HallValue; /* Latest value of hall sensors input */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 37 | extern volatile uint32_t timer3value; /* Last value of period of revolution */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 38 | extern volatile uint32_t timer3avg; /* Average period of rotation */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 39 | extern volatile uint8_t polecount; /* Current pole count as shaft rotates */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 40 | extern volatile uint16_t TMR3_Additional_High; /* Additional word for timer 3 - makes it a 32 bit counter/timer */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 41 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 42 | /* Sequence Table For Hall Effects */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 43 | extern uint16_t StateTableFwd[]; /* Output state table of PWM outputs - Forward direction */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 44 | extern uint16_t StateTableRev[]; /* Output state table of PWM outputs - Forward direction */ |
DavidGilesHitex | 0:5b7639d1f2c4 | 45 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 46 | |
DavidGilesHitex | 0:5b7639d1f2c4 | 47 | extern volatile uint8_t current_state; |