PSoC™ 5, 3 & 1 Forum Discussions
I'm working on project where I need to be able to change the count value in a Counter component on the fly.
I was thinking about using the Counter_WriteCounter() function but the datasheet states that using this without disabling the Counter could mess things up.
How does one disable and then re-enable the component with the new count value?
Show LessI have problem with UART communication.
I use CY8CKIT-059 PSoC® 5LP
UART block v2.5 (Mode: Full UART, RX Buffer size: 10, Name: RFID_UART, rx_interrupt connect to cy_isr (RFID_UART_isr))
Program
Init UART:
RFID_UART_Start();
RFID_UART_ClearRxBuffer();
RFID_UART_ClearTxBuffer();
RFID_UART_isr_StartEx(RFID_UART_int);
Callback interrupt:
CY_ISR(RFID_UART_int)
{
do
{
/* Read receiver status register */
rxStatus = RFID_UART_RXSTATUS_REG;
rxSizeBuffer = RFID_UART_GetRxBufferSize();
if((rxStatus & (RFID_UART_RX_STS_BREAK | RFID_UART_RX_STS_PAR_ERROR |RFID_UART_RX_STS_STOP_ERROR | RFID_UART_RX_STS_OVERRUN | UART_RX_STS_SOFT_BUFF_OVER )) != 0u)
{
/* ERROR handling. */
errorStatus |= rxStatus & ( RFID_UART_RX_STS_BREAK | RFID_UART_RX_STS_PAR_ERROR | RFID_UART_RX_STS_STOP_ERROR | RFID_UART_RX_STS_OVERRUN | UART_RX_STS_SOFT_BUFF_OVER );
}
if((rxStatus & RFID_UART_RX_STS_FIFO_NOTEMPTY) != 0u)
{
/* Read data from the RX data register */
rxData = RFID_UART_RXDATA_REG;
if(errorStatus == 0u && counter < 30u)
{
bufferUART[counter++] = rxData;
}
}
}while((rxStatus & RFID_UART_RX_STS_FIFO_NOTEMPTY) != 0u);
}
-------------------------------------------------------------------------------------------------------------------
First receive byte: rxStatus = 0xA0 - (1010 0000) UART_RX_STS_FIFO_NOTEMPTY - OK
UART_RX_STS_SOFT_BUFF_OVER - WHY? rxSizeBuffer = 0!
If set, indicates the RX buffer was overrun.
UART_RX_STS_SOFT_BUFF_OVER flag is always aktive. I send 1 byte to PSoC from external device.
Thank you for answer!
Hello,
I am writing a program for a project, which requires USB communication, and requires to be self-powered by external 5V supply. (Current requirement about 8 Amps.)
I have read that self-powered USB device needs VBUS monitoring, but when I look at cy8ckit-059 schematics, I don't see VBUS routed to any of the pins.
How should I monitor VBUS on this kit?
Thanks,
Stanislav
Show LessWhat is the maximum number of interrupts per second a PSoC5lp can process? I am going to have four timers with 500usec,1msec ,5msec and 1 sec period and each of them are connected to their respective ISR.I also have a DMA triggering 3 times in 1msec. Can PSoC handle these amount of interrupts? How Can i roughly calculate the max number of interrupts that can be processed successfully?
Thank you.
Show LessHello,
I am working on a project for a LIDAR Lite scanner - this unit has an I2C interface and seems capable of the range and accuracy I need. ( http://www.robotshop.com/media/files/pdf/operating-manual-llm20c132i500s011.pdf )
However, I cannot seem to get it running on the PSOC. I got the sample code working with Arduino(so the sensor is ok) but no luck on the PSOC5lp.
The main problems I have is that the I2C is still a bit confusing for me - I got it running for accelerometers and gyros but I'm still not 100% sure on how everything works. I get the gist but stil find the datasheet a bit confusing.
So, my main question is how I send a specific value to a specific register. And how do I read a specific register from the unit? -I suppose I am doing the right thing in my code but...
I am quite confused as I used the same code that's working for my gyro and accelerometers with no luck on this LIDAR. Attached the code in the text file.
Thank you for the help!
Show LessI am using a CY8C5468 in a new design, but I am not using any analog blocks in the device. What would happen if I left VDDA, VSSA, VCCA floating?
Many thanks
Hugo
Show LessI'm new to Psoc and I just wanted to know if it was possible to program the Kitprog device through a Ethernet connection instead of usb. I'm using the CY8CKIT-059 PSoC 5LP.
Show LessHi, I'm reading the datasheet of PSoC1 CY8C29466. In the datasheet, it says there is an additional resource called "Decimator". I can't find more detail introduce about Decimator, and confused about how to use it . Anyone who tell me more details about decimator? Its datasheet, introduce, examples and so on. And does PSoC4 has decimator?
Show LessHello all,
I'm looking to create a physical unclonable function (PUF), likely in the form of a ring oscillator, using the CY8CKIT-059. The goal is purely an academic interest in exploring PUFs and the possible depth of control over the PSoC's complex programmable logic that a designer can have. For my current PUF idea to work, it is necessary to specify where in hardware the synthesized hardware is placed to ensure design consistency. Any thoughts or possibly helpful documentation would be greatly appreciated!
Alternately, as I am I quite new to the study of PUFs, I would be interested in any alternate ways one could be implemented. I'm coming from FPGA based designs, so the UDBs are where my narrow field of vision fell.
Thanks!
-Brian
Show LessI am having trouble with an ISR that I really need to work properly, but a little background on the project might be needed. I am writing code to talk to a flight controller on a drone, and I am testing an ultrasonic sensor on it as well pointed down to help hold its altitude. The problem I have currently is that the flight controller uses SBUS, an inverted UART signal at 100k baud, which is all fine and well, but each frame is 3ms long and they need to have fairly closely to 6ms delay between frames. We had code written that worked ok using CyDelay(6000), but because it wasn't using an ISR, any code added made that 6ms longer. Unfortunately if it gets too far from that, the flight controller gets confused and tosses a wobbly (with the possibility of it going full throttle unexpectedly), and I now have a bunch of stitches in one hand, and when my other hand heals I will likely not have a couple fingerprints anymore. So its imperative that I get the communication set up to run at the same time constantly.
The problem I am having is I moved the code for sending what is needed over the UART/SBUS into an ISR, however it does not function as it did before. Inserting breakpoints I can see it hitting it each time, but it is not sending correct values. I am wondering if I am allowed to change variables in the main function and also have them used in the ISR? I have also tried having the ISR just jump to the function we had originally for sending the data, and having the variables declared outside of the functions so both could use it, however that does not work either. I have been fighting with this for a few days and haven't come up with a solution, and other project members are getting antsy to test but can't because its unsafe to do so currently.
I attached the archive file, it has the ISR as well as the function for sending over UART/SBUS in the main.c file as I am not sure which method will work better.
Show Less