PSoC™ 5, 3 & 1 Forum Discussions
BOARD :PSOC5LP , CY8CKIT-059, float printing is not working with USB-UART -PSOC5LP
CODE :
sprintf(charbuf,"%f\n",adc_volt) //adc_volt is float, charbuf is array
USBUART_1_PutString(charbuf);
OUTPUT : Null
Show Less
Hi,
I reviewed the datasheet associated with the AN2344 and noticed that on the Battery Pack Management System side there are no capacitors (pg. 2 of the attached datasheet). Is this accurate? The BMS appears to achieve the necessary balancing and cell protection on the battery assembly via MOSFET's and resistors. I'm hoping to receive confirmation that by using the AN2344 balanced charger that capacitors are not used in the battery assembly BMS. My application requires the presence of zero capacitors.
Any help will be greatly appreciated.
Joe DeWitt PE, PMP
Show LessAccording to the PSoC 5 datasheets:
"VDDA must be the highest voltage present on the device. All other supply pins must be less than or equal to VDDA."
What happens if, briefly this is not true? What if the VDDA supply cuts out for a moment? Can this cause actual damage to the chip?
What if it happens several times, or for a prolonged period of time? Can this cause damage to the chip?
How exact does this need to be? What if VDDA = 4.95v and VDDD = 5.00v?
Show Less
I am trying to use a variable in the "noinit" memory section. I am testing it with some very simple code:
#include "project.h"
CY_NOINIT int myVar;
int main(void)
{
CY_NOP;
myVar++;
for(;;) {}
}
I then try to use that code in the debugger. However, I see a very strange effect when I click the Reset button:
Note that I never click the Play button. I just click Reset again and again.
When I first start the debugger, I see this:
There's the code, and the CY_NOP is highlighted in yellow, meaning that line hasn't been executed yet.
Then I don't click Play.
But I just click Reset again, and this is what I see:
Look at that, myVar has increased in value by 4! Each time I click Reset, the value increases by 4. This is strange for two reasons:
- No code should have been executed yet, as I haven't clicked Play.
- There's nowhere in the code that adds 4 to the variable.
What is going on here?
Here's some more evidence:
- If I step through the code and execute the line myVar++; then I see the variable increase by 1.
- If I change the type of myVar to char, it still increases by 4.
Show Less
I've attached two really good docs that somewhat answer my question but not completely. The third .png doc shows an INL20 of +-32. Surely this must be a typo? What is the INL of the PSoC 5 when the 20 bit AtoD is used?
Same question for the enob on the PSoC 5? What is it? I realize it depends on a lot of things as the app note explains but most data sheets contain the enob info. It specced DNL and INL, power supply rejection ratio, and other parameters but no mention of enob.
Thanks.
Show LessIn a bootloadable project, I need to access CyResetStatus but it alwasy says CY_RESET_SW, regardless of how the chip reset.
This is caused by the the bootloader running on startup, which exits with CySoftwareReset(). This overwrites whatever was in CyResetStatus previously.
Is there a way for the bootloadable project to correctly determine the reset status as seen by the bootloader?
Put another way, is there a way for the bootloader to copy that information somewhere for the bootloadable to read? For instance, how could I create a NOINIT variable in both projects that would share the same memory location?
Show Less
Hi all,
I have a problem with using CyPmHibernate() function.
My extracted code is:
CyPmSaveClocks();
CyPmHibernate();
CyPmRestoreClocks();
All works well during Hybernate state, but when my system is wake up, I noted that my firmware reset and start from the beginning.
I think the problem is due to "CyPmRestoreClocks()" function because if I comment it, the reset not occurred.
Following is my CLOCK setup:
Did sameone experienced the same problem and know how to workaround?
Regards
Show LessHi,
I'm using the CY8C3866AXI-040 in a design but I can't seem to find a supplier with out a lead time going out to 1 year+. The same family seems to have the CY8C3866AXI-039 which seems like a drop-in replacement (we don't use the CAN portion), but I couldn't find any information on any major differences between the two numbers.
Any information would be appreciated.
Cheers
Hello,
I am using the PSoC5 I2C Multi Master Slave implementation and seem to be experiencing an event that causes the SDA line to go low and never return high. When this happens, an infinite while loop is entered from one of the autogenerated APIs from PSoC creator.
I have tried implementing some "fixes" although I'm not too sure how well they are working because I'm still getting failures.
My test is to basically have the code running and see how long it takes to fault(SDA line being held low) My code is talking to sensors, ICs via I2C at a periodic time interval. My "Fixes" have made it to where instead of failing within an hour, it takes about a day or two to fail.
I would like to share some of my "fixes" / Findings to ensure that I am moving in the right direction - ultimately I'm looking for some advice on how to recover the I2C when this event is happening. I would also like to know if there is more that I can do to narrow the problem to actually find what is happening to cause this issue.
Hardware Setup:
This is a custom board with a CY8C5868AXI. I2C is configured with 1k pullups and has the following parts in the I2C bus:
- DS2484 I2C slave to 1Wire Master
- MCP9902 Temp Sensor
Observations,
If I reset the PSoC using XRES (Pushbutton), the SDA line returns high and the fault goes away. After pushing the reset button from a faulted state, the issue does not appear to happen again. This makes me think that this may be some kind of first time power on issue, as the issue does not happen again after performing a hard reset. Software resets do not have the same effect - the SDA line remains low.
The pushbutton we have attached to XRES is only attached to XRES - that is, it is only resetting the PSoC5. This leads me to believe the issue is not with another slave device and that the issue is in the PSoC5.
The Signal integrity appears to be "good enough" - there is slight rounding, but could that be why at some point we see failures on the SDA line? We were experiencing some undershoot before adding RC to fix that. The undershoot would go below -0.5 volts - could this mean the part would now have reliability issues?
Fixes:
1. Before performing any I2C transactions, I use CyGlobalIntDisable / CyGlobalIntEnable - this is the latest item that I added - I haven't been able to stress test this, as I just did the change, so I will have to wait and see if this remedies the issue. Not sure if this is actually doing what I think it's doing - ensuring that once an I2C start condition has been successfully issued, it can not be interrupted by timers / interrupts, until the transaction is complete.
2. When calling I2C API, I conditionally call each successive function always ending with a stop. This was a major fix that greatly increased the reliability of the I2C:
3. In the I2C_Master.C file that gets auto generated, I modified the source in API calls that have an infinite while loop
Originally, the code is autogenerated to have the while loop empty, meaning that if the I2C_WAIT_BYTE_COMPLETE never returns "OK", the while loop will never be broken. So I wrote in a counter that allows the while loop to be broken if this event occurs. At first, I would just break from the loop, Then I added a "bus reset" function to try to help recover the SDA line.
The code circled in red is added by me, the rest of the code is autogenerated from PSoC creator.
4. The bus reset function is supposed to re-assign the I2C pins as Output Push Pull, drive the SDA and SCL high and low 16 times, then "reconnect" the pins to I2C.
This was the fix that made the code run for days instead of hours. I was almost sure that this would be the fix, but unfortunately I returned to my system to find the SDA line low some days later.
This fix was taken from another post, where the user reassigns the SDA as High Z and the SCL and Strong Drive, but I found it to work for me when assigning both SDA and SCL and strong drive and toggling both.
https://community.infineon.com/t5/Code-Examples/PSoC-5LP-I2C-Bus-Reset-Sample/td-p/138721
Thank you for your help with this issue,
- Kevin
Hello All,
We are using CY8C24423A controller PDIP package and trying to program hex file. I am not able to program it and getting error.
What is part should select for PDIP package, as I am not able to get exact part no - CY8C24423A-24PXI in programming tool ?
Show Less