Clocking for PSoC 6 with USB and Bluetooth

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ChRe_4711096
Level 4
Level 4
50 replies posted 25 replies posted 25 sign-ins

I've read AN218241 (PSoC 6 MCU Hardware Design Considerations), but I'm not 100% sure about the correct high-level clocking setup. I need the following clocks/features:

  • M4F @ 144 MHz
  • M0+ @ 72 MHz
  • USB serial
  • Bluetooth

The appnote states that the BLE radio includes a 32 MHz oscillator and that an external 32 MHz crystal is mandatory, but also refers to AN95089 which leaves the user to choose between an external 16 or 32 MHz crystal. Also, the radio would have to be powered for this oscillator to work. If I want a bit more flexibility (i.e. have the option to turn BLE off), would I then have to use the ECO and could I use that clock for BLE as well? What crystal would I need for the ECO then?

0 Likes
1 Solution

You could use the FLL to source the USB clock. Refer to this KBA:

Using FLL to Generate Clock for USB - KBA228368

View solution in original post

7 Replies
lock attach
Attachments are accessible only for community members.
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi,

For your required clock frequencies, you need to use PLL. In the Clocks tree, route the IMO/ECO to PLL and set the PLL frequncy as 144MHz (max frequency of PLL is 150 MHz). In the HF clocks section, you can select HF_CLK0 as PLL and then you will get the desired frequncies as shown in the images attached.  The Clock_Fast runs the CM4 where as the Clock_Slow runs the BLE_ECO.

For working of BLE, the external BLE ECO is mandatory. You can select either 16MHz/32MHz ECO for this purpose. In the FLL/PLL tab you can select any clock source as source to the Path0/1/2/3/4 through PathMuxes.

Please note that you can use BLE ECO as a source for other clocks but you cannot use ECO as source for BLE.

Please let us know why you want to use ECO instead of BLE ECO.

Thanks

Ganesh

That's a start, thank you! I just discovered two other details that are relevant:

  • the BLE ECO uses pins XI and XO, leaving P12.6 and P12.7 free for I/O use.
  • IMO can apparently be trimmed with USB (I found that in the system clock config dialog / source clocks tab).

So when I create a design with a crystal on XI/XO for BLE ECO, I can still choose to disable BLE, as long as I leave IMO or another crystal-less source active. When I then have USB available, IMO can be trimmed with USB to get the necessary accuracy for USB operation. Is that correct?

0 Likes

Yes. Your understanding is correct.

0 Likes

Unfortunately I couldn't come up with a config that PSoC Creator would accept, unless I add an external 48 MHz clock (which would have to be an oscillator) for USB.

PLL must run at 144 MHz for M4f and M0+, which can't be divided to 48 MHz with the available prescalers, and the FLL isn't accurate enough for USB.

You could use the FLL to source the USB clock. Refer to this KBA:

Using FLL to Generate Clock for USB - KBA228368

Oh...awesome! Thank you very much! Is it still advisable to enable IMO clock trimming with USB or can I leave that alone?

I'd now have to add the BLE ECO as mentioned above, and that's it?

0 Likes

Yes, you still need to enable the IMO clock trimming with USB.