PSoC™ 4 Forum Discussions
I've been developing an embedded system for some time using the CyBle-143A development kit on a custom carrier card. Among other things, the systems uses the SAR ADC to take some measurements at a relatively low rate. So far this has worked to my satisfaction.
I just received our new full custom card with the same PSoC4 device on it (CY8C4248LQI-BL583). The hardware on the new PCB is nearly identical to the old platform we merged the schematics for the CyBle-143A kit with our carrier card schematic to eliminate the connectors to reduce manufacturing cost. I loaded the same code on the new card and every other function appears to work except the ADC always returns the maximum value (0xFFFF). One small difference between the old and new cards is that I omitted the 1uF bypass cap on the VREF pin for the new card but documentation seems to indicate that this is optional. I checked the voltage on the ADC input pin (P4.0) and it's nominally close to zero.
Below shows how the ADC is configured. In my code, I initialize the ADC using 'ADC_Start()' and I read it periodically using 'ADC_GetResult16(0)'.
What could be some reasons for getting these results? What are some things I can check to debug this issue?
Show Less
Hi,
I would like to know what would be simplest way to generate sine wave since there is no LUT and WaveDAC available (or I'm missing something?).
Generally I'm trying to create BPSK modulator, and am looking to modulate information receieved by UART.
I am using PSoC Creator 4.1.
Show LessHi,
I want to know how can we transmit data serially from one PSoC 4 module to the other PSoC 4 module. Both the PSoC 4 modules are CY8CKIT4248LQI-BL583.
I read that we can connect two devices via BLE one being central the other being peripheral.
So, my question is how to send serial data through this BLE connection.
I want to create an application such that when I press a button on the first board the signal is transmitted serially to the other board (we can see that the data is received on terminal application on COM port of the second board, by displaying message) and the LED on the 2nd board blinks when button pressed on first board.
Please provide methods and sample programs if any.
Thanks in advance.
Show LessHello!
I am using the PSoC4 S-Series Pioneer Kit CY8CKIT-041 and i want to store a byte (or 8 Bytes) into flash memory.
Unfortunately, i could not found the emulated EEPROM component in the component catalog. I am a little confused because i read that it should support PSoC 4!?
Then i tried to use the API
uint32 CySysFlashWriteRow(uint32 rowNum, const uint8 rowData[])
But i always get returned CY_SYS_FLASH_INVALID_ADDR.
Can somebody help me and give me a short example how i can do that?
Show LessHello,
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