Task 1: Connect RTE signals to can
via COM.
1. Import DBC file from folder (Unit 2) on GIT (replace existing DBC). Use input file
assistant. Resolve all problems after import.
2. Regenerate BswM state machine for Communication Control and Ecu State Handling.
3. Replace DBC file in CANOE Simulation via Simulation Setup.
4. Connect the below signals to SWC. This is done in 2 steps:
- In DaVinci Developer create SR interfaces and ports for each message. Then create
delegation ports for the SWC. Use context menu on port
- In DaVinci Configurator perform data mapping from RTE signals to CAN signals
- Connect CAN message msg_OperationTime to the existing internal signals.
- Connect CAN msg_TotalOdometer to SWC_Main - transmit
- Connect CAN msg_TripOdomoter to SWC_Main - receive
5. Implement the following behavior:
- TotalOdometer shall be incremented according to the changed TripOdometer.
Example: TotalOdometer is 100, TripOdometer changes from 50 to 55,
TotalOdomoeter shall be set to 105.
Watch out!
In order to be able to generate and send tripOdometer from Canoe and receive it in your SWC
you need to select this magic option:
6. Configure msg_TotalOdometer inside COM module, to trigger a message send when the
signal value changes. Go: Basic Editor -> Com and check message/signal configuration related
to transmission. TIP: COM transfer property at signal level and TX mode true and false at PDU
level. Read description of those options in Properties pane (by default displayed in bottom left
corner).
Result
ECU is sending minutes and seconds cyclically (you can see that values are changing in Canoe
trace pane when simulation is running). When you will manually send Trip odometer, ECU will
respond by sending updated Total odometer (again you can see this updated value in trace)
Task 2: Configure PduR gateway
(optional)
Goal of this task is to implement an Pdu gateway for CAN Message: msg_PduR_Tx,
msg_PduR_Rx.
The content from msg_PduR_Rx shall be copied to msg_PduR_Tx in reversed byte order. Start
from receiving msg_PduR_Rx signal in your CDD.
1. Create your own BSW Cdd Driver (from SIP definition): PduGateway as lower lower
level module.
2. Change routing inside PduR for the signals:
- Change source from COM to PduGateway for msg_PduR_Tx.
- Add PduGateway destination
3. Generate, implement necessary functions/files.
TIP: To rewire connection you need to create PDUs for your CDD. This can be done e.g. under
Routing Paths in DV Configurator (there is a minimal wizard available while setting
Source/Destination). Also keep in mind Tx/Rx meaning when comes to lower level module.
TIP2: In case of compiler errors modify _compiler_cfg.h file and add necessary BSW module
macros: