1 / 18

Electronic Automotive Motor Control System

Electronic Automotive Motor Control System. Software Description. Viking 32. Kernel Selection and Task Design. Kernel – Micro C/OSII. Micro C/OSII was selected for its flexibility and OS services Queues Memory Partitions Mutual exclusions. Task/ISR Description. Task/ISR Specs.

Download Presentation

Electronic Automotive Motor Control System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Electronic Automotive Motor Control System Software Description Viking 32

  2. Kernel Selection and Task Design • Kernel – Micro C/OSII • Micro C/OSII was selected for its flexibility and OS services • Queues • Memory Partitions • Mutual exclusions

  3. Task/ISR Description

  4. Task/ISR Specs.

  5. Modules and Descriptions • EAMCS – Main program. Integrates all modules listed below into motor control system. • AtoD – Initialization and analog to digital conversions. • CAN – Initialization, Transmission, and Reception of data over the Controller Area Network. • eamcs_display – Formats and updates data for the User Interface. • BasicIO – Initializes the SCI port, formats, transmits, and receives ASCII data • ECT – Handles input captures and RPM calculations. • PWM – Initialization, sets pulse width modulation

  6. EAMCS.c • TASKS: • StartTask • Can0BusTask • Can0RxTask • InputTask • CalcDataTask • UITask Code Reuse: BasicIO Module Modifications: Baud = 19200 Port = SCI1

  7. AtoD.c Public Functions: void AtoDInitSingle(void) INT16U AtoDReadSingle(INT8U port) Code Reuse: None

  8. CAN.c Public Functions: INT8U Can0Enable(void); void Can0Timing(void); void Can0Filter(INT8U id_ac_mode, INT8U *filter1, INT8U *filter2) void Can0Mask(INT8U *mask1, INT8U *mask2) INT8U Can0Rx(CAN_DATA *rx_data) INT8U Can0Tx(CAN_DATA *tx_data) void Can0IdFormat(INT8U *can_id) Code Reuse: None

  9. eamcs_display.c Public Functions void DispConditions(void) void DispAccelVolt(INT16U acc_volt) void DispBrakeVolt(INT16U brake_volt) void DispShiftPos(INT8U s_pos) void DispGearPos(INT16U g_pos) void DispMotorRpm(INT16U m_rpm_val) void DispAxleRpm(INT16U a_rpm_val) void DispFaultBit(INT8U fault_bit) void DispEnableBit(INT8U enable_bit) void DispReqGearPos(INT8U req_gear_pos) void DispCanMotorRpmRx(INT16U m_rpm_val) void DispCanTorqueRx(INT8U torque_val) void DispCanBusVoltRx(INT8U bus_volt_val) void DispCanBusCurrentRx(INT8U bus_cur_val) void DispCanInverterTempRx(INT8U temp_val) void DispCanRotorTempRx(INT8U rotor_val) void DispCanStatorTempRx(INT8U stator_val) void DispCanWatchDogRx(INT8U comm_err, INT8U wtch_dg_err) void DispCanReqSpeedTx(INT16U speed) void DispCanReqTorqueTx(INT8U torque) void DispCanPowerReqTx(INT8U power) void DispCanMaxBusCurTx(INT8U max_current) void DispCanMaxBusVoltTx(INT8U max_volt) void DispCanControlBitTx(INT8U control_bit) void DispCls(void) Code Reuse: BasicIO Module Modifications: Baud = 19200 Port = SCI1

  10. ECT.c Public Functions extern void EctRpmTaskInit(void) INT8U EctGetRPM0(INT16U *period) INT8U EctGetRPM1(INT16U *period) Tasks EctRpmTask ISRs ISR EctInCap0ISR(void) ISR EctInCap1ISR(void) ISR EctOverFlowISR(void) OS_EVENT *RpmMutex Code Reuse: None

  11. PWM.c Public Functions void PwmInit100kHz(INT8U port, INT8U duty_cycle) void PwmDutyCycle(INT8U duty_cycle) INT8U PwmGetDutyCycle(void) Code Reuse: None

  12. Intertask Communications Partitioned Memory Flow 50ms SensorDataQ InputTask UiSensorDataQ 50ms Continuous UiCanRxQueue CalcDataTask UITask 10ms UiCanTxQueue CanRxDataQ CanRxTask Heap Memory Partition Sensor Data CAN RX Data CAN TX Data

  13. Intertask Communications Partitioned Memory Flow 50ms SensorDataQ InputTask UiSensorDataQ OSQPost() OSQAccept() OSQAccept() OSQPost() 50ms Continuous UiCanRxQueue CalcDataTask UITask OSQPost() OSQAccept() 10ms OSQAccept() UiCanTxQueue CanRxDataQ OSQPost() CanRxTask OSQPost() OSQAccept() OSMemPut() OSMemPut() OSMemGet() Heap Memory Partition Sensor Data CAN RX Data CAN TX Data

  14. Intertask Communications CAN Module Can0Rx() Can0BusStatus() Can0BusOffReq() Can0TxRxReq() Can0SleepReq() Can0Enable() Can0Filter() Can0Mask() Can0IdFormat() CAN0 Controller RXCAN BUFFERS RXCAN0 TXCAN0 Can0Timing() 250kbps Can0Tx() TXCAN BUFFERS Can0BusTask

  15. Intertask Communications A to D Module PK0_L Shifter Port SHIFTER_PORT_INIT() PK1_L 0.5µs AtoDInitSingle() PK2_L AN00 AN0-2 ATDDR0 AtoDReadSingle() SHIFTER_POSITION() PK3_L (~(SHIFTER_PORT | 0xc0)) AN01 ATDDR1 PK4_L ATDDR2 AN02 PK5_L ECT Module OverFlowCnt0 PeriodCnt0 PT00 EctInCap0ISR RpmTask EctOverFlowISR Rpm0 EctInCap1ISR PT01 10ms Rpm1 PeriodCnt1 OverFlowCnt1 InputTask EctRpmTaskInit() EctGetRPM0() EctGetRPM1() GEAR_SEL_FAULT() PORT A PA2_L

  16. Intertask Communications CAN Module Can0Rx() Can0Enable() Can0Filter() Can0Mask() Can0IdFormat() CAN0 Controller RXCAN BUFFERS RXCAN0 TXCAN0 Can0Timing() 250kbps Can0Tx() TXCAN BUFFERS Can0RxTask CanRxDataQ CalcDataTask PK0_L PWM Module PwmDutyCycle() Duty Cycle PwmGetDutyCycle() GEAR_SEL_ENABLE() PWM 8B8C PWM0 PwmInit100kHz() PORT A PA3_L

  17. Intertask Communications eamcs_display Module DispConditions() DispAccelVolt() DispBrakeVolt() DispShiftPos() DispGearPos() DispMotorRpm() DispAxleRpm() DispFaultBit() DispEnableBit() DispReqGearPos() DispCanMotorRpmRx() DispCanTorqueRx() DispCanBusVoltRx() DispCanBusCurrentRx() DispCanInverterTempRx() DispCanRotorTempRx() DispCanStatorTempRx() DispCanWatchDogRx() DispCanReqSpeedTx() DispCanReqTorqueTx() DispCanPowerReqTx() DispCanMaxBusCurTx() DispCanMaxBusVoltTx() DispCanControlBitTx() DispCls() UiSensorDataQ Continuous UiCanRxQueue BasicIO Module UITask TXD1 RXD1 UiCanTxQueue

More Related