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

cross mob
psoc_student
Level 3
Level 3
50 sign-ins 25 sign-ins 10 replies posted

Hello, I have a question while looking at the PDL library.

Please look at the picture below.

psoc_student_0-1650950849323.png

The top comment says ECO is used, and the comment below while says IMO is used.

As far as I know, "ECO is External Crystal Osilator" and "IMO is Internal Main Osilator," but aren't the two different things?

I am inquiring because the description and the code used are different.

And if I write IMO in the part where ECO is entered, is it possible to write PILO Trim based on the IMO?

 

Thankyou for your Reply

 

0 Likes
1 Solution
Ekta
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello @psoc_student 

Yes, there seems to be a printing mistake in the comment "/* Start the PILO clock measurement using the IMO */", It should have been ECO which is the external crystal oscillator.

The ECO and IMO are different clocks in the PSoC device. ECO requires the user to connect an external MHz crystal oscillator while IMO is internal to the PSoC device. It is possible to use to either IMO or ECO for trimming the PILO.

In case you want to use ECO for trimming PILO you can go with the code in the snippet.

For using the IMO there are a few changes you need to make in the snippet. For example, when starting measurement using IMO you can change the start measurement function in the following way:


/* Start the PILO clock measurement using the IMO */
(void)Cy_SysClk_StartClkMeasurementCounters(
                              CY_SYSCLK_MEAS_CLK_PILO, /* Counter 1 clock = PILO */
                              0x3FFUL, /* Counter 1 init value = 1024 */
                              CY_SYSCLK_MEAS_CLK_IMO); /* Counter 2 clock = IMO*/

Thanks for pointing to the error in the snippet. I will raise an internal ticket to get this fixed.

Thanks and Regards
Ekta


View solution in original post

0 Likes
1 Reply
Ekta
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello @psoc_student 

Yes, there seems to be a printing mistake in the comment "/* Start the PILO clock measurement using the IMO */", It should have been ECO which is the external crystal oscillator.

The ECO and IMO are different clocks in the PSoC device. ECO requires the user to connect an external MHz crystal oscillator while IMO is internal to the PSoC device. It is possible to use to either IMO or ECO for trimming the PILO.

In case you want to use ECO for trimming PILO you can go with the code in the snippet.

For using the IMO there are a few changes you need to make in the snippet. For example, when starting measurement using IMO you can change the start measurement function in the following way:


/* Start the PILO clock measurement using the IMO */
(void)Cy_SysClk_StartClkMeasurementCounters(
                              CY_SYSCLK_MEAS_CLK_PILO, /* Counter 1 clock = PILO */
                              0x3FFUL, /* Counter 1 init value = 1024 */
                              CY_SYSCLK_MEAS_CLK_IMO); /* Counter 2 clock = IMO*/

Thanks for pointing to the error in the snippet. I will raise an internal ticket to get this fixed.

Thanks and Regards
Ekta


0 Likes