PSoC™ 5, 3 & 1 Forum Discussions
I have been playing with the HID mouse example. I have been wondering how you can increase the resolution of X Y on the pointer. I have tried playing with descriptor wizard but I just seam to break the pointing functionality. It seams with the the logical max at 127 and min at -127 when I make a step by 1 it is still quite large. I would like to have a few steps between so the functionality is like a normal mouse. Just to clarify I was using the example provided with the CY8CKIT-059. I have search all over but no clear answers.
Thanks,
Jorden Luke
Show LessAre there macros anywhere in the standard generated code (or, in a code sample, if need be) for setting / clearing / toggling bits through the Cortex M3 bit-banding feature?
I'd like to take advantage of this for uninterruptible read/modify/write of some status bits associated with each of a bunch of buffers in the SRAM. From what I understand it should be possible, but I'm wondering if I need to roll my own. I'm OK with assembly, not so much with the C preprocessor.
Show LessHi,
I am struggling for days now and can't find any solution.
I simply want to read a sine wave with an ADC_SAR, filter the signal with the built-in filter element and sent the result to a VDAC converter.
Here is the code I am using right now.
#include "project.h"
CY_ISR_PROTO(adc_isr_handler);
CY_ISR(adc_isr_handler)
{
Pin_activeISR_Write(1);
int8 iADC = ADC_SAR_GetResult8();
Filter_Write8(Filter_CHANNEL_A, iADC );
Filter_ClearInterruptSource();
while (Filter_IsInterruptChannelA() == 0);
int8 iFilterVal = Filter_Read8(Filter_CHANNEL_A);
VDAC8_SetValue(iFilterVal);
Pin_activeISR_Write(0);
}
int main(void)
{
adc_isr_StartEx(adc_isr_handler);
CyGlobalIntEnable; /* Enable global interrupts. */
Filter_Start();
ADC_SAR_Start();
VDAC8_Start();
for(;;)
{
}
}
The problem is that the while-loop seems never want to end. I simply do not get any interrupt. Do I have to enable something else?
I also have tried to use "interrupt request" in the filter settings and set up another isr. But this one also doesnt get fired.
I would really appreciate any kind of suggestion!
Thank you.
Show LessHello,
I want to transfer more than 512 bytes every 1ms (2 channels 24bytes each, 96kHz sampling) into PC through USB. PSOC 5LP is configured as microphone. I can configure USBFS with manual buffer management, but it works only for less then 512 bytes every 1ms. From USBFS manual I understand that in order to be able to transfer more data I need to choose option endpoint with DMA with automatic buffer management. I tried, but It doesn't work. I use other DMAs in my project and I see when I enable USBFS transfer in DMA mode this other DMAs doesn't work. When USBFS transfer is disabled other DMAs works fine.
How to set USBFS transfer in AUDIO IN mode with DMA automatic buffer ?
Best regards,
Piotr.
Show LessHi everyone!
I'm going MAD over this simple hazzle.
Generally I have a nice time developing things with PSOC. I have a lot of the project done, SPI LCD working, emFile working, interrupts, DMAs etc - but I cannot get this I2S working
I'm using CY8CKIT-059 and a Digilent I2S PMOD with the basis in InterIcSound example.
I removed Rx part of the example. Upped the buffer to 2*2*45 (I want to generate a 1kHz square wave for testing, 2 bytes per 16 bit, 2 channels, need 45 samples to generate required wave).
Then I changed the clock to 2.8224MHz as per the I2S datasheet for a sample rate of 44.1kHz.at 16 bit per sample (32bit word select period).
I have wired MCLK to the master clock of the module, LRCLK goes to the word select clock, SCK to the sample clock and SDO to its serial data input.
How am I supposed to configure the DMA for 16 bit transfers? Right now I just split the 16 bit sample using HI8 and LO8. And hope for the best.
Any help and pointers are hugely appreciated!
Show LessI have been working with the cyprjmgr to try to automate some builds and modifications to project without having to use the gui or have a bunch of versions of projects just for minor changes like pin locations, components included/excluded, etc. Example version X has GPIO on P12, on version Y it has SPI and I2C with some GPIO on P12, on version Z it has custom components with some GPIO on P12. But many share much of the same other functionality.
If anyone has done any of these before I would appreciate any tips you could offer or other ways maybe I haven't thought of that that would be great too.
Seems like much of the project based items are covered with the cyprjmgr tool, except for the schematic items, non-CY default parameters and pins. Maybe I just missed some of the options, but from what I could work through I don't think it is doable, but I hope I am wrong.
I wanted to create a few generic projects/components and be able to put them together in an automated fashion. I was able to copy a basic template project then I was even able to add a custom component to the project(with specific pins and clocks and all). But when I did it only added the custom component to the components tree, but did not build it when I told it to build, I assume because it was not manually placed the top-level schematic.
Command used was (specific to my projects)
cyprjmgr -wrk testcmdline.cywrk -prj testcmdlineprj -import ..\hmgpio8\hmgpio8_d_i_intr.cylib\hmgpio8_d_i_intr.cyprj hmgpio8_d_i_intr
I was able to modify some component parameters via commandline, but only the default CY_ parameters, like CY_REMOVE. I could not figure out how to modify any of the other parameters you normally see when double-clicking on the component, like say for a PIN input vs output vs analog or drive. I tried all kinds of different combinations of the names used in the component datasheet, but nothing worked.
It did work fine for enabling and disabling though!
Command used was (specific to my projects)
cyprjmgr -wrk testcmdline.cywrk -prj testcmdlineprj -build -m crtestparms.txt
Also I couldn't find any way to set pin location like is done in .cydwr file. This one may just mean the process is not doable at all. But I hope I am wrong as it would really be able to do. The gui tool is really easy to use, but the full dependency on the gui really hurts sometime.
Thanks,
Chris
Hey guys,
I am working on a project where the PSOC 5LP will generate an accurate interrupt in beat with some music. I am struggling with generating a consistent interrupt that will not stray with time... Inside the interrupt handler will be some code to control some motors
So far I am using a timer connected to a 12MHz PLL clock to generate the interrupt on overflow. The timer is set on continuous with a UDB implementation (fixed does not have resolution big enough to handle slower BPMs)
I am also struggling with altering the period of the timer dynamically... I have tried this:
period = (60*CLOCK_BPM_FREQ)/BPM // CLOCK_BPM_FREQ is the frequency of the timers clock (12000000) and BPM periodically.
timer_BPM_WritePeriod(period);
timer_BPM_WriteCounter(0);
Any ideas on how to solve these problems would be much appreciated!!
Happy Holidays
Stefan
Show LessAccording to PSoC Creator the firmware of my CY8CKIT (the black board) needs update. I opened up the PSoC Programmer, it detected the port and I managed to chose the right device (CY8C5888LT-LP097) but when I hit 'Upgrade Firmware' I get this error:
| Select Port in the PortList, then try to connect
| FAILED! Can not initialize Bootloader. Please replug KitProg device.
| Initializing...
I have tried to use a different port with no success. I'm using Windows 7 as virtual machine on OS X. The green status LED keeps blinking fast. Any ideas what to do?
Show LessDear all;
I am using CY8CKIT-050 Psoc 5LP dev kit and I am trying to run "AN70983\Bulkloop_Solution". I have modified the VID and PID accordingly.
const int VID = 0x04B4;
const int PID = 0x8051;
I have also followed the USBFS Bulk Wraparound Example Project 3.0.
When I run the code I get the following:
In short; the driver is OK and the device is visible at the left panel. I can also send and read data by using "CyPress USB Console". However I cannot do it with the mentioned program. So how can I send and receive data by using the mentioned program? I am using that because it is open source. Sadly the source code for "CyPress USB Console" is confidential. So what should I do or what should I modify to make the program work? (especially in c++)
Looking forward for your reply.
Yours Sincerely...
Show LessHello!
I'm fairly new to this but have been poking away at the CY8CKIT-050 and it's a pretty cool kit!
I'm currently trying to get both a hardware and software interrupt setup. I will eventually be varying the PWM time so I have a slow timer setup (so I can adjust my PWM period for anywhere between 1 and 60s, with varying duty cycles). I am currently having it set to toggle on and off every 1 second. I have an LED setup to be triggered via the PWM output (LED3) and an LED setup to be triggered by the interrupt (LED4).
Below is my current setup:
My code looks like this:
CY_ISR(PWM_Interrupt_Handler)
{
Pin_LED4_Write(~Pin_LED4_Read());
}
int main()
{
CyGlobalIntEnable;
PWM_Start();
PWM_Interrupt_StartEx(PWM_Interrupt_Handler);
for(;;)
{
// I have other code running in here
}
}
I've been trying to do as much reading as I can (in the forums, watching videos on youtube, etc) but I can't seem to find the issue with either my understanding (maybe it's doing exactly what I have it programmed to do but my expectations are wrong) or I'm missing something basic that needs to be enabled for this to be up and working.
Any help someone could give me would be greatly appreciated. If you need any additional information, please let me know. Thanks a lot!
Show Less