Quantcast
Channel: Cypress Semiconductor - PSoC 5 Known Problems and Solutions
Viewing all 264 articles
Browse latest View live

Memory issues with stack/heap

$
0
0

I have a PSoC5LP project (a scientific instrument measuring pH and temperature) that uses the U8Glib library to drive a oled screen.  It uses newlib-nano  (with the floating point formatting option.  It uses snprintf liberally to format text to be used on the OLED.  It also uses strcmp a few times to parse some of the commands coming from USB or BLE.  The code seems to run fine most of the time and interfaces via UART with PRoC to do the USB stuff.  So it is making liberal use of the heap memory, I suppose.

From time to time there seems to be a memory issue that is unpredictable- the pH and temperature values (both floats) stop reading correctly.  The instrument continues to run with all of the interrupts acting properly as well as the communications via USB and UART/BLE.  But the pH and temp values are no longer there.  I have attached pictures of the display.  Interestingly, there is not a consistent amount of time that leads to this issue- sometimes it runs fine for days, other times it fails within hours.  I have both the stack and the heap set at 0x2000 (8kB) which should be plenty.  I am baffled as to why this happens and why it is so unpredictable.  My assumption is that it's a memory management issue.

Unfortunately this is a commercial project and I can't share the code.  But has anyone had these kinds of issues and maybe have some insight?  Could it be something to do with newlib nano?  I have plenty of space in SRAM to not use the nano version.  It is so sporadic that I don't even know how to debug the thing.

Thanks guys!

Jason


How can i implement CORDIC for sine, squaring and sqrt to make the program run fast?

$
0
0

Hello everyone,

I have a square root, tonometric and many other functions in my program. They make my program slower. I heard about CORDIC functions, but I don't know how I can implement it. Can anybody assist or help me in it?

I would be very thankful to you.

Regards

Awais

Unable to find a problem in my program?

HowI can do phase detection of a sine wave in psoc cypress?

$
0
0

Hello Everyone,

I have two signals, signal_a and signal_b, coming into my PSoC chip.

Now, I want to compare their phase and adjust the signal_b phase accordingly.

Does anybody have an idea? or any example project?

Looking forward for your reply

Awais

ESP8266 and MQTT in psoc 5lp

Multiple definition of variable.

$
0
0

Hi everyone,

I am using a PSOC5LP, CY8C5888LTI-LP for a project in which a RC boat is controlled w/ GPS and IMU.

To clean up my code I created 5 header files associated w/ 5 code files : 

Global, Autopilot, ToMatlab, IMU and GPS.

Before I decided to clean up, everything was compiling without error. 

And Now Psoc creator (V3.3) is throwing me 12 errors (all located in Global.c). The weird thing is when I click on the errors, it send me to some lines on the code where the variable is not even present.

I tried to clean up but when I build again, Psoc creator throw me the same errors.

I would really appreciate your help. I put a workspace bundle in the attachment. Thanks.

My measurement result differ from expected value when the data transfer operation using USBUART takes place

$
0
0

Hi Cypress community,

I hve been working on a impedance meter project. I have a problem with the data transfer using the USBUART operation. Below is my program for the data transfer. I used teraterm as my COMport terminal. When i start the data transfer operation, my  measurement result differ from the correct result. For instance, when testing a resistor, i observed 1k ohm at my LCD display which is a correct value, however, after i make connection to the COMport for the data transfer and start the operation, the value of the tested resistor become 500 ohm and even lower than that. This situation lead me to having a false measurement for the resistor value.

I hope this problem can be identify and solve.

Thanks in advance

  
 

 

Attachments: 

HOW TO DESIGN VERY LOW FREQUENCY (0.05HZ) USING PSOC 5LP

$
0
0

Hi all, i tried for design very low frequency like 0.05hz. But if i entered the value into filter configuration box, it displaying red sign. can any one tell me how to design filtering very low frequency. 


SigData using VREF as input.

$
0
0

I am new to PSOC and am trying to become familiar with the CY8CKIT-059 PSoC 5LP Prototyping Kit.  I would like to use it as a low cost, fairy accurate multi channel data acquisition system.  I would like to use  the internal 1.024 VREF as one of the input signals and use the resulting value to judge the accuracy of the remaining channels.  Unfortunately,  I don't get the expected results.    I would like to use the 20 bit Sigma Delta A2D with a single input range of 0.0 to 6 *Vref.  When I connect the Vref through an analog mux I get values of approximately 1.78 volts.  When I buffer the input through an op amp follower I get results of 2.33 volts.  I am obviously missing something basic. 

Can someone give me a hint??

how to design our own filter componenet

$
0
0

Hi all 

I need to design the notch filter for removing 50hz noise. But i dont know how to design my own component. Give some useful reference. In my previous post odissey gave me the link of notch filter but my problem is i dont know how to design my own filter. I am new to in this field can any one help me. 

 

ADC interfacing with multiple input

$
0
0

Hi,

I am going to interface the 3-axis accelerometer with adc. So it is required minimum 3 input to connect with adc. My doubt is how to select the channel, suppose if i used mux for 3 input.

                                                                                   thank you 

How to Place an interrupt on the comparator?

$
0
0

Hello Everyone,

I want to do the following:

1. I want to generate an interrupt on the rising edge of the comparator output, in order to set an external DAC.

2. I want to generate an interrupt on the falling edge of the comparator output, in order to do sampling .

I thought to place a pin and put interrupt on it.

I attached the project zip file. Can you please have a look on sheet A (Ch_A) and give me your suggestions.

 

Looking forward to your reply!

Regards

Awais

Laser Distance Sensor and ADC DelSig

$
0
0

Hello,

I'm new to the psoc and I'm trying to get decent values from this laser distance sensor: https://www.pololu.com/product/2476

I'm trying to get the ADC to operate within the proper voltage range listed on the site (3.6 V at 10 cm to 0.6 V at 150 cm) but can't figure it out. I've tried using the -Input +/- Vref function to get that exact voltage range but something is wrong. If I use the Single Ended option and play around with the "Input Options" and "Reference" sections of the ADC I can get a little closer but at this point I'm just changing around parameters that I don't understand and hoping that I get what I need.

I need some direction, any help is much appreciated.

Thanks!

How shall i can generate an interrupt on the falling edge of a Comparator?

$
0
0

Hello Everyone,

I want to fire an interrupt on the falling edge of the comparator. I directly attached an interrupt source to a comparator(see attachment), but it only has a rising edge option.

I don't really understand the option "LEVEL".

Looking forward for your help!

Regards

Awais

 

Where "LEVEL" Option in ISR can be used?

$
0
0

Hi,

I do not understand the option "level" in ISR. Can i use it in order to fire and interrupt based on the rising or falling edge?

If yes then, how?

Looking forward to your help.

Regards

Awais


problem in ADXL 335 accelerometer interfacing

$
0
0

Hi all

I used the analog adxl335 accelerometer for measuring the tilt angle. Formula i used for this is theta = xout  /  square root(y2+z2). when i displaying the result to LCD it showing 1  1  0 or  0  0 1 or  0  1  0 of x, y, z angle value. any one tell me what mistake in that. 

CY8CKIT-059 clock output

$
0
0

Hi,

Is there any pins on the CY8CKIT-059 where I can output a clock?

I have tried to use a GPIO to output a 1.5 MHz clock, but it doesn't look very nice on a oscilloscope. Is there a recommended way of doing this?

 

 

NEED HELP ON PSoC® 5LP: CY8C58LP Family

$
0
0

kindly provide me suitable models to simulate its current consumption and any other electrical stress ratings. Spice model will be highly helpful.

PSoC® 5LP: CY8C58LP Family

Regards

How I can implement phase shifter of 90 degree without using Flip flops?

$
0
0

Hi All,

I am looking for a way through which I can shift my signal by 90 degrees. I want to avoid using flip flops.

Looking forward to your suggestions.

 

Regards

Awais

undefined reference to `EEPROM_Start'

$
0
0

  I add an EEPROM to my project which's cpu is CY8C5568AXI-060, when compiling the project,there is a mistake of undefined reference to `EEPROM_Start' ,  why?  

Viewing all 264 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>