PSoC™ 5, 3 & 1 Forum Discussions
I have a project based on the USB_FS example that has a HID descriptor that describes an input and a feature report. This is a HID compliant custom device.
There is support to send the input reports using EP1+, using USBFS_LoadInEP, but not to send the feature report, which should be sent on EP0. I did some searches on this that yielded results from 5 years or more back saying there is no way to do this, but it is being worked on.
So, what is the current state? Is there a way to do this? This seems like a fairly common usage of HID, so I'm surprised if it is not implemented.
Show LessI'm implementing a device that works with a pre-existing application that performs a set HID feature report to initiate an operation (allocate a resource id) and then a get HID feature report to retrieve the status and handle. I need some guidance on the best way to implement get/set feature reports on the PSoC5LP. I've read through the various application notes on implementing a USB HID device (AN57473, AN58726, AN82072 etc) but I haven't found much guidance on set/get HID feature reports. From web searches I found references to the USBFS_FindReport_Callback function and have tried experimenting with it but haven't found a good guide on the best practices.
I've implemented HID feature get reports in the FindReport callback function without difficulty. But for set reports - I see the reportType and reportId values are available in the FindReport callback, but the data for the report descriptor itself isn't populated in the USBFS_DEVICEx_CONFIGURATIONx_INTERFACEx_ALTERNATEx_HID_FEATURE_BUF_IDx buffers yet. I found that the USBFS code doesn't fill out those buffers until after the FindReport callback returns. The USBFS3.2 document says that the "main" application should monitor the completion status block to determine if the value in the buffers is valid or not before using it.
I added a flag in the FindReport callback to tell the main loop that a set feature report was seen. The main loop polls that flag and checks the status completion block to see if the report is valid before acting upon it. The issue is that the main loop does a lot of other work and that the get feature request for the status from the host can often come before the main loop gets to the point when it can check the flag and status control block to even process the initial set feature report.
I've experimented and found that I can implement a USBFS_EP_0_ISR_ExitCallback function and the USBFS_DEVICEx_CONFIGURATIONx_INTERFACEx_ALTERNATEx_HID_FEATURE_BUF_IDx buffers and status control blocks are set by that point and I can process the set feature request before the following get status request is encountered.
Is this a good solution to my problem, or are there better ways of implementing this? Are there any good resources or guidance on implementing get/set HID feature reports for the PSoC series?
Show LessHi,
I have a question (and I suspect the answer is yes) regarding the GPIO ports on the PSoC5LP.
I have a few serial (9600 Baud) signals passing through the PSoC that could potentially require re-routing through the PSoC onto different voltage domains. On one end the device is 3.3V and the other is 1.8V.
Will this all just "work" presuming I have the VDDIO levels for their pins set appropriately and level shift the signals between the inputs/outputs? Or should I perform level shifting externally?
Thanks!
Show LessHi,
I'm using a CY8CKIT-059 in combination with TeraTerm. One thing I can observe when downloading a new binary is that the KitProg UART gets a bunch of garbage and confuses TeraTerm, which needs to disconnect and connect again.
Interestingly, other tools behave different:
YAT: gets just a few characters including escape sequences
HTerm: same as YAT
PuTTY: can't see any garbage
Currently it looks like the effect pops up mostly if the application sends UART messages after reset by itself (e.g. without receiving a message first and then send an answer), but I've to verify that. I assume that when KitProg is resetting the device within a character transmission, the application might interpret it as some escape sequences or something like that. I also can see the effect at a much lower rate and much less garbage if the application doesn't send anything at startup, so even transmitting nothing is not the (full) solution.
Disconnecting and reconnecting is not a big issue, it's simply annoying if you've to do it everytime a binary is downloaded. Since also YAT and HTerm show at least 'some effect', I want to suggest that the KitProg firmware disables the UART while downloading a binary.
Regards
Hello Community,
I am trying to implement a control functionality for the LCD backlight in my application, where the backlight of the LCD needs to be switched OFF after an interval (~10sec) maybe using an interrupt, without affecting the program's execution.
The system consists of a PSOC5 LP, 16x2 LCD, a temperature sensor over ADC, and a pushbutton (or a 4x4 keypad - I know the method of detecting the keypress is different), which can act as a trigger.
I think the approach is to use the timer, and trigger it with a pushbutton (or 4x4 Keypad - preferred) to generate an interrupt after a period has elapsed and then turn off the LCD backlight, without halting the execution of the program completely (like printing the temperature value continuously even after backlight is OFF), which I think would be to use the One-Shot mode of the timer.
Using the One-Shot does help with triggering and turning the LCD backlight OFF only once, but no response after that. The main application is a MENU system, where the LCD would need to go OFF on different screens, so the timer needs to have a reset of the Period once the ISR is finished - to then be able to trigger again and so on.
I would like to get some help with this application and I am unable to comprehend on how to reset the timer for the above-mentioned application.
Attached is the firmware with One-Shot Timer and ADC.
Hope someone can help.
Regards,
Yash
I installed PSoc 4.4 from the provided CD, onto my CY8CKIT-050 KIT.
It recognizes the device when it is plugged into the programming USB, but when I plug it into the communication USB I get the device descriptor request failed. I tried updating drivers, but I am not sure which ones are needed. Any information on how to get it to read would be appreciated.
Show LessMake a PCBA according to the KitProg2 circuit diagram, how to create a USB bootloader or the KitProg2 firmware
Hi, can someone give me an example of programming automatically with python(just like psoc programming just customized with python)? What I want to do is automatically detect the boards and program with hex file. Does an API exist or how should I go about it?
Show LessCypress PSoC 5LP Prototyping Kit Measurement Electronics: hardware and software eBook : Magda, Yury: Amazon.in: Kindle Store
If someone has this book can they review it ??
Should I buy this if I'm a beginner?
Using Signal Generator give following signals and find using ADC
a. Square wave input frequency range 50 Hz to 1 KHz in.
1) Find Frequency.
2) Find average voltage.
b. Input Sine wave 50 Hz to 1 KHz
1) Find Frequency.
2) Find Peak to Peak value.
3) Find Offset value.
Display the result using UART -> putty on the host computer once every 3 to 5 secs interval.