PSoC™ 4 Forum Discussions
Hello,
I am using CYBL10161-56LQXI for my project with RTC enabled. How to enable alarm repeatition u.e. "Alarm should trigger at given time every weekday i.e. from monday to friday" or any other repeatition rate? I have been through the datasheet and code files but could not figure this out.
Thanks for answers.
Ashutosh
Show LessHello together,
during my first experiences with the CY8CKIT-042 Pioneer Kit i worked with example projects like the one with the linear slider.
I also tried some variations by using only one of the slider elements as a button.
Starting the Tuner always worked well.
But now i started to work with the CY8CKIT-024 CAPSENSE PROXIMITY SHIELD in addition. I use the example projects from the following Cypress product page:
http://www.cypress.com/documentation/application-notes/an92239-proximity-sensing-capsense
Doesn't matter which example project i try (i only use the ones that are named with 0042), none of them lets me work with the Tuner. The tuner always throws:
"Read operation failed! Ceck I2C connection".
All my settings of the EzI2C SCB block exactly match the document AN92239, which is also to be found on the link i mentioned before.
Updating components, Building and Flashing were working well ( I'm using PSoC creator 4.1).
Is there any setting that i may could have forget?
Thanks a lot!
Show LessHello,
I started with the BLE101 (CapSenseLed) example project and that worked fine (using CY8CKIT-042-KIT aka BLE Pioneer Kit). I wanted to track the time since reset so I put a timer component on the schematic and added an ISR to the TC (Terminal Count) of the timer. The Timer_ISR, which occurs every 5 seconds, toggles the green led and increments a variable "OnTime". And that all works fine.
Then I tried to add a custom characteristic to track the time since reset. I think I did everything right in the BLE component in PSoC Creator 4.1. I used the CySmart1.2 to verify operation and it looks good. (capsenseled Project archive attached).
Then I modified the BLE101 Android Studio project to accomidate the additional "OnTime" data. I did it just like the "capsense" data I think.
However, when click the notify switch for my "OnTime" I get a null pointer exception at the line number 310 in PSoCCapSenseLedService.java. The offending instruction is mOnTimeCccd.setValue(byteVal);
The Android Monitor shows:
Shutting down VM
09-06 13:54:40.786 5263-5263/com.cypress.academy.ble101 E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.cypress.academy.ble101, PID: 5263
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.bluetooth.BluetoothGattDescriptor.setValue(byte[])' on a null object reference
at com.cypress.academy.ble101.PSoCCapSenseLedService.writeOnTimeNotification(PSoCCapSenseLedService.java:310)
at com.cypress.academy.ble101.MainActivity$5.onCheckedChanged(MainActivity.java:186)
at android.widget.CompoundButton.setChecked(CompoundButton.java:165)
at android.widget.Switch.setChecked(Switch.java:1138)
at android.widget.Switch.toggle(Switch.java:1133)
at android.widget.CompoundButton.performClick(CompoundButton.java:123)
at android.view.View$PerformClick.run(View.java:22570)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7231)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
I have no idea why that is a null pointer. Since this is only a slight variation from the example code I was wondering if someone could try out my code and see what I am doing wrong. Any help would be greatly appricated!
Thank you,
Mark
Show LessI recently updated PSoC Creator to version 4.1. This included an update to GCC from 4.9.3 to 5.4.1.
My project includes an OTA fixed-stack Bootloader, which I developed by following the Cypress app note (AN97060). I wanted to change the security setting on the bootloader. I made the change and recompiled using Creator v4.1 and the new GCC without errors. I then updated the version settings in mk.bat (to reference creator v4.1 and GCC 5.4.1). Then I went to the bootloadable component in my bootloadable app and changed the dependency paths to the new path for GCC_541. I then ran clean & build on my bootloadable, which also runs without errors. However, after my device is programmed it does not function at all. There is no debug serial output, no blinking LEDs, and no bluetooth advertisement.
If I revert all of the changes described in the previous paragraph and rebuild everything, then my device works again as expected. Of course, I still don't have my modified security settings since the bootloadable component is now pointed at old bootloader build files.
What's going on? Can how can I get this to work again? Workspace attached.
Show LessOf the two following functions the first one works fine, the second seems to hang until I cycle power. I'd be grateful if someone could explain what I'm doing wrong.
Thanks,
Dennis
void UpdateGattDB_Sol_Timeout()
{
CYBLE_GATTS_HANDLE_VALUE_NTF_T tempHandle;
tempHandle.attrHandle = CYBLE_SOLENOID_READ_SOLENOID_TIMEOUT_CHAR_HANDLE;
tempHandle.value.val[0] = (uint8) (SolTOTime >> 8);
tempHandle.value.val[1] = (uint8) (SolTOTime & 0x00FF);
tempHandle.value.len = 2;
CyBle_GattsWriteAttributeValue(&tempHandle,0,&cyBle_connHandle,CYBLE_GATT_DB_LOCALLY_INITIATED );
}
void UpdateGattDB_Sol_State()
{
CYBLE_GATTS_HANDLE_VALUE_NTF_T tempHandle;
tempHandle.attrHandle = CYBLE_SOLENOID_READ_SOLENOID_STATE_CHAR_HANDLE;
tempHandle.value.val[0] = (uint8) SolenoidState;
tempHandle.value.len = 1;
CyBle_GattsWriteAttributeValue(&tempHandle,0,&cyBle_connHandle,CYBLE_GATT_DB_LOCALLY_INITIATED );
}
Show Less
I have read :
http://www.cypress.com/?app=forum&id=5283&rID=102995
and http://www.cypress.com/?app=forum&id=4749&rID=104386
I want to know that "If UDB is not used in my project, will this project be compatible for both PSoC4BLE and PRoC?"
OR in other words "are PSoC4BLE and PRoC drop-in replaceable?"
Show LessHello everybody. I 'm trying to learn about ADC converter in PSOC using CY8CKIT-049-4xxx. I made a simple test by using a pot. However there are a few problems:
1. I never get 2047 on 3.3v. I get around 1375 counts.
2. I didn't figure how to use ADC_CountsTo_Volts function. When I call it it returns nothing - or at least this is what see on Uart Termonal.
Please see the attached files.
Thank you in advance
Show LessIn PSoC Creator 4.1 update 1, using PSoC 4 BLE, I'm getting errors in BLE_1_StackGattServer.h as indicated by the red circle with an X in it. The error is "Unknown Type Name 'CYBLE_API_RESULT_T' and occurs in lines 242, 282, 320, 380 and 450.
The same error shows up in BLE_1_StackGattClient.h in about 24 lines.
However, the Notice List shows no errors.
I'd be grateful is someone could tell me what's going on here.
Thanks,
Dennis
Show LessIs there a simple example project I can give to our app developers to transfer data in SPP mode with the actual EZ-serial software to and from a smartphone with iOS and / or Android? I looked for such an example, as it seems to me the most flexible way to handle Bluetooth transfer for a wide variety of applications, but could not find one, instead I found lots of examples for specialized profiles or beacons. The available specialized Bluetooth-profiles don´t fit to our application, so we decided to use SPP as an extremely flexible solution. Moreover this allowes to use the Bluetooth modules (in our case CYBLE-022001) with the pre-programmed application software.
Ideally it would be just an extremely simple code example to send some text to the module and to receive the answer (and show it on the screen for example), just to show what library functions on iOS / Android to use. The only special requirement is, the code should preferrably handle messages that are longer than 20 bytes automatically (segmentation in several Bluetooth-messages) to avoid any pitfalls regarding segmentation.
Thanks for your help,
Hermann
Show Less