You are here

"Divided clock cannot be used with UDB components" error | Cypress Semiconductor

"Divided clock cannot be used with UDB components" error

Summary: 27 Replies, Latest post by H L on 21 Aug 2014 02:25 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
kvmarra's picture
User
26 posts

I am getting the following error when trying to program my device.

Divided clock "ADC_intClock" cannot be used with UDB components, analog components, or pins because its frequency exceeds half of the HFCLK frequency. (App=cydsfit)

I'm unsure how to make sense of this error- I've attached my project for your reference. Any advice is greatly appreciated!

 

 

user_14586677's picture
User
7648 posts

I raised your IMO to 6 Mhz, that error goes away.

 

However there are now analog routing errors. I think you will have

to consult TRM, limitations, fixed pin assignments, to resolve this

problem.

 

Regards, Dana

user_14586677's picture
User
7648 posts

There is some info here as well on pin limitations/routing -

 

Normal
0

false
false
false

EN-US
X-NONE
X-NONE

MicrosoftInternetExplorer4

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}

http://www.cypress.com/?rID=93401

 

Regards, Dana.

kvmarra's picture
User
26 posts

Dana - I can't thank you enough for all your help. I've looked into the Internal Main Oscillator to learn a bit about what it is and how it functions, but I am having trouble finding where in the creator I can change its setting to 6 MHz.

I will use your attachment to solve the errors to follow - thanks for leading me to that information!

kvmarra's picture
User
26 posts

Nevermind! Of course, I find it moments after I post that message!

kvmarra's picture
User
26 posts

So, I've used the example project "OpAmp_Dynamic_Gain_Switching" to build the attached layout. Using this example project, along with the PDF you attached (Dana), I've tried to configure my pins appropriately. However, I am receiving the following error when trying to build/program:

"Unable to find a solution for the analog routing.
The analog side could not be routed due to congestion or other constraints."

Comparing my setup to the example project, I'm fairly confident that the following pins are correct:

Input_1
Input_2
G1
G2
G3
A_Out
A_Out2
LED
UART
In_Sel

These are the pins/issues I'm unsure about:

1. Since I will be using 2 opamps, I'm unsure whether the following gain outputs are incorrectly placed:

G1b
G2b
G3b

2. The ADC SAR Seq:

According to the PDF you (Dana) attached above, the ADC should be attached to P1[7]. When it is not, I receive the following error instead of the one mentioned above.

The external pin of SAR \ADC:cy_psoc4_sar\ is used in your design. This external pin must be placed in GPIO [IOP=(1)][IoId=(7)]. In your design, the external pin is locked to GPIO [IOP=(1)][IoId=(5)]. 
(IN THIS CASE I CONFIGURED THE ADC TO P1[5])

The main difference between my project and the example project is that I'm trying to measure and output the differential between two signals. My overall aim is to feed one (bio)signal into Input 1, another (reference) signal into Input 2 (in order to subtract out the noise), and to have the ADC spit out the difference between the two inputs.To that end, I have the following questions:

a.) Is the ADC configured to the correct pin? Is this configuration allowed on that component?

b.) Or, should I connect each OpAmp to it's own grounded ADC and program the output to subtract the two signals?

Thanks again for all your help!

user_14586677's picture
User
7648 posts

I tried various alternatives, no luck. Unless someone else can

spot the issue you should consider filing a CASE.

 

Normal
0

false
false
false

EN-US
X-NONE
X-NONE

MicrosoftInternetExplorer4

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}

To create a technical case at Cypress -

 

www.cypress.com

“Support”

“Technical Support”

“Create a Case”

 

You have to be registered on Cypress web site first.

 

Regards, Dana.

kvmarra's picture
User
26 posts

Thanks Dana for your continued help. I just filed a new case.

kvmarra's picture
User
26 posts

I welcome any further suggestions - I have many copies of this project that I'm hoping to toy with!

kvmarra's picture
User
26 posts

The support team was immensely helpful with the configuration! The solution was that I needed to unlock my pins and, while building/programming, the PSoC creator was able to appropriately assign these pins for me.

Now the PSoC is programmed with the code on the attached file. However, pushing the PSoC's switch does not cause the gain to switch from G1 to G2 to G3. My code (below) starts and initializes the AMux'es - is there anything I am neglecting to do in order to make the switch toggle between both G1, G2, G3 and G1b, G2b, G3b, respectively?

In addition to being on the attached file, the relavent code is below:

void

main()int8 channel = 0;int16 mVolts = 0; int16 previousValue = 0;float chGain[3u] = {GAIN1, GAIN2, GAIN3};/* Start the Components */

Opamp_Start();

Opamp2_Start();

ADC_Start();

Gain_AMux_Start();

Gain_AMux2_Start();

UART_Start();

 

 

/* Start ISRs */

ADC_IRQ_StartEx(ADC_ISR_Handler);

Isr_SW2_StartEx(SW_ISR_Handler);

 

 

/* Enable global interrupts */

CyGlobalIntEnable;

 

 

/* Initialize both the analog mux (AMux) to default channel 0 */

Gain_AMux_Next();

Gain_AMux2_Next();

 

 

/* Start ADC conversion */

ADC_StartConvert();

 

{

 

{

;

for(;;)while(dataReady == 0u)/* Wait for ADC conversion */

}

 

 

/* Convert the ADC counts to mVolts. ADC is configured to be single channel */

mVolts = ADC_CountsTo_mVolts(CHANNEL_1, ADC_GetResult16(CHANNEL_1));

 

 

mVolts = mVolts / chGain[Gain_AMux_GetChannel()];

 

 

/* Divide the result by gain of current channel */ /* If switch SW2 is pressed, change the input channel */

 

{

 

if(switchFlag)/* Select the next input channel and its corresponding gain */

Gain_AMux_Next();

Gain_AMux2_Next();

switchFlag = 0u;

}

 

 

/* Check ADC limit detection interrupt */

 

{

 

if(windowFlag)/* Turn ON the LED when input is outside the voltage window (250mV - 750mV) */

LED_Write(LOW);

 

 

/* Note: If LED is active HIGH, then replace "LOW" with "HIGH" */

}

 

else

{

 

/* Turn ON the LED when input is outside the voltage window (250mV - 750mV) */

LED_Write(HIGH);

 

 

/* Note:If LED is active HIGH, then replace "HIGH" with "LOW" */

}

 

 

/* If the result changes, send it to UART */

 

{

SendChannelVoltage(channel, mVolts);

previousValue = mVolts;

}

}

}

if(previousValue != mVolts)

{

 

 

 

 

 

kvmarra's picture
User
26 posts

I should add 2 things:

1. Right now, the device functions only to output the gain from G1. The switch doesn't change the gain.

2. I added this code (as I referenced the example "OpAmp_Dynamic_Gain_Switching") but after programming the device with this new addition, the result was an output of no volts.

 

/* Get the active input channel */

channel =Gain_AMux_GetChannel();

channel =Gain_AMux2_GetChannel();

 

Log in to post new comments.