Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
dhruv1997
Level 2
Level 2
10 replies posted 25 sign-ins 5 questions asked

Hi,

I am working on one appliance where I am using the CY8CKIT43012 MCU. My requirement is to read high frequency data by using the SAR ADC.

As of now I am using Mods-toolbox V3.0,  HAL version 2.0 and I am reading the 5000 sample by using ADC asynchronous mode.

ADC channel configuration:

/** Default ADC configuration */
const cyhal_adc_config_t adc_config_current_obj = {
.continuous_scanning=false, // Continuous Scanning is disabled
.average_count=1, // Average count disabled
.average_mode_flags=false,
.vref=CYHAL_ADC_REF_VDDA, // VREF for Single ended channel set to VDDA
.vneg=CYHAL_ADC_VNEG_VSSA, // VNEG for Single ended channel set to VSSA
.resolution = 12u, // 12-bit resolution
.ext_vref = NC, // No connection
.bypass_pin = NC // No connection
};
/* ADC channel configuration */
const cyhal_adc_channel_config_t channel_config_current_obj = {
.enable_averaging = false, // Disable averaging for channel
.min_acquisition_ns = 167, // Minimum acquisition time set to167 ns
.enabled = true // Sample this channel when ADC performs a scan
};

I am reading the single ADC channel and I have set the sample rate as 1MSPS. And I am getting actual sample rate as 997008 Hz.

The input voltage range is 0 to 3.3V. Whenever I have read <10kHz frequency then I am getting the correct data. But once I increase the input frequency lets say 20kHz or 40 kHz then I am not getting correct output.

So I want to confirm that Is it possible to read >20 kHz frequency in the MCU by using ADC?

 

0 Likes
1 Solution
Arpit_S
Moderator
Moderator
Moderator
100 solutions authored 250 sign-ins 10 likes given

Hi @dhruv1997 ,

 

Can you please refer to Section 39.2.3.2 Reference Buffer and Bypass Capacitors in https://www.infineon.com/dgdl/Infineon-PSoC_6_MCU_PSoC_62_Architecture_Technical_Reference_Manual-Ad... 

 

Thanks!
Kind Regards

Arpit Srivastav

View solution in original post

0 Likes
2 Replies
Arpit_S
Moderator
Moderator
Moderator
100 solutions authored 250 sign-ins 10 likes given

Hi @dhruv1997 ,

 

Can you please refer to Section 39.2.3.2 Reference Buffer and Bypass Capacitors in https://www.infineon.com/dgdl/Infineon-PSoC_6_MCU_PSoC_62_Architecture_Technical_Reference_Manual-Ad... 

 

Thanks!
Kind Regards

Arpit Srivastav

0 Likes
dhruv1997
Level 2
Level 2
10 replies posted 25 sign-ins 5 questions asked

Hi Thanks for info. I am able to read 50kHz frequency using PDL. 

0 Likes