You can read our RM and source code in our BSP, we also have the https://www.nxp.com/docs/en/reference-manual/IMX_REFERENCE_MANUAL.pdf for you to learn.