cyclic adc (CADC) example?

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

cyclic adc (CADC) example?

841 Views
petermeerwald
Contributor I

Hello,

 

how do the CADC_Xxx() functions relate to the ADC16_Xxx() functions provided by the KSDK?

when to use which?

 

is there example code available for CADC?

 

thanks, p.

Labels (1)
Tags (1)
0 Kudos
6 Replies

612 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Peter,

About the CADC example , please refer to here :  ....\KSDK_1.1.0\doc\Kinetis SDK v.1.1 API Reference Manual.pdf   ->  6.3.5 CADC Call diagram , this example illutrates how to use the  CADC driver.

Best Regards,

Alice

------------------------------------------------------------------------------------------

If this post answers your question, please click the Correct Answer button.

-----------------------------------------------------------------------------------

If this post help your question, please click the helpful Answer button.

0 Kudos

612 Views
petermeerwald
Contributor I

ADCA_IRQn is not defined in the KSDK, how is this supposed to work?

...KSDK_1.1.0/platform/drivers/src/cyclicAdc/fsl_cadc_common.c:42:59: error: 'ADC_ERR_IRQn' undeclared here (not in a function)

const IRQn_Type g_cadcErrIrqId[HW_ADC_INSTANCE_COUNT] = { ADC_ERR_IRQn };

                                                           ^

...KSDK_1.1.0/platform/drivers/src/cyclicAdc/fsl_cadc_common.c:43:61: error: 'ADCA_IRQn' undeclared here (not in a function)

const IRQn_Type g_cadcConvAIrqId[HW_ADC_INSTANCE_COUNT] = { ADCA_IRQn };

                                                             ^

...KSDK_1.1.0/platform/drivers/src/cyclicAdc/fsl_cadc_common.c:44:61: error: 'ADCB_IRQn' undeclared here (not in a function)

const IRQn_Type g_cadcConvBIrqId[HW_ADC_INSTANCE_COUNT] = { ADCB_IRQn };

                                                             ^

0 Kudos

612 Views
petermeerwald
Contributor I

ADCA_IRQn and ADCB_IRQn may correspond to the values ADC0_IRQn, ADC1_IRQn defined in KSDK_1.1.0/platform/CMSIS/Include/device/MK64F12

but ADC_ERR_IRQn still is a mystery :smileyconfused:

0 Kudos

612 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Peter ,

From the Kinetis SDK API Reference Manual , 6.3.2 CADC Driver model building

"

CADC module has two ADC converters, ConvA and ConvB, which are the two

independent sample and hold (S/H) circuits. They can work simultaneously or individually for each

conversion. The driver provides APIs to configure each converter separately.

"

So i think the ADCA_IRQn is the interrupt for ConvA, ADCB_IRQn is for ConvB.

And the CADC interrupt , you can see here : 6.3.4 CADC Interrupt .

And you can see , there is little information about CADC , so in my opinion , i recommend you use the ADC16 .

Also , in the KSDK-PE project , there have “fsl_adc12” component , we can directly use it .

pastedImage_0.png


Have a great day,
Alice

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

612 Views
petermeerwald
Contributor I

Thanks Alice, I've given up on CADC, for ADC16 I'm aware of the examples.
I conclude that CADC support is broken/unusable in KSDK 1.1.

0 Kudos

612 Views
petermeerwald
Contributor I

Thanks Alice, seen that. It's still not clear what the CADC is, the MCU's reference manual does not mention it.

0 Kudos