TWR-K20D72M ADC0 can't work

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

TWR-K20D72M ADC0 can't work

635 次查看
bhavinmaru
Contributor III

Hello,

I am working with TWR-K20D72M board as controller and IAREW(IAR Embedded Workbench) software for programming.i download the sample codes from the below link

http://cache.nxp.com/files/32bit/software/KINETIS_72MHz_SRC.zip?fpsp=1&WT_TYPE=Lab%20and%20Test%20So...

 

In these sample codes they give example of Potentiometer(which is given on board) and Potentiometer is interfaced with controller's ADC1.this code works correctly.i want to run ADC0.i make and configure ADC0 code as per the sample code given in the above downloaded examples.please try to solve my below query

 

-- in ADC0 code isr for ADC0(interrupt for ADC0) is not generated

-- see my ADC0 configuration functions sim_init() ,pdb_init() , adc_init(), int_init() is there any mistake in those functions?

 

i attached my code for your reference.please help me so that i can generate interrupt for ADC0.

 

Thank You

Bhavin

Original Attachment has been moved to: ADC0.zip

标签 (1)
2 回复数

473 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi Bhavin,

After had a look through the code you uploaded, I found that you use the PDB channel1 to trigger the ADC, however each channel is associated with one ADC block, in anohter word, the PDB channel0 is associated the ADC0, then channel1 to ADC1.

I think it's the root cause of the issue.

Have a great day,

Ping

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

473 次查看
bhavinmaru
Contributor III

Hi jeremyzhou,

Thank you for your reply now ADC0 works properly.

0 项奖励
回复