PSoC™ 4 Forum Discussions
I am firing an interrupt when I received data in my RX Fifo for my SCB Uart block. I can see that I enter the ISR but I never seem to leave. I can disable the interrupt in the ISR but then I can't get back into it when more data comes in. Why am I having this issue? Attached is my project.
Show LessIs it possible to connect my custom made board (still in design pĥase) to the SWD, RES and power pins on the socket for the PSoC module on the "CY8CKIT-042-BLE Pioneer Baseboard" to program it through the PSoC Creator Interface?
Will the software detect the chip on the custom board and program it (provided the connections are correct)?
Thanks!
Show LessI am attempting to generate some fast signals to control some leds (WS2812B driver for NeoPixel LEDs).
I have decided to go with the PWM module on the PSoC 4 in a Single-shot Multi reload configuration. I also have PWM setup for 2 outputs, one for my '1' bit and one for my '0' bit waveform.
- The '1' bit waveform reqires a ~850ns high time and a ~450ns low time (+/-150ns)
- The '0' bit waveform reqires a ~450ns high time and a ~850ns low time (+/-150ns)
Since the periods are the same i kept them on the same PWM module. Now, I added a multiplexor on the output to allow me to switch between the two waveforms and control a single output pin. The multiplexor is switched via a control register module, single output.
The timing from PWM generator is spot on, the problem i run into is that the time to reload into the next bit pattern takes too long. The period of the PWM is ~1.3us and then there is ~5us delay until the next bit waveform is generated.
Lastly, each LED is a 24bit RGB, so i need to generate 24x a combination of '1' and '0' waveforms.
I have 2 questions for this project:
- Is there a way to remove the delay (~5us) in between each signal being generated in PWM one shot mode? I only have a multiplexor on the PWM output. Once i re-trigger it should be really quick.
- Is there a better way to generate these waveforms (timer, counter, etc..) ?
I was hoping to try a different way than just adding NOPs in a for loop.
Show LessI stumbled recently over a document (chapter 5.2 pg 28) that describes as a side-effect how to connect the Pioneer Kit to the PC displaying informations using the UART component. The "secret" are two (2) wires connecting the UART Rx and Tx to the on-board PSoC5LP Kit-programmer which then acts as an UART-to-USB bridge. On the PC-side I used the PuTTY program to display (and input) the data. In the description of the F-Ram Development Kit is a detailled procedure to set up the connection and hints where to download the needed terminal program. Remember that you do not need the F-Ram Kit, just put the two wires into the shown locations and all is well.
In short: drop a UART component on your sheet and use pins 0[4] and 0[5] for Rx and Tx
Connect external wires on the board between
J4 pin 1 ---Rx---- J8 pin 9
J4 Pin 2 ---Tx---- J8 pin 10
Download and install PuTTY as shown in the above mentioned document.
Example project attached, happy coding!
Bob
Hi!
I am not quite sure what is going on: I define UUIDs of my chracteristics and descriptors in the BLE component. The characteristic UUID of characteristic is handled fine, but the descriptor UUID is messed up.
See the picture: in the left-hand upper corner is the CySmart output of what I am getting. In the bottom you can see what it should be.
Show LessHi everyone,
i used the example Project AN91162 to make my own Custom BLE Service. I made the all the settings on the BLE-Block. All i want is to transmit a varibale uint8 over Bluetooth to my CY8CKIT-042-BLE. But now to my problem: I can't find the datatyp of the CYBLE_GATTS_WRITE_REQ_PARAM_T or the wrReqParam. Down below you see the Code i made. How to fill in the wrReqParam to my variable command, i made a Green comment, where i try to make this happen in the Programm. All that i try makes Errorors and doesn't work. 😕 Ideas how to make this?
Thanks for Help!
#include <project.h>
void GeneralEventHandler(uint32 event, void * eventParam) //eventParam contains Data written
{
uint8 command;
CYBLE_GATTS_WRITE_REQ_PARAM_T *wrReqParam;
switch (event)
{
case CYBLE_EVT_STACK_ON:
CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST);
break;
case CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP:
if(CyBle_GetState() == CYBLE_STATE_DISCONNECTED)
{
CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST);
}
break;
case CYBLE_EVT_GAP_DEVICE_DISCONNECTED:
CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST);
break;
case CYBLE_EVT_GATTS_WRITE_REQ:
wrReqParam =(CYBLE_GATTS_WRITE_REQ_PARAM_T *) eventParam;
//Here i want to set the Value of wrReqParam to the variable "command" but how?
break;
case CYBLE_EVT_GATT_DISCONNECT_IND:
break;
default:
break;
}
}
void InitializeSystem(void)
{
CyGlobalIntEnable;
CyBle_Start(GeneralEventHandler);
}
int main()
{
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
InitializeSystem();
/* CyGlobalIntEnable; */ /* Uncomment this line to enable global interrupts. */
for(;;)
{
CyBle_ProcessEvents();
/* Place your application code here. */
}
}
Show LessHello,
I am having some issues with reducing power consumption on the PRoC 4 BLE chip. Maybe someone can help me.
If I create a new project on the chip, and only enter the following commands in main.c, the resulting current consumption will be 1.3uA as expected:
int main() {
CyDisableInts();
CySysClkEcoStop();
CySysPmDeepSleep();
for (;;) { }
}
If I add an SBC UART configured for 9600 baud to TopDesign and make no changes to the code (I do not start the component), I am seeing a current consumption around 370 uA.
I have tried placing a SBC_UART_1_Stop(); command prior to entering DeepSleep as well. In all situations, it seems that if a UART is defined, the resulting power consumption cannot be reduced. Any thoughts as to why that would be?
In addition, the datasheet seems to indicate that the UART consumption should be 9uA at speeds of 100Kbits/sec (which 9600 baud is well under) and 312uA at speeds of 1000Kbits/sec. When I add a UART configured at 9600 baud, I am seeing a much larger current consumption than 9uA.
My current readings are taken at J15 on the evaluation kit.
Thanks for any help folks can offer.
- Chris
Show LessHi,
I'm searching a way to improve my throughput between a psoc 4 ble and an Android device version 5.1.
I am wondering if the psoc can send more than 1 packet in a connection event in notification mode.
Also, I don't want to change the MTU size for someting not standard. So I send only 20B of data/packet.
Thank you,
Show Less