ADC Clock Divide Select from the register ADC0_CFG1.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ADC Clock Divide Select from the register ADC0_CFG1.

Jump to solution
670 Views
patricio
Contributor IV

Hello all,

I have a FRDM-KL25Z and I am working with the ADC.

I configure the ADC_LDD component with the PE, to make it to work in continuous measuremente mode with interrupts. I save the results of the ADC conversions into an array.

The PE defines  the Clock Divide Select bits from the ADC0_CFG1 register as input clock/2 (ADIV = 01) . However I am interested to make the conversiones as fast as possible, so I change the register value manualy to input clock/1 (ADIV = 00).

I use a led pin to see the time that needs 3000 measurements by the oscilloscope, and I see that there is no difference when I change ADIV to 00.

In both cases it need 7.13ms for 3000measuremente (2.37us per measure). How is that possible? Should not be a difference when the ADC clock is changed?

Please find below my code.

ADC Clock prescaler.png

And this is the interrupt routine:

ADC Clock prescaler 2.png

Thank you in advance. Any help will be appreciated.

Aitor.

0 Kudos
1 Solution
442 Views
marek_neuzil
NXP Employee
NXP Employee

Hello,

The problem is caused by the high ADC clock frequency. There is defined a limit frequency that depend on the selected configuration of the ADC device, see for example KL25Z datasheet:

http://www.freescale.com/files/32bit/doc/data_sheet/KL25P80M48SF0.pdf?fpsp=1&WT_TYPE=Data%20Sheets&W...

There is following table:

pastedImage_0.png

When you set higher ADC clock frequency the behavior of the ADC device is not defined (I have already checked on the FRDM-KL2Z target board).

You can enable High-speed conversion mode, 8-bits A/D resolution and shortest sample time to achieve the fastest conversion time. See also the KL25Z reference manual for details about the ADC conversion time.

Best Regards,

Marek Neuzil

View solution in original post

2 Replies
442 Views
patricio
Contributor IV

Thank you Marek,

BR.

0 Kudos
443 Views
marek_neuzil
NXP Employee
NXP Employee

Hello,

The problem is caused by the high ADC clock frequency. There is defined a limit frequency that depend on the selected configuration of the ADC device, see for example KL25Z datasheet:

http://www.freescale.com/files/32bit/doc/data_sheet/KL25P80M48SF0.pdf?fpsp=1&WT_TYPE=Data%20Sheets&W...

There is following table:

pastedImage_0.png

When you set higher ADC clock frequency the behavior of the ADC device is not defined (I have already checked on the FRDM-KL2Z target board).

You can enable High-speed conversion mode, 8-bits A/D resolution and shortest sample time to achieve the fastest conversion time. See also the KL25Z reference manual for details about the ADC conversion time.

Best Regards,

Marek Neuzil