PSoC™ 4 Forum Discussions
Hello,
I am designing a capacitive sensing trackpad using the CYBLE-214015-01 module. I notice that when I have my finger also touching the battery, the trackpad works great to control the cursor of my computer use the BLE HID Mouse Trackpad code provided by Cypress. Conversely, when I am not physically touching the battery, the trackpad works poorly. Do you have any insights on why this is the case? I have added a hatched ground plane to the front and back layer of the PCB as well as solid ground planes to the two middle layers of the PCB. Originally, I thought it was a grounding issue, however, I have maximized the amount of ground planes I can add to my design. I also added the 560 ohm resistors to each of the CapSense pins.
Thank you.
Show LessHello,
here's basic info about my setup
1. CY8CKIT-042-BLE with CY8C4247LQI-BL483
2. Using SLLD driver version 16.2.1
3. S25FL128L wired up to #1 over SPI
I am able to read manufacturer id, unique id, block erase, read any page.. but I have a strange problem,
If I try to erase sectors of block in a loop, it passes the first time but fails the second time. The actual command does not fail, but if i read the sector, it is NOT 0xFF.. I repeat the same test with block erase instead of sector erase, everything is fine.. I am hoping it is some silly error on my behalf ..
here's relevant part of my code
#define DUMMY_SLLD_DEVICE_NUM (0)
SLLD_STATUS acdc_flash_erase_sector(ADDRESS addr, DEVSTATUS* dev_status) {
return slld_SEOp(DUMMY_SLLD_DEVICE_NUM, addr, dev_status);
static int flash_test_1(void) {
/* Flash api test
1. Read a page
2. Erase that page
3. Read again to make sure it was erased
4. Program that page
5. Read to ensure it was written
6. Repeat for 4 pages
*/
BYTE acdc_flash_buf[FLASH_PAGE_SIZE] = {0};
ADDRESS page_address = 0x0;
DEVSTATUS dev_status = 0;
unsigned long total_pages = 0;
while (total_pages < 4) {
printf("\ntesting page %d (address %x)\n\n", total_pages, page_address);
if (SLLD_OK != acdc_flash_read(page_address, acdc_flash_buf, FLASH_PAGE_SIZE)) {
printf("!!!!.. flash read 1 did not work.. bailing out !!!!!!\n\r");
}
print_buf(acdc_flash_buf, FLASH_PAGE_SIZE);
dev_status = 0;
//if (SLLD_OK != acdc_flash_erase_sector(page_address, &dev_status)) { ---> if I use this line, the data i read later is not 0xFF
if (SLLD_OK != acdc_flash_erase_block(page_address, &dev_status)) { // --> this is just fine
printf("!!!!.. flash erase 1 did not work.. bailing out !!!!!!\n\r");
return 2;
}
printf("\n\n erase : dev status %d\n", dev_status);
if (SLLD_OK != acdc_flash_read(page_address, acdc_flash_buf, FLASH_PAGE_SIZE)) {
printf("!!!!.. flash read 2 did not work.. bailing out !!!!!!\n\r");
return 3;
}
if (check_buf_erased(acdc_flash_buf, FLASH_PAGE_SIZE)) {
printf("\n\n!! erase failed.. bailing out");
return 5;
}
fill_buf_dummy(acdc_flash_buf, FLASH_PAGE_SIZE);
dev_status = 0;
if (SLLD_OK != acdc_flash_write(page_address, acdc_flash_buf, FLASH_PAGE_SIZE, &dev_status)) {
printf("!!!!.. flash write did not work.. bailing out !!!!!!\n\r");
return 3;
}
printf("\n\n flash write: dev status %d\n", dev_status);
clear_buf_dummy(acdc_flash_buf, FLASH_PAGE_SIZE);
if (SLLD_OK != acdc_flash_read(page_address, acdc_flash_buf, FLASH_PAGE_SIZE)) {
printf("!!!!.. flash read did not work.. bailing out !!!!!!\n\r");
}
verify_write(acdc_flash_buf, FLASH_PAGE_SIZE);
total_pages++;
page_address += 0x1000; //sector size is 4096 bytes
}
return 0;
}
I am using two projects to reference from when writing my BLE application on the PRoC CYBLE 02201-00. The first is the BLE Heart Rate Sensor example project, and the second is the creating a custom ble profile project.
I am now able to check an individual CCCD to see if notify has been set and can use the notify or non-notify versions of the write value function. However, on both example projects when I use Enable All Notifications from the CySmart windows app it will flip the bit on the Service Changed CCCD and then update all the other CCCDs. However, I can not find the function that handles this in either project. I am not even sure of the Service Changed CCCD Handle.
Can anyone show me how these projects accomplish that so I can use it in my application?
Show LessHi all,
If i write to TCPWM_WriteCompare() or TCPWM_WritePeriod() everything works fine.
But if I write to TCPWM_WriteCompareBuf() or TCPWM_WritePeriodBuf() nothing happens.
I have read TRM and Data Sheet but it is not clear to me how the switch input is used?
Attached picture how I connected switch input.
Regards
Luis
Show LessIs there an API that will convert the CURRENT_TIME and LOCAL_TIME_INFO received from a CTS into UTC time?
Cheers,
Mike
I'm currently playing around with OTA functionality on one of our products. I'm doing a bit of my testing using LightBlue, and I'm having issues with LightBlue not updating the services it can "see" when my peripheral changes from Bootloadable to Bootloader, or vice versa.
The only way I can get LightBlue to show the correct services is to go into the Bluetooth settings on my smartphone and "forget" the connection with my peripheral. I then have to go through a new pairing operation, and everything is ok again.
I'm not 100% sure what's going on, but its like LightBlue either isn't receiving any notification to say the GATT database has changed, and to hence discover the applicable services, or I'm not telling LightBlue that it needs to do this.
I followed the Fixed Stack OTA examples, and there doesn't appear to be anywhere in those code examples where they are explicitly telling the client that the database has changed.
Can anyone help me out?
Cheers,
Mike
Show LessI am trying to write a program for the BNO055 device by BOSHC. I have the driver as a master since I need to connect with the I2C but I am confused about how to use the I2C API's. I know that I have to use uint32 SCB_I2CMasterReadBuf(uint32 slaveAddress, uint8 * rdData, uint32 cnt, uint32 mode) for me to be able to read from the registers, but I am confused about what to pass into the function. Any help would be appreciated!
Show LessNow that some PSOC4 units have CAN, a common need for me is bootloading over CAN. The hope would be that I can leverage as much as possible of the built in capabilities to avoid custom bootloaders and the challenge of making them work well on deployed products.
I see resources on several serial bootloader methods. I even see some information on customized interfaces instead of the standard serial interfaces for the bootloader (I2C, UART, ....) , but nothing specifically for CAN on the PSOC 4. When choosing a bootloader interface there is an option for a custom interface, but that leads me deep down a path, one I am unsure is the best or even necessary.
It would seem that making a custom component would be the best route, but I am unsure enough I would like opinions from much more experienced people. I am getting comfortable with PSOC but creating a new component to handle a bootloader interface seems like a project in itself.
Said about non standard communication for a bootloader
If you want to use a nonstandard communication channel for bootloading, you can easily create a custom Component. You must write an API for the Component that supports just five functions: Start, Stop, Reset, Read, and Write. For more information on how to create a bootloader custom communication Component, see the PSoC Creator Component Author Guide.
PSoC® 3, PSoC 4, and PSoC 5LP UART Bootloader
https://www.cypress.com/file/45171/download
PSoC - Introduction to Bootloaders
https://www.cypress.com/file/45346/download
PSoC® CreatorTM Component Author Guide
https://www.cypress.com/file/137436/download
CE221653 – PSoC 4 Bootloader and Bootloadable
https://www.cypress.com/file/407091/download
I am using a CY8C4244 and have been using PSOC4 for several years now, and have run into a situation that does not make sense.
Setting up a non-dedicated interrupt is not apparently an option, and this is very bad for my design as I cannot have as many dedicated interrupts as is required,
What gives here, why is this not functioning like all other PSOC4s I have used to date? Please respond ASAP, this is a big issue.
Show Less