Hi Franceso,
If you are using MK21DN512VLK5 processor, you can refer to KSDK1.3.0, twrk21d50m sample code, KSDK1.3.0 download link:
Welcome to Kinetis Expert | Kinetis Expert
You can find the sample code in folder:C:\Freescale\KSDK_1.3.0\examples\twrk21d50m
If you want to porting your MBED code to the KSDK project, you can refer to the KSDK sample code, then use the KSDK driver write the same code function from the MBED.
Wish it helps you!
If you still have question, please contact me!
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------