ADC Init Problem

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

ADC Init Problem

Jump to solution
863 Views
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 Kudos
Reply
1 Solution
674 Views
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

View solution in original post

0 Kudos
Reply
2 Replies
675 Views
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 Kudos
Reply
674 Views
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 Kudos
Reply