Cannot connect Clock directly to ADC_Sar_Seq::SOC

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.
Anonymous
Not applicable

I want to trigger ADC sampling @1000Hz with a Clock. However, I get a (for me) strange error:

   

 

   

Pin guidance unavailable: Invalid connection for clock "Clock_ADC_SAR_Seq" connected to "\ADC_SAR_Seq:cy_psoc4_sar\:trigger".

   

Pin guidance could not be updated due to an error. Fix the error to get updated pin guidance. See summary for details.

   

 

   

See attached image ClockToSOC.png . But if I connect it through a FreqDiv there is no error, see attached image ClockToFreqDiv.png . How do I trigger a SOC with a Clock @1000Hz?

   

 

   

Also: I see that the Clock symbol has a white square graph, but on other designs I had a black square graph. And I do not know where "summary" is.

   

 

   

EDIT: I saw that the Clock frequency was falsely set to "1000 kHz", but correcting it to "1 kHz" did no difference.

0 Likes
1 Solution
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

SpeedyCat this input is not the clock input it is for soc – Input *
This input is used for the Start of conversion or scan. It is visible if you set the Sample mode parameter to Hardware trigger. A rising edge on this input starts an ADC conversion. The first soc rising edge should be generated at least 10us after the component is started to guarantee reference and pump voltage stability. You can connect the output of a TCPWM component to this input. It can also be connected to any GPIO pin or a UDB.
This input is hidden if you set the Sample mode parameter to Free Running.

   

That is why you are getting an error.  if you want a clock you need to select external in the clock selection on the configuration box.  Also please post your code so we can check it for this error. 

View solution in original post

0 Likes
8 Replies
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

SpeedyCat this input is not the clock input it is for soc – Input *
This input is used for the Start of conversion or scan. It is visible if you set the Sample mode parameter to Hardware trigger. A rising edge on this input starts an ADC conversion. The first soc rising edge should be generated at least 10us after the component is started to guarantee reference and pump voltage stability. You can connect the output of a TCPWM component to this input. It can also be connected to any GPIO pin or a UDB.
This input is hidden if you set the Sample mode parameter to Free Running.

   

That is why you are getting an error.  if you want a clock you need to select external in the clock selection on the configuration box.  Also please post your code so we can check it for this error. 

0 Likes
Anonymous
Not applicable

bobgoar, I think you misunderstood my intention. Otherwise I misunderstand the functional behaviour of ADC_SAR_Seq.

   

 

   

My clock shall trigger a sample each 0.001 s. Hence I need a signal to start a conversion, i.e. a signal into SOC if I configure the "sample mode" of ADC_SAR_Seq as "hardware trigger". As far as I understand, the "clock source" of ADC_SAR_Seq is a clock needed for the internal mechanics of the component (and with the setting "external" we get an input ACLK).

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You cannot use a clock component as hardware trigger. Clocks are handled differently in PSoC4s from "normal" signals. Use a FF, PWM or timer to get a working signal.

   

 

   

Bob

Anonymous
Not applicable

I pretty sure I connected clocks directly to ADCs in PSoC5LP, but maybe that is not possible on PSoC 4 BLE (could that be because DMA needs at least 2 SYSCLK ticks ensure triggering)?

   

 

   

Which one is the simplest/canonical component you would suggest? These components looks very overkill (lots of connectors).

   

What is a FF?

   

 

   

Thank you

0 Likes
Anonymous
Not applicable

Can you post a picture of a design that triggers a ADC_SAR_Seq sample each 0.001 s using one of these suggested components, and also a picture of its component configuration? This should not be much work; I just need to know the input to ADC_SAR_Seq needed to trigger a sample.  I know how to do the DMA part. I assume the EOC signal is triggered after conversion.

   

I need the 1000Hz clock to be as precise as possible.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

It is easier for me (quite fewer work) when you post your project and give me the opportunity to apply a few changes.

   

Clock accuracy depends on HFCLK source. Without crystal you'll get only 2% accuracy.

   

FF is a flip flop. Seems to have become unusual with these highly integrated circuits we are working with 😉

   

 

   

Bob

0 Likes
Anonymous
Not applicable

OK, thank you 🙂 I will come back to you/this post later, because I was forced to focus on other things for the moment!

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

SpeedyCat, I'm waiting for you ;-))

   

 

   

Bob

0 Likes