PSoC™ 4 Forum Discussions
I have a CySmart USB Dongle which I get from the Bluetooth Low Energy Pioneer Kit.
I have been using it for more than one year. Today after I connect it to the computer, the CySmart cannot found this dongle anymore. The Status LED on the dongle flash green light rapidly continuously.
What is happening?
Thank you
Show LessHi,
I am trying to set one 4200 BLE CPU at Stop Low Power Mode. The snippet of code to do this is the following
inline void GotoStop()
{
CySysPmSetWakeupPolarity(CY_PM_STOP_WAKEUP_ACTIVE_LOW);
PrISM_Clock_Stop();
PrISM_RG_Stop();
PrISM_B_Stop();
printf("\r\nSLEEP\r\n");
CyDelay(1000);
sense_Batt_Write(0);
sense_Batt_SetDriveMode(sense_Batt_DM_ALG_HIZ); // High Z
RED_P_SetDriveMode(RED_P_DM_ALG_HIZ); // High Z
GREEN_P_SetDriveMode(GREEN_P_DM_ALG_HIZ); // High Z
BLUE_P_SetDriveMode(BLUE_P_DM_ALG_HIZ); // High Z
UART_Stop();
CySysPmStop();
}
but unfortunately nothing happens. The power consumption remains the same.
The strange thing is that if I changed the first code line from CySysPmSetWakeupPolarity(CY_PM_STOP_WAKEUP_ACTIVE_LOW); to CySysPmSetWakeupPolarity(CY_PM_STOP_WAKEUP_ACTIVE_HIGH); the CPU goes at Stop mode and the power consumption is almost zero.
But as far as my hardware asks for falling edge at pin P0.7 for wake up, the CPU remains at Stop Low Power Mode forever.
Any idea, or suggestion?
Thanks
Bill
Show LessHi I'm trying to interface a HX711 weighing scale sensor with PSoC 4 BLE. The HX711is a 24-bit ADC for weighing scales that sends data one bit at a time in 24 clock cycles (datasheet attached).
I used the following code in Arduino to obtain data.
long Hx711::getValue()
{
byte data[3];
while (digitalRead(_pin_dout))
;
for (byte j = 0; j < 3; j++)
{
for (byte i = 0; i < 8; i++)
{
digitalWrite(_pin_slk, HIGH); //every HIGH pullup shifts one bit of data; hence _pin_slk needs to be pulled up 24 times
bitWrite(data[2 - j], 7 - i, digitalRead(_pin_dout)); //to read one bit at a time and store in data[]
digitalWrite(_pin_slk, LOW);
}
}
digitalWrite(_pin_slk, HIGH); //to pull the DOUT pin back to high to reach 25 pulses
digitalWrite(_pin_slk, LOW);
return ((long) data[2] << 16) | ((long) data[1] << 😎 | (long) data[0]; //bitshift left operator used for shift the bits to the left
//bitwise OR operator to add the three bytes (24 bits) obtained
}
How do I implement the same in PSoC? Does PSoC support a bitshift operator (<<) like Arduino?
Thanks,
Ganesh
Show LessHi,
I use the PSOC4 and PSOC5LP prototyping kits, I am interested in the CY8CKIT-145-40XX PSoC® 4000S CapSense Prototyping Kit , for an home automation project.
This kit specifically.
CY8CKIT-145-40XX PSoC® 4000S CapSense Prototyping Kit | Cypress Semiconductor
I would like to know more about the sensor pads on this kit. Is it possible to use our own design of sensor pads, say I would like to use smaller size buttons, is it possible to print a PCB with the buttons/sliders on it and then implement a touch based push button using the CY8CKIT-145-40XX controller card.
Are these simply PCBs, or do they have some chips embedded inside ?? The terminals indicate Rx, Tx etc. is there any kind of digital communication going on between the sensor pad and the controller ??
The above kit shows a total of 3 buttons and one slider, is it possible to have more buttons using the same control card ?? Instead of this can a PCB of my own dimension be used, containing appropriate number of buttons and sliders printed on it ??
I use another PSOC prototyping kit...PSoC® 4 CY8CKIT-049 4xxx
http://www.cypress.com/documentation/development-kitsboards/psoc-4-cy8ckit-049-4xxx-prototyping-kits
This to has a cap sense module, I have used a wire as shown in the demo video to test out the cap sense feature, can a simple touch based button/slider be implemented on a PCB similar to the CY8CKIT-145-40XX ??
I apologize if my queries sound too vague ......
thanks
a
Show LessHi all,
I am using some ISR for UART UART SCB Mode ver 3.2 and using the following code
uint8 flag = 0;
CY_ISR(uartInterrupt)
{
uint32 source = 0;
flag = 1;
UART_UartPutString("\nFlag = 1\r\n");
source = UART_GetRxInterruptSourceMasked();
UART_ClearRxInterruptSource(source);
UART_UartPutChar(UART_UartGetChar());
/* `#END` */
}
int main()
{
uint32 ch;
UART_Start();
UART_SCB_IRQ_StartEx(uartInterrupt);
//UART_RX_ISR_StartEx(uartInterrupt);
/* Transmit string through UART */
CyGlobalIntEnable; /* Uncomment this line to enable global interrupts. */
UART_UartPutString ("\r\n***********************************************************************************\r\n");
UART_UartPutString ("UART Initialisedr\r\n");
for (;;)
{
ch = UART_UartGetChar();
if(flag == 1)
{
flag = 0;
ch = UART_UartGetChar();
UART_UartPutChar(ch);
UART_UartPutString("\nFlag = 0\r\n");
}
}
}
Observation :
1. Control is not coming out from ISR "CY_ISR(uartInterrupt)"
2. Could not able to clear interrupt
Please help
Show LessI'm using the'Psoc Creator4.1',When creating a new project, there is no option to select the chip. Only select the project form. Where do you select the chip?
Show LessI have one Pioneer Kit I have set up as Broadcaster. This broadcaster can be seen by Cysmart app. I can also see this broadcaster using the 100 proj 100 days Observer project on a second Pioneer Kit. But I am unable to see it in my program which uses the same constructs as the Observer program. In fact, if I cut and paste the section of code from the Observer project under the CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT case statement, into my own code, I still don't see my broadcaster reported, with code that works in another project.
I see broadcasts from other sources, all of type RANDOM generated addresses, but I don't see my broadcaster which is PUBLIC. Note that I am not a dedicated Observer, as is the case with the Observer project.
Also, in the original code, when my device is an advertiser and not a broadcaster, this information IS picked up by me. It is only when I am broadcasting that I am unable to detect anything.
Any idea why this might be happening, why I am not able to pick up my broadcasts?
Show LessI am trying to create a custom service with two characteristics, but the device stops working when i try to write a value. I tried debugging, it realized the callback function goes to the main service(since main service and custom service have different handle) so it fails to write, How can i set a different call back for custom profile ?
Show LessHow to handle SGPIO data with UDB components
I am looking for information on interfacing a 256K X 16 SRAM to the PSoC 4 BLE chip.