PSoC™ 4 Forum Discussions
Hello Yugandhar-san,
I am sorry.
I checked your modified sample code exactly.
I found that you have a mistake.
If I set red LED only on smartphone, both green and red reds are lighting.
If green only, all both green and red reds are lighting.
Best regards,
Yocchi
Show LessHi @ll,
I am pleased to announce that from now the free FORTH Mecrisp-Stellaris in the latest version 2.4.5 for the Eva-Kit-044 with the PSoC cy8c4247azi is available for download.
See: https://sourceforge.net/projects/mecrisp/files/Cypress/ >>> mecrisp-stellaris-2.4.5 for cy8c4247azi-044.zip
Mecrisp-Stellaris-FORTH is available for following Eva-Kits / PSoC`s :
Board: / PSoC:
CY8CKIT-043 -> cy8c4247azi
CY8CKIT-044 -> cy8c4247azi
CY8CKIT-046 -> cy8c4248bzi
CY8CKIT-049 -> cy8c4245axi
CY8CKIT-050 -> cy8c5868axi
CY8CKIT-059 -> cy8c5888lti
FreeSoC2 -> cy8c5888axi
The porting for the PSoC 6 is also planned. With this FORTH-pagage it is possible to test all C-applications interactively without debugger. The Kernel have integrated an interpreter and compiler. The Compiler is extendabel in FORTH itself (generic and generative programming).
If you would like to know more about FORTH, you will find the classic Starting-FORTH and Thinking-FORTH by Leo Brodie:
http://thinking-forth.sourceforge.net/
The Definition of ANS FORTH you can find here: http://lars.nocrew.org/dpans/dpans.htm
If you want to know more about Mecrisp-Stellaris you are right here:
https://www.forth-ev.de/filemgmt_data/files/4d2015-arm.pdf
Have fun
Klaus
Show LessMake API for VEML6070 UV light ?
There are a number of examples that work OK. Watchdog_PSoc4_Example is a great example on how to set up the WDT, and it dutifully resets the processor after six timers interrupts on Timer0:
/* Setup ISR for interrupts at WDT counter 0 events. */
WdtIsr_StartEx(WdtIsrHandler);
/* Enable global interrupts. */
CyGlobalIntEnable;
/* Set WDT counter 0 to generate interrupt on match */
CySysWdtWriteMode(CY_SYS_WDT_COUNTER0, CY_SYS_WDT_MODE_INT);
CySysWdtWriteMatch(CY_SYS_WDT_COUNTER0, WDT_COUNT0_MATCH);
CySysWdtWriteClearOnMatch(CY_SYS_WDT_COUNTER0, 1u);
/* Enable WDT counters 0 and 1 cascade */
CySysWdtWriteCascade(CY_SYS_WDT_CASCADE_01);
/* Set WDT counter 1 to generate reset on match */
CySysWdtWriteMatch(CY_SYS_WDT_COUNTER1, WDT_COUNT1_MATCH);
CySysWdtWriteMode(CY_SYS_WDT_COUNTER1, CY_SYS_WDT_MODE_RESET);
CySysWdtWriteClearOnMatch(CY_SYS_WDT_COUNTER1, 1u);
/* Enable WDT counters 0 and 1 */
CySysWdtEnable(CY_SYS_WDT_COUNTER0_MASK | CY_SYS_WDT_COUNTER1_MASK);
/* Lock WDT registers and try to disable WDT counters 0 and 1 */
CySysWdtLock();
CySysWdtDisable(CY_SYS_WDT_COUNTER1_MASK);
CySysWdtUnlock();
As I understand it, a Timer0 match increments Timer1, and when Timer1 gets a match, the processor is reset. I get the requisite number of interrupts before the reset occurs, so I think I get the concept.
I cannot find a description of how to keep the WDT from firing, but it seems that
CySysWdtResetCounters( CY_SYS_WDT_COUNTER1);
in the main loop should do the trick, presuming, of course, that my understanding of the timer relationships is correct, and that I hit it often enough.
That does not appear to work, or something else is going awry.
Am I close?
I'm having a bear of a time debugging as the debugger keeps detaching, which I suppose could be something to do with the WDT, as if I comment out the WDT code, the debugger behaves more rationally.
Show LessI am trying to use the USB HID example and keyboard operation from the project CY8CKIT_046_USB_Mouse but I am having problems with the keyboard LED output report. The HID report descriptor includes the LED output data but no OUT endpoint is configured in the interface descriptor. Can somebody please update this project so I can see how to process EP OUT data? Thank you.
This is where I downloaded the example:
http://www.cypress.com/file/418726/download
Show LessI want to make a project where if you press a button once, an LED flashes once. If you press a button twice, an LED flashes twice, and so on and so forth. Is there a way to program a timer and an interrupt to help us do this?
Show LessBackground story: I built a 3d printed excavator arm for my son for christmas a couple years back (https://www.thingiverse.com/thing:2041143) and he broke the lame servo I put on it, so I redesigned the connection for a stepper, but instead of reprogramming the psoc 1 that runs the controls, I'm going to put in a psoc4 to intercept the servo output from the psoc 1 and control the stepper motor. It should be easy and a good excuse to put one of the red boards in the box...
Problem: I'm using a psoc 4 4200 protoboard to intercept a PWM servo signal and drive a stepper motor, but I can't get the timer interrupt to trigger on the rising/falling edge of the signal. I've read Re: Measuring 8 Hobby Servo Signals downloaded the example 1 servo project and watched the psoc 101 tutorials on how to use the TCPWM component in count mode, but the ISR doesn't fire and I don't know why (disclaimer, a second ISR is working to run the stepper motor timer). I'm using an arduino to put out a test servo signal and my servo moves with it. I connect the psoc to the servo signal and nothing. From a hardware setup standpoint, the TCPWM is supposed to reset and start on a rising edge of the servo pulse and I have count enabled for that as well. On the falling edge, it is supposed to capture and stop. The clock is HFCLK / 1 = 24 MHz and it is a 16 bit counter, so at a count rate of 418 ns, it will take 24000 counts to get to 1 ms and 36000 to get to 1.5 ms and 48000 counts to get to 2 ms at which point the signal should be off. The software side of this is pretty straightforward if the interrupt would trigger. What did I forget to turn on or miss?
Code snippet:
CY_ISR(ServoRead_Int_Handler){
ServoRead_ClearInterrupt(ServoRead_INTR_MASK_CC_MATCH);
Countme = ServoRead_ReadCapture();
Flag = 1;
}
int main(){
/* local variables */
ServoRead_Int_StartEx(ServoRead_Int_Handler);
isr_1_StartEx(StepperMove); // setup timer interrupt sub-routine
CyGlobalIntEnable; /* Enable global interrupts. */
...
top design:
Thanks for any help or suggestions!
Show LessHi, all.
I measured ECG using PSoC 5LP.
However, since I want to use the Bluetooth function, I use PSoC 4 BLE now.
PSoC 4 BLE has no digital filter. So noise can not be eliminated well.
Are there any good ideas?
thank you.
Show LessI am using an external RF power amplifier SKY66111-11 which uses two control lines CTX and CRX to switch from TX to RX,
I have seen some code which is confusing me see below.
I am using P2-7 for the CTX and P2-6 for the CRX
To transmit CTX = 1 and CRX = 0;
To receive CTX = 0 and CRX = 1;
To standby CTX = 0 and CRX = 0;
The queastion is how do I control the SKY66111-11 from the link layer?
#if
TX_RX_GPIO_ENABLE
*(uint32*)(CYREG_RADIO_TX_RX_MUX_REGISTER)&= ~RADIO_TX_RX_MUX_MASK; /* Clear Previous mux selection */
*(uint32*)(CYREG_RADIO_TX_RX_MUX_REGISTER) |= BLESS_MUX_INPUT_MASK; /* Set BLESS as the source of the mux */
*(uint32*)(CYREG_BLE_BLESS_RF_CONFIG) |= RADIO_TX_RX_SEL; /* Select Tx enable & Rx enable signals from BLESS as input to mux */
#endif /* End of #if TX_RX_GPIO_ENABLE */
Show Less