ADC Init Problem

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

ADC Init Problem

跳至解决方案
1,452 次查看
mkrug
Contributor II

Hello,

after that I realized that Enable/Diable ADC with the LDD component does not really do what I expectI decided to go to the Init_ADC component. It gives me the additional advantage to setup a DMA transfer what I will very likely need.

However even the normal Init() function leads to some suspect problem. It seems to me that the Init() function (in my case the function is called Line_Camera_Init() want to change registers but is not successful. In my actual case I realized that the first call to ADC1_CFG1 does not lead to the desired change in the register - I hope you can see this from the screenshot. For example ADICLK is not changed to 3 (the last two  bits in ADC1_CFG1. It gets even worse. In the second command the Init() function wants to change ADC2_CFG2. The access to this register leads to a crash and I find myself in the ISR CPU_Interrupt.

Can anyone explain this behaviour? I am using CW10.4 on a Kinetis K60 Tower System.

Best Regards

Markus

ADC_Init01.jpg

0 项奖励
回复
1 解答
1,263 次查看
vfilip
NXP Employee
NXP Employee

Hello,

you have to enable clockgate for ADC device. Check top of the component there is item you need to enable.

rgds

Vojtech Filip

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,264 次查看
vfilip
NXP Employee
NXP Employee

Hello,

you have to enable clockgate for ADC device. Check top of the component there is item you need to enable.

rgds

Vojtech Filip

0 项奖励
回复
1,263 次查看
mkrug
Contributor II

Dear Vojtech,

thanks for the hint. I just overlooked that item. Is there a difference in LDD components in Init components concerning that item. If I remember correctly the LDD components work even if clockgate is not enabled. But I am not sure and will double check this.

Best Regards

Markus

0 项奖励
回复