Hi Hou,
The FreeMASTER serial driver (https://www.freescale.com/webapp/Download?colCode=FMASTERSCIDRV&appType=license&location=null&fasp=1...)
supports also the S12 family. The Serial driver package contains the example application for 9S12DP256 (c:\Freescale\FreeMASTER_Serial_Communication_Driver_V1.8\examples\HC12\9S12DP256\).
The responsibility of the application is to initialize the communication interface, configure pins and define base address of the communication interface and interrupt in freemaster_cfg.h (FMSTR_CAN_BASE, FMSTR_CAN_RX_INTERRUPT, FMSTR_CAN_TX_INTERRUPT).
The example application shows you, how can be MSCAN module initializes. I have checked the registers on both CPUs (S12DP and S12G) and they are equal -> you can use same initialization routine, you have to set the baudrate correctly.
I recommend you to use the FreeMASTER driver this way.
The second option is the procesor expert. The FreeMASTER component was defined only for DSC at the begin. Three year ago I enhanced this component for all platforms, which are supported by CW10.x. The S12G is not supporteed by CW10.x and CW5.1 was released, when FreeMASTER component was not ready for S12 devices. This is reason, why you cannot find the FreeMASTER component in the CW5.1.
Please make sure, that your CAN interface on PC is supported by the FreeMASTER tool
- CANcard-compatible cards based on VCAND 4.3.60 driver from Vector Informatik GmbH or above. Tested with CANcardX and CANcardXL PCMCIA cards and CANcaseXL with USB interface.
- USB-to-CAN devices based on VCI driver V3.0 from IXXAT or above. Tested with USB-to-CAN Compact inteface.
- NI-CAN devices based on nican driver 2.6.3 from National Instruments or above. Tested with NI PCMCIA-CAN/2 card.
- G-Linker CAN adapters based on G-Linker VCI driver V3.3. Plug-in was tested with the GY8507 adapter.
- ZLG CAN adapters based on modified VCI driver. Plug-in was tested with the ZLG USBCAN-II adapter.
Regard,
Jaroslav