Compiling issue with HFCLK1

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

cross mob
SaGa_4641021
Level 5
Level 5
50 questions asked 50 replies posted 100 sign-ins

Hi

I have a recurrent problem that happens randomly with PSoC Creator 4.4, and happens with several project (I attached one of them for reference).

A project is compiling and working normally, then after closing the project and opening again, it throws an error as shown:

SaGa_4641021_1-1640727414053.png

SaGa_4641021_2-1640727428007.png

 

SaGa_4641021_0-1640727403379.png

and no matter that I do to the clock configuration, I can't make it work again, and I have to create a new project and copy all files to the new blank project.

I am sure I am doing something wrong, but I failed to identify it.

Any clue ?

thanks a lot

0 Likes
1 Solution
RodolfoGL
Employee
Employee
250 solutions authored 250 sign-ins 5 comments on KBA

The opposite. If you enable that, you have to use P5.0.

But I see you haven't enable the "Clock from terminal", so it doesn't matter. Can you share the project? It would be easier to see what's going on.

View solution in original post

16 Replies
RodolfoGL
Employee
Employee
250 solutions authored 250 sign-ins 5 comments on KBA

You have to enable the HFCLK1 in the "Configure System Clocks" window, High Frequency Clocks Tab.

RodolfoGL_0-1640732259735.png

 

0 Likes
SaGa_4641021
Level 5
Level 5
50 questions asked 50 replies posted 100 sign-ins

Hi Rodolf, yes I did, I followed all the errors and still it doesn't compile.

The last error i get is this:

SaGa_4641021_0-1640732501262.png

so I tried removing and adding the clocks in the PDL window, but this didn't help.

This problem happens when I save-as the project or change its name.

 

0 Likes
RodolfoGL
Employee
Employee
250 solutions authored 250 sign-ins 5 comments on KBA

Rather than using the low level cy_mxs40_i2s component, can you use the I2S component directly? If you don't need the APIs generated by the component, you can disable it by double clicking on the component, Built-in tab, check Suppress API Generation box.

 

0 Likes
SaGa_4641021
Level 5
Level 5
50 questions asked 50 replies posted 100 sign-ins

I am  using the I2S component (I2S_PDL_v2_0) directly from the "TopDesign.cysch" window. I am not sure if this  is what you are referring to or not.

SaGa_4641021_0-1640734175538.png

 

0 Likes
RodolfoGL
Employee
Employee
250 solutions authored 250 sign-ins 5 comments on KBA

Oh, I think I know what's your problem. You have enabled the "Clock from terminal" in the I2S component.

If you do that, the only thing you can connect to the "clk_if" is the P5_0 pin. Anything else will cause an error, including HFCLK1.

0 Likes
SaGa_4641021
Level 5
Level 5
50 questions asked 50 replies posted 100 sign-ins

So if I use clock from terminal with the I2S, i have to avoid using P5.0 ?

0 Likes
RodolfoGL
Employee
Employee
250 solutions authored 250 sign-ins 5 comments on KBA

The opposite. If you enable that, you have to use P5.0.

But I see you haven't enable the "Clock from terminal", so it doesn't matter. Can you share the project? It would be easier to see what's going on.

SaGa_4641021
Level 5
Level 5
50 questions asked 50 replies posted 100 sign-ins

for some reason, after restarting the PSoC Creator and the laptop, this error doesn't show again at this time. I can't replicate it at the moment. I will close this ticket and post again if it occurs. thanks a lot

0 Likes
lock attach
Attachments are accessible only for community members.
SaGa_4641021
Level 5
Level 5
50 questions asked 50 replies posted 100 sign-ins

Hi @RodolfoGL , the same issue occurred again after loading a project that was working.

I attached the project folder. I tried to clean the build with no luck.

My best wishes for a happy new year.

0 Likes
RodolfoGL
Employee
Employee
250 solutions authored 250 sign-ins 5 comments on KBA

Happy new year!

The project you attached contains the layout/schematic. No project files.

0 Likes
lock attach
Attachments are accessible only for community members.
SaGa_4641021
Level 5
Level 5
50 questions asked 50 replies posted 100 sign-ins

Hi Rodolf

I attached the project folder again, it is the whole project folder.

0 Likes
RodolfoGL
Employee
Employee
250 solutions authored 250 sign-ins 5 comments on KBA

There is something wrong with your Design Wide Resources file in the project. 

RodolfoGL_0-1641168067428.png

Try to remove it like this. Right mouse button over the file above, choose "Remove from RespirationMonitor_SD..."

Re-add it by clicking right mouse button over the Project, choose Add > New Item > Design Wide Resource File.

This would fix the "?" interrogation issue above on the Design Wide Resource File.

But the project you shared doesn't configure the Clk_HFCLK1. You need to edit the clock settings. Once you enable the HFCLK1 clock, the compilation error will go away.

 

0 Likes
lock attach
Attachments are accessible only for community members.
SaGa_4641021
Level 5
Level 5
50 questions asked 50 replies posted 100 sign-ins

after re-enabling ClkHF1, this is what I got:

SaGa_4641021_0-1641178505115.png

SaGa_4641021_1-1641178624423.png

The modified project is attached.

 

I need to add that ClkHF1 was enabled and the project was working, until I closed the project and loaded again. This pattern (ClkHF1 is removed and the project fails) happens frequently. So far, the around is create a new project project and copy all file.

0 Likes
RodolfoGL
Employee
Employee
250 solutions authored 250 sign-ins 5 comments on KBA

I'm able to reproduce the problem.

After following the steps from my previous post (remove it and re-add it), I no longer can reproduce it, so it seems that it is an easy fix in case it occurs again.

I think the root cause of this problem is because you have two CYDWR files in the project.

RespirationMonitor_SDCard_19.cydwr

RespirationMonitor_SDCard_19_RefDsgn.cydwr

Delete the "RespirationMonitor_SDCard_19.cydwr" from the file system (through windows explorer).

SaGa_4641021
Level 5
Level 5
50 questions asked 50 replies posted 100 sign-ins

I am still struggling with it. After I corrected the filenames, I am left with this error:

SaGa_4641021_3-1641232594503.png

 

SaGa_4641021_2-1641232576393.png

 

But, I realized this problem happens only when I rename the project or duplicate with save-as. Usually I right click on the "Project" and choose save-as pr Rename. Then I rename the "Workspace" name as well.

SaGa_4641021_0-1641232425022.png

 

I also check-all the

SaGa_4641021_1-1641232507595.png

Am I missing a step 

thanks

0 Likes
SaGa_4641021
Level 5
Level 5
50 questions asked 50 replies posted 100 sign-ins

Update: I found the problem, was able to reverse it, but don't know how to avoid it:

In the project properties, the "Name" points to .cydwr file which does not match the Project or Workspace names:

The project name (after renaming it) is "RespirationMonitor_SDCard_19_RefDsgn.cyprj"

while the one pointed to is "RespirationMonitor_SDCard_19.cyprj", and it is fixed, I can't change it from the properties window.

SaGa_4641021_0-1641232959766.png

Renaming the files manually (in windows explorer) did not fix it, so I "save-as" the project back to the old name "RespirationMonitor_SDCard_19" instead of "RespirationMonitor_SDCard_19_RefDsgn" to match the .cydwr name in the properties window, and it worked.

So I think I am doing something wrong with the save-as or rename steps

Questions:

1. What is the right way to rename or save-as a project ?

2. Also what is the proper way to share projects with others without having to change the settings on their PSoC Creator ?

thanks

 

0 Likes