Hi Carlos,
Actually, in the NXP FRDM web, there has the according MMA8451Q sample code, please download the code from this link:
http://cache.nxp.com/files/32bit/software/KL46_SC.exe?fpsp=1&WT_TYPE=Lab%20and%20Test%20Software&WT_...
After you install it, you can find the code in folder:kinetis_kl46_sc_rev2\klxx-sc-baremetal\build\iar\FRDMKL46_Demo
Wish it helps you!
If you still have question, please contact with me!
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------