PSoC™ 4 Forum Discussions
Hello, I am running a very basic application of varying input voltage into an ADC and changing the LED color based on the voltage range. I keep receiving an error about not being able to define my variable adcSample (which is the result from the ADC).
int main()
{
/* Initialize ADC. Conversion is not enabled yet. */
void ADC_Start();
/* Start ADC conversion. */
void ADC_StartConvert();
adcSample = ADC_GetResult16(uint32 0)
Show LessHello Everybody,
Today I reach another strange topic that I personally do not get it.
I have a big custom characteristic of 44 bytes(11 int32 fields) that changes often( once at 4 seconds) and therefore I want them to notify the cell phone when the value changed. Since the code is very long I will put here only the notification part. I may say that a simple slider example works perfectly. Also this example works in some conditions.
<code>
tstSensorsForBLE tstValue;
tstValue.CO = astSensor[0].i32AvgValue;
tstValue.SO2 = astSensor[1].i32AvgValue;
tstValue.NO2 = astSensor[2].i32AvgValue;
tstValue.O3 = astSensor[3].i32AvgValue;
tstValue.NO = astSensor[4].i32AvgValue;
tstValue.Spec = astSensor[5].i32AvgValue;
tstValue.CO2 = astSensor[6].i32AvgValue;
tstValue.VOC = astSensor[7].i32AvgValue;
tstValue.T = astSensor[8].i32AvgValue;
tstValue.H = astSensor[9].i32AvgValue;
tstValue.P = astSensor[10].i32AvgValue;
if(u8ConnectionFlag != 0)
{
/* Get a handle for the notification characteristic */
CYBLE_GATTS_HANDLE_VALUE_NTF_T tempHandle;
/* Take the characteristic */
tempHandle.attrHandle = CYBLE_SENSORSSERVICE_SENSORSVALUE_CHAR_HANDLE;
/* Update the value and specify the lenght */
tempHandle.value.val = (uint8 *)&tstValue;
tempHandle.value.len = 44;
CyBle_GattsWriteAttributeValue(&tempHandle, 0, &cyBle_connHandle, 0);
/* If the BLE is connected with the phone notify it */
if(u8Notif != 0)
{
char str[20];
CYBLE_API_RESULT_T result;
/* Notify the phone that the values are update */
result = CyBle_GattsNotification(cyBle_connHandle, &tempHandle);
sprintf(str, "ERORR: %d wsdfgrfthjhuy\n",result);
UART_UartPutString(str);
}
}
</code>
The result code is always 1 which mean that one input parameter is not correct.
I track the problem to the size of the characteristic. If Instead of 44 length I put 20 then there is no error and it notifies correctly but above 20 I always have code 1.
My questions is: Is there a problem because I try to notify a characterstic of 44 bytes? If yes How can I do this notification of such big characteristic?
Thanks!
Show LessI have been working on Eddystone Protocol ,I am currently Working on PSOC 4 BLE pioneer kit with the Example program given by Cypress Semiconductor for BLE_pioneer_guide.
I was successfully able to get the Eddystone URL,but when I try to configure the Eddystone GATT configuration its not writing the URL.
One more thing I have observed in the PDF where Explanation of Eddystone is given ,the Service ,Charateristics and Custom UUID which have been given in PDF have been updated by Eddystone Github page.Link for Same I have given below.
https://github.com/google/eddystone/tree/master/configuration-service
So when I am configuring From other App like physical Web ,I am not able to Discover and connect to the Eddystone GATT configuration Service.
In the page its stated that the custom UUID for the Service is made for interoperablity.
If this is true ,can @cypress or anyone else open the Project to update the Document guide and Example program
Thanks ,
Yogesh.D
Show LessHi,
When I run the 100 Projects in 100 days example "#16 Authentication", http://www.cypress.com/blog/100-projects-100-days/project-016-authentication I have problems bonding and reconnecting on my Nexus phone with CySmart app,
I don't get screen to enter Passkey and I see "Bonding in progress.. Please wait" after a while the device disconnects with "Authentication process timeout".
Below is the terminal output:
Bluetooth Stack ON:
Set the I/O capabilities:
Updated the I/O capabilities:DISPLAY_ONLY
Started to advertise
Device Connected
CYBLE_EVT_GAP_AUTH_REQ from Master:
Unauthenticated and data signing
Bonding:yes
eKeySize: 0x10
err: 0x0
CYBLE_EVT_GAP_PASSKEY_DISPLAY_REQUEST. Passkey is: 1454889.
Please enter the passkey on peer device.
CYBLE_EVT_GAP_AUTH_FAILED: 15
Device Disconnected
As far I understand the Passkey should be 6 digits but I see here as 7 digits(sometimes). Is this correct(attached is the uart log file)?
Also how do I use static passkey entry, I did see a post regarding this but could not find much information. Some example workspace would be greatly helpful.
Any inputs would be of great help and appreciate the same.
Regards
Show LessHi, I have a simple question. I would like to build the new board with CYBLE-014008-00.
SCB0_TX of UART has two device port pin. Only one device port pin or both pins should be connected with controller?
Thanks
Show LessHi All
Our company is already using the PSoC 4 BLE with bootloader and bootloadable application updatable using UART SCB, no issues works extremely well.
The attached PSoC 4 project is applicable for the below and runs on a kit-042 with the UART debug sent to a separate kit-044.
The project uses I2C for the bootloading process and using a UART for debug which has some unexpected behaviour only after a cold start.
After the project is programmed, no cold start, the operation is as expected, the bootloader then bootloadable are executed successfully.
Upon disconnecting the USB and board to board UART tx and rx lines from the kit-044 (these lines parasitically power the kit-042) then reconnecting, the code executes sending "Boot St" then the PSoC reboots. This operation occurs continuously. Cycling the power has no effect, however downloading the project to the kit-042 again fixes the issue until a cold start is performed once again.
/* Enable global interrupts. */
CyGlobalIntEnable;
/* Delay is needed here for PsoC reboots*/
//CyDelay(1);
/* Start UART*/
UART2_Start();
UART2_PutString("Boot Start\r\n");
To resolve the issue we have tried reading the UART status, waiting until the UART buffer is empty, not enabling global interrupts, delaying the watchdog etc.. without success. We did find that was adding a 1ms delay after the interrupt enable appears to resolve the issue for the hardware/software combination detailed above. That is, on any cold start the operation is the same as a warm start.
Does anyone have any thoughts on this cold start issue or see an obvious error we have overlooked?
Thanks Kindly
Greg
Has anybody ever had a need to connect the serial stream (both Tx & Rx) from a SCB Hardware Uart to internal logic for mux-ing demux-ing before sending to an external psoc pin? I am struggling with how to do that since the HW_UART using an SCB goes directly to psoc external pin. I could solve the problem by sending the signal back into the psoc on another pin but that would waste 2 pins.
The attachment shows what I'm trying to do...ie on the left is my HW_UART and on the right is an example of simple serial data routing logic. I basically just want to go directly from the UART into my logic without having to go off-chip. As you can see there is not a connection between the two because I don't know of a way to separate the SCB HW_UART away from the dedicated pin.
Show LessHi all,
I have spent some time fighting this problem. I have tried many things, but I am still missing something. "Unable to find solution for analog routing". Can anyone help? I am starting to believe that I will not be able to do the design the way I want it ( may be I should use external op-amps?).
Bundle is attached.
Thanks,
Stoyan
Show LessHi every body!
I have a CY8CKIT - 042 PSoC® 4 Pioneer Kit and 6 P10 LED Matrix Panels 16x32 (1 colour) connected in series. I'm using PSoC Creator 3.0 SP2.
Link about P10 LED Matrix Panels :
http://forum.arduino.cc/index.php?topic=260320.0
http://arectron.com/yazilim/p10-panel-kullanimi.html
I want change brightness of P10 LED Matrix Panels via OE pin.
Example: P2.0 on CY8CKIT - 042 PSoC® 4 Pioneer Kit connected to OE pin on the first P10 LED Matrix Panels.
Beside using PWM component, can you please tell me about another solutions to change brightness?
Many thanks!
I've set up a the internal uart interrupt to fire when fifo is not empty. It works when the buffer size is default to 8 but when I increase the buffer size, the interrupt no longer fires. I see that for buffers greater than 8 bytes, the box is checked and greyed out so I am assuming that it is always active for fifos larger than 8. Am I wrong?
Thanks
Show Less