cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

Anonymous
Not applicable

As showed in attached picture Psoc4 in example project (Environment Sensor) enters endless sleep loop. No debugging info available, because it happens inside Cypress proprietary (IP) code. I have the chip which I paid for. But when it comes to debugging, I've found , I don't know what I really paid for. The  is still Cypress value, which I was not informed before.

   

And I'm stuck. Now there will be a rock'n roll please provide the code etc (Environmental Sensor is not enough). This happens once upon a time but enough to judge the chip useless

0 Likes
9 Replies
JoMe_264151
Expert II

Robert,

   

you are complaining with most of your post that you cannot get a (simple) UART to work, but you constantly refuse from posting your project here for us to see what your error is. UART in BLE works. FULL STOP. So when you cannot get it to work probably the chip is not to blame. You are here in a developer forum and not in a Cypress roadshow. When you want to get help - post your project not running, we'll have a look at. Provide as much information as possible: Kit? which one? What runs, what doesn't run? etc.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

My first guess is the example project that you are trying has some isr that is taking >100us execution time. Can you check that once.

   

Disable all the other components that have interrupts and see if that works. 

   

It's either an interrupt or a messed up clock on your board that could cause this behavior I guess.

0 Likes
Anonymous
Not applicable

Hi I attach the project. It is ESS example project. The project relies on button press, which wakes up chip from deep sleep.

   

I don't need this feature, and it might cause debugging conflict as well. Therefore I commented it out (#504 main.c)

   

In my opinion it has at least two bugs :

   

1.mainTimer never zeroed. Thus condition measurementPeriod[chrInstance] <= mainTimer (#560 ess.c) doesn't make sense

   

2.isMeasurementPeriodElapsed[chrInstance] is never set to NO (except during initialization) although #560 ess.c contantly checks for buffer status - this functionality is single shot after startup. This is not environmental Sensor measurement, as expected

   

Hardware CY8CKIT-042-BLE + CY8C4247 dongle

   

Thanks

0 Likes
JoMe_264151
Expert II

mainTimer is set to zero in line 563.

   

There is a useful function when left clicking on a variable name: "Find all active References" allows to find those lines.

   

isMeasurementPeriodElapsed[chrInstance] is set to "NO" in line 619.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi Bob,

   

Thanks for the answer. But please note, that lines, that You've noticed is my personal insertion. But my comment is about what I've found in raw example project from CYpress. If You didn't find redundant code it means exactly what I've written. Still the open issue is what to do with this example if the code:

   

1. stops responding to BLE envents

   

2. stops responding the code itself external to BLE stack, except button press

0 Likes
Anonymous
Not applicable

Hi,

   

Do You expect anything else from me?

   

Any code?

   

Do You have any hints?

0 Likes
JoMe_264151
Expert II

When nobody can help you here in the forum, consider to create a support case to get help from Cypress directly.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Silence of such experienced professional with many, many years of experience with PSOC is very meanfull.

   

You've change Bob. You no longer fight, when You here "Bug in Psoc"

   

Below is excerpt from PSOC4 Capsense example manual (but not BLE). It says WDT is used for wakeup from deep sleep. My code is example received from Cypress, which proves it's a Bug.

   

"An infinite loop in the main code of the design alternates the PSoC 4 device between
Deep-Sleep and Active modes. Watchdog timer is used to generate the interrupts with the wake
up period configured to either 30 ms or 200 ms depending on whether the touchpad is active or
not. If the touchpad is active, the wakeup period is 30 ms, else it is 200 ms."

0 Likes
JoMe_264151
Expert II

@sego,

   

it may look like, but I did not change my reaction when there is a bug. Fact was, that Robert did not reveal all the information needed to consider what help I could give him, so I asked him to contact Cypress. What could I have done better in your eyes?

   

 

   

Bob

   

 

   

Bob

0 Likes