You can find an example code at the path C:\Freescale\Freescale_MQX_4_2\mqx\examples\can,

For boards twrk70f120m and twrk60n512 the new fsl_flexcan driver is used whereas for other boards including twrk20d72m, twrk21f120m, twrk40d100m, twrk40x256, twrk60 d100m, twrk60f120m, twrmcf52259, twrmcf54418, twrpxd10, twrpxn20, twrpxs30 the old kflexcan driver is used. You can use this example as reference.