cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1

Anonymous
Not applicable

Hi all, attached zip file is my working project.

As you can see in this file, I'm using two push buttons of CY8CKIT-050 PSoC 5LP Development Kit(P6_1, P15_5) to change the strings of LCD module.

The interrupt associated with the button P15_5 works fine(CY_ISR(subSel)), but when I push the button P6_1(CY_ISR(mainSel)), the system freezes.

I cannot understand the reason of this phenomenon because these two switches basically do the same thing.

Thank you in advance.
 

0 Likes
5 Replies
ETRO_SSN583
Esteemed Contributor

Post an archive with the following method -

   

 

   

“File”                                                             Creator

   

“Create Workspace Bundle”

   

 

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

Here is the workspace bundle of my project.

   

To give you more information, below is the detailed description of my issue.

   

----------------------------------------------------------------------------------

   

When you power-on the development kit after programming my project, you can see the strings on the LCD display as below.

[Start 2015-07-30][ Date 23:59:50]

And if you push the SW2(P6_1) again, the value of "printSel1" increases from 0 to 1 and the LCD display prints strings as below(void PrintNormalPage @ utils.c) .

[row01 Not Broken][col01 Yet]

From now on, as you push the SW2, the string has to change as below.

[row02 Not Broken][col01 Yet], [row03 Not Broken][col01 Yet], [row04 Not....

But it does not happen and I don't know why since I confirmed that switches are working quite well using LED(P6_3).

As I push SW2 or SW3, the row # or col # should change, but the strings on LCD is constant.

0 Likes
Bob_Marlowe
Expert II

Increase the heap size to 0x0200 (.cydwr-file, system tab)

   

You allocate all your array variables on the stack which might crash when project grows. Better use global or static variables.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thanks Bob, but the problem still remains.

0 Likes
Anonymous
Not applicable

Dear all, I just solved this issue. Until now, the LCD display functions that are defined in util.c(e.g. PrintNormalPage) displayed 2x16 characters on LCD. I decreased these display strings' sizes to 2x14 and the system works well without freezing. I guess this issue is not related neither memory allocation nor interrupt from pin. But no idea why decreasing display string size suddenly made this system work.

0 Likes