1、车身控制器设计方案 Automobile Body Model architecture Development,Agenda,Scope of Project Function / Feature modules System Analysis Hardware Specification Software Architecture Development Tool chain Project Position Target models: Y11, Y21, Y22 Design in Window Co-operation model Roles and Responsibilities
2、 Memorandum of Understanding Joint Lab Partnership with Tier1 Protection scheme (mutual interest) Project Milestones / Schedules,Scope of Project,Specification Clarification Function Description Control Flow System Analysis Block Diagram Architecture proposal System partitioning (Hardware & software
3、) Hardware Modules (Scalability) Software Modules (API, Algorithm, Flowchart, Drivers) MCU & IC Selection Bill Of Materials evaluation (BOM) Cost Evaluation MCU, SMOS, RKE Development Tools (ECU, Actuator, Switch) Development tool chain Development Schedule,Specification Clarification open discussio
4、n,Function Description Confirm mandatory v optional features Control Flow Latency Power Window Power Mirror Door Locking & unlocking Power curtain Power Seat Interior Lighting Exterior Lighting Wiper, Washer Flow chart Prioritisation of features CACs Confirm Revised (and frozen!) specification,Low E
5、nd Platform Configuration,Basic Door Lock/Unlock RKE door lock/unlock (Trunk) Vehicle speed locking Door status feedback (Trunk, Bonnet) Antitheft alarm Basic Light Control RKE Light (turn light flash) Interior light (door open indication) Window Lift 4 doors Stall Detection Auto close Sunroof High
6、speed inhibited Auto close Anti-pinch Key Status Key warning Key status input Rear Window Defrost Horn Control Front/Rear Wiper & Front Washer,Controlled by ECU,Controlled directly by switch,See “Low End Platform.doc”,Low End Platform低端平台控制对象,Low End Platform BCM,Driver Door Door Lock Window Lift,Re
7、ar Left Door Door Lock Window Lift,Passenger Door Door Lock Window Lift,Rear Right Door Door Lock Window Lift,Exterior Light (RKE Light),Interior Light,Rear Window Defrost,Key,Anti-Alarm,RKE,Sun roof,Keypad,Trunk Lock,Siren,Window Motor Current * 4,Block Diagram,Defrost,Interior Light,Window Motor *
8、 4,Rear Window Disable,Door Ajar Status 1,Door Lock Switch * 2,Key Status * 4,Ground,MC908GR16 MC9SAW32,Power Supply,5V,+12V,Digital Input,Analog Input,Speed Sensor,RKE Receiver,Relay Drive,LED Driver,Siren (Relay),Diagnosis,K Line,Battery Voltage,Window Switch * 8,Input Capture,Sunroof Switch * 2,3
9、,Sunroof Motor Sensor,6,2,Rear Window Defrost Switch,2,8,2,Door Lock * 4,Turn Light,2,Antitheft LED,Sunroof Motor,2,16,Engine Speed Sensor,19,Buzzer,Buzzer,Schematic,ICs Selection,Connector AMP CAC Relay Driver ON: MC1413, NCV1413 ULQ2003 Freescale: MC33291L Relay Xiamen Hongfa Tyco Parallel to Seri
10、al MC74HC165A Power Supply NCV4276 7805 MCU MC9S08AW32 RKE options Freescale solution: ROMEO2 and Tango (using TEAMAC) Microchip solution: HCS515, HCS320,Body Controller Module code size estimates,Until the actual application is designed and developed, it is difficult to accurately predict the amoun
11、t of code space required. In particular the level of anti-pinch and also diagnostic approaches will have a significant impact on the final code size. Indeed the operating system selected (if any) will also contribute to the code size. Another factor will be the software style used (ie assembler vers
12、us C) and the efficiency of the compiler. However, based on experience the following is a conservative code size estimate, with more aggressive figures in bold:,In a mass volume, aggressive market it seems realistic to target 16K as being suitable for the for the low-end platform.,Body Controller (L
13、ow End) MCU analysis,Note: Costs based on 100K min in 2006,MC9S08AW family Feature Set,1-2KRAM,2-ch 16-bit Timer,16K-60K Flash,16-ch 10-bit ADC,ICE + BDM,KBI,SPI,IIC,ICG (20MHz bus),2 SCI,FeaturesMemory 16-64K Flash, capable of EEPROM emulation 1-2Kbytes of RAM Internal Clock Generator (ICG) Up to 2
14、0MHz bus FLL Digitally-controller oscillator (DCO) preserves previous setting Separate self-clocked source for real time interrupt 2% accuracy over full operating range Serial Communication IIC (synchronous), 2 SPI (synchronous), and SCI (asynchronous) Timers 6-channel Timer/PWM Module (TPM) 2-chann
15、el Timer/PWM Module (TPM) Analog Modules 16-ch, 10-bit Analog-to-digital converter (3us conversions) ADC measurements in STOP mode Auto-monitor capability Enhanced LVW I/O Slew rate control Drive strength control Development Tools On chip ICE and BDM,6-ch 16-bit Timer,POR,COP,Package: 64 QFP, 64 LQF
16、P, 48 QFN, 44 LQFP,LVI,HCS08 CPU 20Mhz,AW family Key Advantages,First device in S08 family to be 5V capable. Brings all the advantages of the HCS08 Family to high pin count devices.Continuation of Freescale High end 8 bit MCU offering.Full feature set for easy development. Advanced analog, multiple
17、communications options. Attractive price,Summary,High Integration, High Performance, Attractive Price, Easy to Use Best in the marketThe AW-family is the first S08 devices of 5V capability. It is the continuation of Freescale high end 8 bit MCU offering. High integration, having everything you can a
18、sk for a general purpose MCU. High pin count, providing customer with maximum flexibility. High performance analog, including improved ADC and enhanced LVW Starting up development with this device is extremely simple and inexpensive with the low-cost demoboard (with integrated USB BDM Multilink) and
19、 Special Edition Codewarrior Attractive price - General purpose use is only the beginning!,MC3359x ROMEO3,General : Frequency : 315 to 915MHz Modulation : OOK and FSK (software selectable) Data rate : up to 19.2kbps Temperature range : -40 to+85C Supply voltage : 2.1V-3.6V Package : LQFP32 Receiver
20、: Sensitivity : -103dBm to 81dBm typ in 4 steps Data Manager with clock recovery for Manchester coded signals RSSI : 75dB digital and 55dB analog Channel bandwidth : 400kHz Current consumption : 8mA typ,APPLICATIONS Automotive RKE Home AutomationBuilding controlGarage door opener Remote metering RF
21、Data Transfer,MCxxxxx is a highly integrated receiver designed for low voltage application. Its includes a programmable PLL for multichannel application, a RSSI circuit, a Strobe Oscillator that wakes up periodically the receiver while a Data Manager checks the content of incoming message,LQFP-32,CU
22、STOMER BENEFITS Simple system design, SPI interface to MCU Low system power consumption with Datamanager and Strobe oscillator Faster software development with Data manager Reduced space, enhanced reliability Faster design cycle time, few RF expertise needs Economical solution with few externalcompo
23、nents,Now Sampling,RSSI 3V Vcc FracN PLL,BACK to RM,Development Tools (ECU, Actuator, Switch),Software (ECU / MCU / System development) Codewarrior IDE (Integrated Development Environment) Across platform reusability / compatibility HCS08 V3.1 Standard HCS12 V3.1 Standard Hardware USBMultilinkBDM Sa
24、me tool supports HCS08 & HCS12 Supports In Chip Emulation (ICE) Actuator&Switch CACs QQ Software (PCB development) Protel 2004 Schematic capture Layout,Interface Type,Switch input Signal input LED driver Relay driver Power supply K line interface MCU Layout,Switch input (1),Switch to Ground,The digi
25、tal input has a switch to ground. The current through switch is determined by the pull-up resistor R4. The ESD protection is provided by a capacitor C22 and a low resistance impedance. The maximum current is determined by a series resistor R5. Debounce is additional made by a capacitor C3.,To BCM In
26、put,Switch input (2),Switch to Vbat,The digital input has a switch to Vbat. The ESD protection is provided by a capacitor C31 and two voltage clamping diodes. The maximum current is determined by a series resistor R55. Debounce is additional made by a capacitor C20.,Signal input,Speed signal input,S
27、peed signal input is from vehicle speed sensor. Speed signal is measured after a RC-Network directly at the Timer of the microcontroller.,From speed sensor,LED driver,LED driver,LED Indicator is driven by a transistor. RC-Network would help minimize EMI effects. R91 and R84 are optional depending th
28、e load circuit.,Relay driver,Relay driver,Relays are driven by NCV1413 transistor arrays. The following loads are controlled by relay: door lock, window lift motor, sunroof motor, rear window deforest.,Power supply,Power supply,NCV4276 supplies the stable voltage with low quiescent current consumpti
29、on in harsh automotive environments. Diode D13 provides reverse battery voltage protect.,K line interface,K line interface,The MC33290 is a serial link bus interface device designed to provide communication interfacing in automotive diagnostic applications. It is designed to interface between the ve
30、hicles on-board microcontroller and systems off-board the vehicle via the special ISO K line. The MC33290 is designed to meet the Diagnostic Systems ISO9141 specification. The devices K line bus drivers output is fully protected against bus shorts and overtemperature conditions.,MCU Layout,MCU Layou
31、t Recommendation,Software Module (API, Algorithm, Flowchart),Codewarrior Project Organization Programming guideline Hardware Drivers Initialization, Timer, A/D, SPI, IO, SCI, ICG,FLASH EEPROM Emulation Bootloader Documentations LIN Driver (Available) CAN Driver (Available),Slide 25,Example-Microcont
32、roller Abstraction Layer,Slide 26,Overview of Software Architecture,Slide 27,Flash.c,16-ch 10-bit ADC.c,KBI.c,SPI.c,IIC.c,SCI.c,6-ch 16-bit Timer1.c,CAN.c,LIN.c,LVI.c,Key Module,Door Lock Module,Sunroof module,Windows LiftModule,RKE Module,Turn Light Module,Anti-theft Module,Rear Window Defrost Modu
33、le,K-Line,Interior LightModule,ICG.c (20MHz bus),2-ch 16-bit Timer2.c,BCM, DDM, PDM,Application layer,Module layer,Drivers layer,CodeWarrior Project Demo: A LIN cluster,Structure DescriptionThe Cluster comprise one LIN master (MC68HC908GZ16) and two slaves (MC68HC908EY16, MC68HC908QY4).Function Desc
34、riptionEach slave has four LEDs whose states can be controlled by a single push-button switch. The resulting four bits of data is returned to the master and displayed on four green LEDs. The other four red LEDs on the master are used to indicate the slave ID. If more than one slave is connected, the
35、 masters display cycles round all those present on the bus.,Slide 28,LIN Cluster Master Schematics,Slide 29,LIN Cluster: Software Architecture,Target Platform HW Modules: MCU, on-chip and on-board peripherals Files: CACLE.SchDoc / CACLE.PcbDoc,Slide 30,Drivers Layer Driver: Timer, SCI, SPI Files: hw
36、LinSci.c, hwLinTmr.c ,sysVector.c, Start08.c,Modules Layer Middleware API: LIN API Files: funLinapi.c, funLincfg.c, funLininit.c ,Application Layer Middleware API: Master/Slave API Files: appMaster.c ,appSlave.c,HARDWARE,Software,LIN Cluster: Files Review,CACLEBLin.prm : Link Specification Informati
37、onLINK LinMgz16.absNAMESansi.lib ENDSECTIONS LIN_ZRAM = READ_WRITE 0x0040 TO 0x00FF; /* zero page */LIN_RAM = READ_WRITE 0x0100 TO 0x03BF; /* program data */LIN_STACK = READ_WRITE 0x03C0 TO 0x043F; /* stack */LIN_ROM = READ_ONLY 0xC000 TO 0xFDFF; /* program code ENDSTACKSIZE 0x001FENTRIES_vectab END
38、 INIT _Startup /* contains line replacing default _PRESTART */ MAPFILE ON,Slide 31,LIN Cluster: Files Review,Start08.c: Startup Codestatic void Init(void) /* purpose: 1) zero out RAM-areas where data is allocated2) init run-time data3) copy initialization data from ROM to RAM*/asm ZeroOut:LDA _start
39、upData.nofZeroOuts:1 ; nofZeroOutsINCASTA i:1 ; i is counter for number of zero outsLDA _startupData.nofZeroOuts:0 ; nofZeroOutsINCASTA i:0LDHX _startupData.pZeroOut ; *pZeroOutBRA Zero_5CopyDown: ; #pragma NO_EXIT _EXTERN_C void _Startup(void) INIT_SP_FROM_STARTUP_DESC(); / 1) initialize the stackI
40、nit(); / 2) initialize run-time, .initialize the RAM, copy down init dat etc (Init)_asm JMP main; / 3) call main; ,Slide 32,LIN Cluster: Files Review,hwLinSci.c: SCI management module. /* Function : l_ifc_connect_sci0* Description: Connect SCI - clear all SCI flags, enable SCI interrupts, reset idle
41、 timeout.* Returns: 0 - success* 0 - called before l_ifc_init()* Notes: If already connected then do nothing. l_sys_init service shall not be called from an interrupt.*/ l_bool l_ifc_connect_sci0( void ) l_irqmask intMask;/* if l_ifc_connect called before l_ifc_init then return error */if ( (LIN_Sta
42、teFlags ,Slide 33,LIN Cluster: Files Review,funLinapi.c: LIN API realization/* Function : LIN_GotoRun* Description: Change the current driver state from SLEEP to RUN: The LIN_GotoRun* service changes the current driver state from Sleep to Run* and reset the No-Bus-Activity condition counter. If the
43、current* driver state is Run already, this service call do nothing.* Returns: none* Notes: 1. API Service call* 2. MASTER: Set Idle timeout;* set WakeupDelimiter timeout and wait it* 3. SLAVE: Set Idle timeout and go to IGNORE state* 4. If in RUN already - no any actions* 5. DisableInterrupt dont ne
44、eded becouse in SLEEP mode* driver do nothing*/ void LIN_GotoRun( void ) if ( LIN_StateFlags #endif /* defined(SLAVE) */ ,Slide 34,Mid-range Platform open questions,Crash detection Is this a CAN message? Door unlocking - where is the signal from? Power Seat Is stall detection required? Feature disab
45、led at certain speed? Window Lift No anti-pinch but one-touch window lift? Clarify illuminator group What items are inside this group? RKE indicator Anti-theft light or LED? Number of inputs required for Keylock? (2,3,4) Curtain inputs via CAN? Mirror fold current document states 90mA, but surely to
46、o low Vehicle speed How is this measured, and how frequent is it updated? How is this communicated into the body? Ignition Key Status? Sunroof completely independent module?,Slide 35,Mid-range System architecture,Slide 36,Body Controller Module,(LIN Master),Driver Door Module,(LIN Slave),Passenger D
47、oor Module,Door Lock,Window Lift,Keypad,Mirror (& Turn Light),Power Seat control,Window Lift Rear Right,Window Lift Rear Left,RKE,Courtesy lighting,(LIN Slave),Door Lock,Window Lift,Keypad,Courtesy lighting,Front Lighting,Mirror (& Turn Light),Vehicle Speed (is this direct to door, or network ok?) Crash detect,Missing functions,Rear Window Defrost,Front wiper & washer,Horn control,Antitheft Alarm,Door Lock,LIN Network,