Hi Huu,
Additionally to Ray's answer, I would like to recommend small collection of our example codes for S12G:
https://community.freescale.com/docs/DOC-93792
I hope it helps you.
Have a great day,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------