When I follow the steps and programme the main code for Blinking LED, it always shows error.

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

cross mob
Anonymous
Not applicable
        I follow the Getting Started with PSoC 5LP PDF file, and use the code from that, but it shows two errors, I have attached the code and error information below. What does that mean?   
0 Likes
10 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You have got a warning, not an error. When you put the mouse cursor over the warning sign a text will be displayed to show the cause.

   

Again: Since I am not familar with all the different examples (and do not want to guess, which one you are using) please post the complete project here.  To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file (do NOT use chrome, that still may not work).

   

So I can easily open your project and compile to see what does go amiss.

   

Bob
 

0 Likes
Anonymous
Not applicable
        Hi Bob. thanks, I attach it here.   
0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

The first error message means that your code references a function that does not exists. The second just staes that there were other errors and therefore the compilation did not succeed.

   

Check that the component you are referenceing is indeed called 'Tick', and has a method called 'Read_Status'. I guess 'Tick' is a timer component - the method there is called 'ReadStatusRegister'.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

hli is right, the counter named "Tick" has a method "Tick_ReadStatusRegister()" which you should call.

   

A tip: Right-clicking on a component opens a context-menu where you find an entry "Open Datasheet" which always has the APIs listed.

   

Additionally the code-completion may guide you to spell all the names correctly.

   

 

   

Bob

0 Likes
Anonymous
Not applicable
        Hi I have solved it due to your help. Thanks   
0 Likes
Anonymous
Not applicable
        Hi. Thanks, but I still have a doubt, LED4 is not blinking but it should be. Only LED3 is blinking.   
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Searching for and reviewing the example you used (a link is always helpful) shows what the cause of the error is:

   

You did not give the status register component the right name "Tick_Status". Then we get a function named "Tick_Status_Read()" which will read the sticky bit of the register.

   

So rename the status register component and go back to the initial code you copied from the AN77759.

   

By the way: Only because the width of the document is reduced the line containing the

   

LED4_Write

   

is broken into two lines which is correct, but unusual for C programs.

   

 

   

Bob

0 Likes
Anonymous
Not applicable
        Hi. Thanks for your help.   
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

PSoCs are very versatile and that implies that they can be rather complicated.

   

One drawback can be the difficulty to program in C-language, another can be reading datasheets in foreign languages.

   

So all comes together making life not even easier.

   

But I can assure you: It will not take much time. Because you will learn step-by-step a bit (or byte ) more about all these new things you use. Just keep on going!

   

 

   

Happy coding

   

Bob

0 Likes
Anonymous
Not applicable
        Hi Bob, Ok I should continue. Thanks.   
0 Likes