PSoC™ 4 Forum Discussions
HI,
I switched form Arduino to PSoC today and followed PSoC101 tutorilas and executed the first LED Blink program.
I am using: CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit
I am not understanding why the following piece of code only making RED LED blink. Why Green and Blue is not working.
#include "project.h"
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
for(;;)
{
/* Place your application code here. */
Pin_Red_Write ( ~ Pin_Red_Read() );
CyDelay( 500 );
Pin_Blue_Write ( ~ Pin_Blue_Read() ) ;
CyDelay( 500 );
Pin_Green_Write ( ~ Pin_Green_Read() ) ;
CyDelay( 500 );
}
}
How to override printf's in PSoC4?
Overriden the printf function in retarget.c, but still crashing in "__sinit" arm lib function call.
How can we skip (/ override) __sinit function call in PSoC4 compilation?
Aim is to go to fputc function defined in retarget.c from printf.
Attaching project for reference.
Show LessI haven't been able to find a 3D model for on any of the associated product pages, but since my experience of getting helpful answers here on the forums has been great so far, I'd like to go ahead try asking here. Is there any chance that a 3D .STEP model file is available for the CYBLE-012011 bluetooth module?
Thanks again!
-Jonathan
Show LessI need to interface with one wire and pseudo one wire devices. I believe that if the pin is configured to bidirectional open drain with drives low option will work.
The one wire devices require a 5Kohm pull up resistor. Is it possible to configure the bidirectional pin with the pull up resistor option?
The second part of the question is about switching the port from output mode to read mode.
1. For the host to assert a low write a 0 to the pin.
2. To write a 1 or release the bus for read mode write a 1 to the pin.
Is this correct?
Thanks
Glenn
Show LessHi.
Is it possible to change the configuration of PSoC4 (4200M) device/project during runtime? By configuration I mean for example connecting an analog pin to ADC first and switching (connecting) it to Comparator an back on demand. Doing this in software only, without anything that uses UDBs.
For example - in other MCUs, pins can have different functionalities, depending on registers' configuration.
Is there some way to do this with PSoC4?
Thanks.
Show LessGood morning,
I have a problem with my PRoC BLE. I would like tu change advertising channels during DTM mode but i don't know if it is possible. I have seen in the Bluetooth files automatically generated that all function about changing advertising channels are disabled.
I have follow this project to begin:
http://www.cypress.com/blog/100-projects-100-days/project-018-direct-test-mode-dtm
To you have any solution about this problem?
Thank you!
Show LessHello,
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 Less