Help Configuring External Oscillator

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.
joli_601446
Level 5
Level 5
10 likes given 10 sign-ins 5 sign-ins

Hello, I'm using two MEMS oscillators for the MHzECO and the 32kHzECO. Here is my schematic:

PSOC5_CLOCK_CONN.jpg

This picture will look familiar to readers of the forum because I submitted this question a while back but didn't get the problem resolved.

Here is my Clock Config Settings:

ClockSettings.jpg

I'm a little confused on setting up the Clocks when not using a Crystal Oscillator. I have read the app note:

http://www.cypress.com/file/141216/download but I must not be understanding things completely so need some help.

Here is my Pin view?

PSOC_Pins.jpg

I see that pins 56 and 55 shows XTAL32Khz but actually pin 55 is a  No Connect. Is this okay?

Should I add pin in the TopDesign.cysch call it "MHZ_in" and connect it to pin 43 since that is the pin connected to the external clock? And then what should be done with pin 42?

I have also uploaded my project in a zip file.

I just need some help in the Clock settings and the pins connections.

If anyone can help please take a look at my project and change what needs changing and send it back to attach a screen shot.

Thank you,

Joe

0 Likes
1 Solution

That statement specifically is from This thread, which is regarding a PSoC 3, but in this case also applies to the PSoC5.

For something more concrete/official, AN54439 basically says the same thing:

External clocks can be routed into the part through the kHz and MHz XtalIn pins. The XtalOut pins should be allowed to float.

View solution in original post

0 Likes
10 Replies
lock attach
Attachments are accessible only for community members.
KyTr_1955226
Level 6
Level 6
250 sign-ins 10 likes given 50 solutions authored

So you aren't using a Crystal Oscillator, you're using a digital clock module.  You don't want to select XTAL in the Clock Config, as it configures those two pins specifically to drive a crystal.

You will want to use the Digital Signal option for your clock and disable the ECO.  You CAN use the same pin (15[0] or 15[1]) though, since with XTAL disabled, you can just assign those pins as GPIO.  Bring your oscillator signal into the PSoC on one of those pins and then just set the Clock Config for Digital Signal and point it to the wire net name you connected to the digital clock input:

pastedImage_1.png

pastedImage_2.png

pastedImage_3.png

I attached the workspace with this done, but I didn't assign an accuracy range for the clock.

I don't think you can do that for your 32KHz though.  I think you'll need an actual Crystal for that.

[EDIT]

You can use a digital Signal for 32KHz as well, just hook it to the 32KHz input and it looks like it will work.

See:

Oscillator digital clock on ECO input pins

0 Likes

Hello, thank you very much for the information. I will give it a try. Also, Please look at the following

Oscillator digital clock on ECO input pins

Here is the last post:

"MHz XTAL pins are also GPIOs. Hence they can be used as normal GPIOs. Disable the ECO in the .cydwr -> clock tree and select the Digital Signal and source the other clocks from Digital clock. The procedure is same as in the AN60631.

If the peak to peak amplitude of the MEMS oscillator is 3.3 V or more, it should work because internally the signal gets into the clock tree where a level shift will reduced it to 1.8 V peak to peak.

For KHz ECO, you need to enable the KHZ ECO in the clock tree and just connect the external MEMS oscillator to the KHz ECO input. No setting is required for this in Creator.

So summary is MHz ECO needs to be disabled and the same input pin can be used to give external digital clock. But KHz ECO needs to be enabled and connect external clock to the input pin of KHz ECO in PSoC.

I tested both of the clocks int the above mentioned configuration and found it to be working."

I believe that you can use an an External Oscillator for the 32KHz input. Let me know what you think and maybe others can chime in too.

Thank you very much,

Joe

0 Likes

For KHz ECO, you need to enable the KHZ ECO in the clock tree and just connect the external MEMS oscillator to the KHz ECO input. No setting is required for this in Creator.

Whoops, I missed that line.  I'll append my other post.

Cheers,

-Kyle

0 Likes

Kyle,

Hello, I did as you suggested an added a pin named SYSCLK. When I click on the ellipse in the Digital Signal Window I don't see SYSCLK show up only NET_68 and other numbers. How can get SYSCLK to show up?

Thanks,

Joe

0 Likes

For some reason you can't tie it directly to your pin, but you have to tie it to a net.

Place the input pin and tie a wire to it (see the picture in my earlier post.  CLKIN is the pin name, SYSCLK is the net name) You can then give that wire a custom name (a net name), and that net name is what will appear in the Digital Signal window.

0 Likes

Kyle,

Hello, I did as you suggested and named the Wire SYSCLK and it then was present after I clicked the ellipses. Thanks. I do have another question, when it says, "enable the KHZ ECO in the clock tree" does that mean the XTAL_32KHZ block should be checked in the Clock setting? Last, take a look at my current Pins view. You will see that the Pins 55/56 show "XTAL_32Khz. But, pin 55 is a No Connect. Is this something we just ignore or is there something more we need to do?

Thanks,

JoePSOC_PinsView.jpg

0 Likes

I'd imagine you would have to enable 32KHz in the clocks tree for it to work.

The other thread implies just hooking up the input and leaving the output hanging N/C should work:

So summary is MHz ECO needs to be disabled and the same input pin can be used to give external digital clock. But KHz ECO needs to be enabled and connect external clock to the input pin of KHz ECO in PSoC.

Of course, that thread is for a PSoC 3, so it may not necessarily carry to a PSoC5.  Maybe someone from Cypress can chime in and confirm if this is OK on a PSoC5?

[EDIT]

Aha!  Found this appnote:

http://www.cypress.com/file/141216/download

Check section 7.7:

External clocks can be routed into the part through the kHz and MHz XtalIn pins. The XtalOut pins should be allowed

to float. Ideally, the external signals should be rail-to-rail sine or square waves. If the amplitude of the signals is too low,

they may not be properly translated into digital signals. These signals must be within the frequency ratings of the ECOs,

either at 32.768kHz or 4-25MHz.No additional firmware is required. Just setup the oscillator, as if using a crystal, in

the Clocks section of the Design Wide Resources in PSoC Creator.External clocks can also be routed into the part using the GPIOs.

For more details, see AN60631

0 Likes

Kyle,

Hello, wonderful thank you very much. You have been very helpful in getting me the right answers. I was about to switch to a crystal. Thank you for helping me get the MHz_ECO setup correctly in the clock tree.

Joe

0 Likes

Kyle,

Is the following statement documented, "So summary is MHz ECO needs to be disabled and the same input pin can be used to give external digital clock. But KHz ECO needs to be enabled and connect external clock to the input pin of KHz ECO in PSoC."

Joe

0 Likes

That statement specifically is from This thread, which is regarding a PSoC 3, but in this case also applies to the PSoC5.

For something more concrete/official, AN54439 basically says the same thing:

External clocks can be routed into the part through the kHz and MHz XtalIn pins. The XtalOut pins should be allowed to float.

0 Likes