PSoC4S MAX : Change IMO to ECO

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

cross mob
MiNe_85951
Level 7
Level 7
Distributor - TED (Japan)
50 likes received 500 replies posted 50 solutions authored

Dear Sirs and Madams,

 

I have a question regarding clock changes for PSoC4.

 

We are considering using ECO(External Crystal Oscillator) as the main clock for PSoC4S MAX.

I remember that in PSoC Creator, it was necessary to write the API in main.c when changing IMO of PSoC4 to ECO.

Does Modus Toolbox automatically switch during the boot process if ECO is set in Device Configurator?

 

ECO frequency will use 24.576MHz or 22.579MHz.

Is there a way to check the time it takes to stabilize after switching from IMO to ECO?

I remember having to wait until it stabilized to change clocks such as IMO in PSoC Creator.

The API in Modus Toolbox does not describe such latency.

 

Regards,

0 Likes
1 Solution
ChristopherF_51
Employee
Employee
100 sign-ins 25 solutions authored 10 likes given

Hello @MiNe_85951 

I see no one replied yet, and I wish I was smart enough to answer your questions thoroughly. Hopefully someone else will also reply. In the meantime, this is what I did to use the ECO:

  • Started Eclipse and created Hello World app for the CY8CKIT-041S-MAX.
  • Opened Device Configurator, and on the System tab, enabled ECO and entered frequency of 24.5760.
  • Selected the HFCLK and changed source clock to EXCO. This created a Notice telling me to fix the divider value; I selected the little fix-it tool to have it done for me.
  • Saved Device Configurator, then built the application. No errors.
  • I did not change anything in main.c. The Device Configurator updates/generates code in the GenerateSource directory inside the BSP folder.
  • I see there is also a file called startup_psoc4100smax.c in the BSP folder. I didn't change anything there either, but I don't see anything about clocks in it.

I do not know if you have to write an API to specify using the ECO instead of IMO. It just seems to work for me. However, I am not an applications engineer, so I am just guessing. Also, I do not know how to answer the stabilization question. 

Sorry if this wasted your time, but hopefully it helped a little?

View solution in original post

4 Replies
ChristopherF_51
Employee
Employee
100 sign-ins 25 solutions authored 10 likes given

Hello @MiNe_85951 

I see no one replied yet, and I wish I was smart enough to answer your questions thoroughly. Hopefully someone else will also reply. In the meantime, this is what I did to use the ECO:

  • Started Eclipse and created Hello World app for the CY8CKIT-041S-MAX.
  • Opened Device Configurator, and on the System tab, enabled ECO and entered frequency of 24.5760.
  • Selected the HFCLK and changed source clock to EXCO. This created a Notice telling me to fix the divider value; I selected the little fix-it tool to have it done for me.
  • Saved Device Configurator, then built the application. No errors.
  • I did not change anything in main.c. The Device Configurator updates/generates code in the GenerateSource directory inside the BSP folder.
  • I see there is also a file called startup_psoc4100smax.c in the BSP folder. I didn't change anything there either, but I don't see anything about clocks in it.

I do not know if you have to write an API to specify using the ECO instead of IMO. It just seems to work for me. However, I am not an applications engineer, so I am just guessing. Also, I do not know how to answer the stabilization question. 

Sorry if this wasted your time, but hopefully it helped a little?

MiNe_85951
Level 7
Level 7
Distributor - TED (Japan)
50 likes received 500 replies posted 50 solutions authored

ChistopherF_51-san,

 

Thank you for your reply.

It would be nice if your procedure successfully switched from IMO to ECO, but in PSoC Creator, just setting it to ECO on the DWR screen did not switch, so I wanted to check the correct procedure.

Also, I remember that it took some time to stabilize when using the PSoC frequency switching API in the past.

Unlike PSoC Creator, Application notes of Modus Toolbox are not available yet so we don't know how to use it properly.

 

Regards,

 

0 Likes
ChristopherF_51
Employee
Employee
100 sign-ins 25 solutions authored 10 likes given

Hello again,

What version of ModusToolbox are you using? I recommend version 3.0. The BSP and example application I described above are available.

As for how to use ModusToolbox, we have several documents here: https://www.infineon.com/cms/en/design-support/tools/sdk/modustoolbox-software/#!documents

We also have training material on GitHub: https://github.com/Infineon/training-modustoolbox

If you are using an older version, the documentation is here: https://www.infineon.com/cms/en/design-support/tools/tools-archive/modustoolbox-software-archive/

If you are specifically using version 2.4, there is a patch to update to 2.4.1 here, which helps resolve a proxy issue on GitHub: https://softwaretools.infineon.com/tools/com.ifx.tb.tool.modustoolboxpatch24

If you are using an older version than 2.4, refer to this KBA: https://community.infineon.com/t5/ModusToolbox-General/ModusToolbox-Project-Creator-and-Library-Mana...

Let me know if you encounter any issues.

MiNe_85951
Level 7
Level 7
Distributor - TED (Japan)
50 likes received 500 replies posted 50 solutions authored

ChistopherF_51-san,

 

There is no problem if you can confirm that the PSoC4SMAX internals have properly switched from IMO to ECO in the ECO setting procedure you described.

Even if you set ECO from the Device Configurator, I doubt that the inside of PSoC4SMAX may still work IMO.

Could you confirm that it has switched to ECO with the waveform from GPIO, etc.?

 

Regards,

0 Likes