PSoC™ 4 Forum Discussions
Hello,
For my project I am using the UDB UART block. While going through the datasheet of the UART block, I came across the API UART_ReadTxStatus() which is used to read the status register for the TX of UART. I needed to write a function that "waits for the transmission of outgoing serial data to complete" similar to the Serial.flush() function of the Arduino.
I would like to obtain some more clarity about the UART_ReadTxStatus() function and its return parameters. From the datasheet, what I could gather was that the function returned the values UART_TX_STS_COMPLETE, UART_TX_STS_FIFO_EMPTY, UART_TX_STS_FIFO_FULL, UART_TX_STS_FIFO_NOT_FULL respectively depending on the contents of the transmit buffer.
So does this mean that the function returns the values 01hex, 02hex, 03hex and 04hex respectively depending on the above mentioned parameters?
Thanks,
Ganesh
Show LessI'm trying to use the ADC SAR UDB in my PSoC BLE, i think theres something wrong in my code because there's no response on the Serial Communication (I only see my first message). This is my code:
#include "project.h"
#include <stdio.h>
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
char str[12]={'\0'};
uint16 conversion=0;
uint16 voltage=0;
ADC_Start();
IDAC_Start();
UART_Start();
UART_UartPutString("Hi everyone");
for(;;)
{
ADC_StartConvert();
ADC_IsEndConversion(ADC_WAIT_FOR_RESULT);
conversion=ADC_GetResult16(0);
voltage=ADC_CountsTo_mVolts(0,conversion);
ADC_StopConvert();
sprintf(str,"%d",conversion);
UART_UartPutString(str);
CyDelay(500);
}
}
When I use the debbuger I see that my data is lost in the transformation with the line "voltage=ADC_CountsTo_mVolts(0,conversion);". But, the "ADC_GetResult16(0);" does give me the data (Example 1675, out of 2047), but the it doesn't convert it to mili volts. Does anyone know what is happening?
Pd. In my TopDesign I only have IDAC, ADC SAR Seq, SCB (as UART) and I am using Arduino Monitor Serie where I only see the first message: "Hi everyone".
Show LessHi,
I'm stucking in my project (see attachment) and need your help. My project is based on the BLE_HID_Joystick example with some changes for my requirements. I did not change the BLE modul and copied the BLE code, but I get an api error 100 (CYBLE_ERROR_INVALID_PARAMETER) and 300 after connecting to CySmart. My hardware is the CY8CKIT-042-BLE with the black PRoC board.
I couldn't find what error 300 is and I don't know how to solve error 100 (CYBLE_ERROR_INVALID_PARAMETER). It would be great if anyone would help me. I used PSoc creator 3.3 and 4.0.
The UART output:
BLE HID Keyboard Example Project <\r><\n> Bluetooth On, StartAdvertisement with addr: c04929199580<\r><\n> EVT_ADVERTISING, state: 3 <\r><\n> EVT_ADVERTISING, state: 3 <\r><\n> EVT_ADVERTISING, state: 3 <\r><\n> EVT_GATT_CONNECT_IND: 0, 4 <\r><\n> EVT_GAP_DEVICE_CONNECTED: connIntv = 0 ms <\r><\n> API Error: 300 <\r><\n> API Error: 10<\0>API Error:<\0>API Erro?API Error: 300 <\r><\n> API Error: 300 <\r><\n> CYBLE_EVT_GATTS_XCNHG_MTU_REQ, final mtu=<\0>API Erro<2>
Show Less
Using the project UART_to_BLE_peripheral, I am getting errors when compiling.
These are identifiers not declared for usage in app_ble library
CYBLE_SERVER_UART_SERVER_UART_TX_DATA_CLIENT_CHARACTERISTIC_CONFIGURATION_DESC_HANDLE
CYBLE_STATE_ADVERTISING
Any idea where and how should be declared?
Show LessHi,
I use the CYBLE-222014-01 (BLE 4.2) module as a master to control a few I2C slaves. The hardware design requires to power down the whole I2C bus most of the time (controlled by a GPIO of the Cypress module). The module doesn't have to go to any sleep modes (for now). I'm wondering what is the best way is to do this? Do I have to call I2C_Start() when to bus is powered or it doesn't matter? Do I have to call I2C_Stop() before powering the bus down or can I just leave the component running? Of course, I do not do any I2C transactions on the bus while the bus is powered down.
-Tamás
Hello,
We need to generate accurate timing / waveform output using PSoC4 device.
PSoC4 does not have a built in crystal oscilltor support.
Internal IMO is +-2%, trimmable to certain range, (this is not sufficient and correct compare to crystal oscillator)
External crystal oscillators are expensive and consumes more power.
Do you have any suggetion on this issue?
Regards,
Vinay
Show LessI've a CYBLE-022001-00 BLE PRoC module and it is configured as GAP peripheral device. My intention is to only allow it to be discovered by a single GAP central device. Therefore, I've tried to choose "Connectable directed advertising" type in the GAP Settings (also to populate the target Random device address in the advertising packet). However, this option is not available in the dropped down list. I would appreciate if someone has an idea/suggestion. Thanks!
Show LessI have been working on a project using the CYBLE-222005-00 module (BLE 4.1) and nicely developed all the required features including BLE beaconing, deep sleep, etc. Now the hardware platform has moved to CYBLE-222014-01 (BLE 4.2) and certain functionalities of my software stopped working (I guess related to deep sleep mode but I can't confirm that). I didn't expect this at all, I thought this would be a fairly painless move. Before getting deep into debugging and wasting a lot of time I thought to ask if there's a migration guide for the new module? If not anyone with more understanding could maybe point out differences or potential incompatibilities between the two modules? I tried both PSoC Creator 3.3 and 4.0. Any help is appreciated. Thanks!
-Tamás
UPDATE: It seems that the I2C module behaves strangely. I do an I2C_Stop() call before deep sleep and I suspect this causes the code to crash. Is it possible that I2C is different on the BLE 4.2 module?
Show LessHi,
I downloaded the capsense one button example from here
I tried to open it with PSoC Creator 3.3 CP2 (3.3.0.7343)
But I am getting following message:
Unable to open the project ".\CE210291_CapSense_P4_One_Button.cydsn\CE210291_CapSense_P4_One_Button.cyprj": Requested value 'CortexM0p' was not found.
Is it possible to open this example?
Br, Ville
Show LessWe are using the CYBLE-022001-00 module in a project and need to send some commands to another device via the I2c bus. Is anyone aware of a sample project that covers this application?
Show Less