Hi ahmed hrabi,
1)How to set the adc on maximum sampling rate ?
Do you want to set the sample time or conversation rate?
Sample time, you can find it from the K64 reference manual:

To select which sample time, it determined by your hardware, more details, please read this application note:
http://cache.nxp.com/files/microcontrollers/doc/app_note/AN4373.pdf
About the max conversation time for 16 bit, you can find it from the K64 datasheet:

2) How to determine the value of the ADC maximum sampling rate with a custom configuration?
I think you want to know the adc conversation rate, not the sampling rate.
If you know how to calculate the conversation rate, then it is easy to know the conversation rate from the customer configuration.
Please read the k64 reference manual, chapter 35.4.4.5 Sample time and total conversion time.



Just checking the customer's register configuration, then according to the above formula and calculate it.
Please calculate it by yourself at first.
If you still have question, please contact me!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------