PSoC™ 4 Forum Discussions
I've got an application that communicates over BLE. It uses 2 characteristics to transfer data via notification to an iOS app. Everything connects just fine and if I let it just sit there without enabling notifications on the characteristics then it stays connected indefinitely. However, when I enable notifications, data is transmitted from the device to the app and then disconnects after exactly 30 seconds.
I've read a few suggestions but none of them have worked:
- Make sure the characteristic and descriptor have different UUIDs
- Verify the BLE timing parameters match Apple's guidelines
- Make sure the BLE interrupt is a higher priority than other system interrupts
In my BLE callback I can see the error code that's returned when it disconnects. The event is CYBLE_EVT_GAP_DEVICE_DISCONNECTED and the parameter value is CYBLE_HCI_CONNECTION_TERMINATED_USER_ERROR (0x13). This error makes it sound like it's the app side that's causing the disconnect but that shouldn't be the case. I get the same behavior whether I use our custom app or a BLE debugging app (Light Blue Explorer). Both disconnect exactly 30 seconds after notifications are enabled.
There's nothing in my code that happens after 30 seconds. It just keeps transmitting data indefinitely.
Any guesses? Thanks.
Show LessHello,
I have developed firmware in Cypress to get data from (Broadcaster/Observer) Eddystone TLM which I believe is 1-way communication and now I want to make some changes remotely (will not more frequently) in advertising data so I was seeking help to switch the same BLE (Broadcaster/Observer) Eddystone TLM programmatically into
normal iBeacon(Profile as per PSOC) so that I can write some data into its data characteristics and used it again for BLE (Broadcaster/Observer) Eddystone TLM and vise versa.
I am using the CYBLE-0220001-00 module. It has only one BLE. On every boot I want BLE to work as (Profile) iBeacon for 1st 1 minute or after any trigger and then that should automatically change to (Broadcaster/Observer) Eddystone beacon.
I have tried a lot but I am not understanding which function can help me to do the same. Please help I am a beginner in Cypress.
Thanks in advance.
Regards,
Neeraj
Show LessCY8C4247LQ* should be CY8C4247LQI. The real problem is that it requires 5v to program and run and I think maybe it's because it's not properly recognizing the device.
The device name is wrong and I think it might be causing other anomalous problems, such as only programming and running with 5v, instead of the 3.3v required by the chip.
I tried updating the firmware of the MiniProg4 that I'm using to connect, but have not solved the problem.
MiniProg4. CMSIS-DAP Version 2.0.0. Firmware Version 1.01.158. Hardware Id 05.
If I try to program using PSoC Programmer at 3.3v I get:
Program Finished at 9:38:56 AM |
| FAILED! EraseAll operation failed!
Device set to CY8C4247LQI-BL483 at 9:38:56 AM | 131072 FLASH bytes
Device Family set to CY8C4xxx-BLE at 9:38:56 AM |
| Automatically Detected Device: CY8C4247LQI-BL483
| Silicon: 0E34, Family: 9E, Major/Minor Rev: AI
The device name looks correct there, but when I try to program with PSoC Creator I get:
We are having some on-going issues with the reliability of Peripheral discovery when we are running multiple units simultaneously.
In some of our applications, there are up to 18 devices that are advertising, and on first power up, it can take anywhere from a few seconds to 5 minutes or more for all of the devices to be discoverable. I am monitoring the "discoverability" of the Peripherals using multiple approaches to confirm its an issue with the Peripherals (our custom App, our custom Central device, the CySmart App and the LightBlue App). In all circumstances, I am seeing a similar issue with the speed at which all of the devices become visible during a scan.
I am monitoring the status of one of these devices by sending repeated calls to CyBle_GetState() and sending the result out via the UART, and I can see that the Peripherals are thinking they are in the CYBLE_STATE_ADVERTISING state, yet still remain invisible when I'm searching for them via any of my methods.
I have the Peripherals set up with:
- Fast advertising - 20msec interval with 10sec timeout (have tried many different variants of this, without any real change to the result)
- Slow advertising interval 1000 - 10240 msec
- Every time I detect a Fast advertising timeout (via CYBLE_EVT_TIMEOUT) I make a call to CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST) to get things going again, so it shouldn't really be spending much, if any, time in Slow Advertising
- Every time I detect CYBLE_EVT_STACK_ON, CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP (with CyBle_GetState() == CYBLE_STATE_DISCONNECTED) or CYBLE_EVT_GAP_DEVICE_DISCONNECTED I'll also make a call to CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST) to get things going again
- In my main loop, I call CyBle_ProcessEvents() about every 10msec, although I have toyed around with this (have done it considerably faster - sub-millisecond frequency) without any change in performance.
Some times all my devices appear almost simultaneously, and briefly after the inital power on code has completed. Other times I'll get multiple units that just won't be discoverable for several minutes or more.
Anyone got any ideas on what I can do to resolve this issue? Or give me some pointers on where to go looking?
Cheers,
Mike
Show LessHi,
I have aqcuired a project from a former employee that was in the final stages of development. I have the first production run of the final product and I am trying to program them.
I cannot get the PSoC processor to be recognized by the programmer. PSoC part CY8C4246AZI-L433 - verified by visual inspection of part on board
VDDA, VDDD is 5.0V
VSSA, VSSD (2) to ground
VCCD to 1uF cap to ground
VDDIO is 5.0V
There is a 10 pin header on the pcboard for programming.
pin 1 - +5v, verified with DMM and also in the programmer.
Pin 3,5,7,9 - gnd
pin 2 to pin P3[2] on chip, verified with ohm meter
pin 4 to P3[3] on chip, verified with ohm meter
pin 6,8 NC
pin 10 to pin36 (XRES) on chip with 0.1uF to gnd
I have also tried to program using creator with the same results
I have checked the connections between the PSoC and programmer header
I think the programming protocol is correct
The correct connection option is selected.
What am I missing?
Show LessHi.
My customer use CapSense.
Customers are concerned about flat spots as they tune.
Why do flat spots occur in CapSesnse?
I understand it can be solved by using PRS as the clock source.
Is there a case where PRS cannot be selected?
Best Regards.
Show LessHello again everyone,
I am writing a network of microcontrollers that connect via CAN. These microcontrollers will be deployed on a system somewhere very very far from me and it would be costly to move back and forth for firmware maintenance. As a remedy I've decided to figure out a way to remotely flash them.
I've come across the Bootloader and bootloadable projects. I've tried them on a pre-fabbed board we have from psoc with a c78c414azi-s433 semi conductor. I was able to use these two projects. Mainly, the bootloader just programs the the microcontroller with the bootloader host instead of using the PSOC programmer, and bootloadable is the project that I wanna "bootload" or program the device with. My question is, how can this be implemented across 2 microcontrollers? Do both of them have to have the bootloader application on them, and the host has the bootloadable application and programs the other one?
I'm doing the work with I2C for now since it is done for me. But later on, i will have to implement this over CAN as this is how my microcontrollers are connected and I understand that the bootloader supports a custom communication component which I hope to implement CAN on. I understand i have to implement 5 functions to do this via the custom component but if you have any additional info on this would be greatly appreciated . If I can get this to work hopefully i'll give to PSoC so there can be an additional premade interface that uses CAN instead of I2C or SPI.
Thanks!
Show LessI want connect an external clock (16 MHz) to a TCPWM for better accuracy. But I can't get it right.
I connected the external clock to Pin [0.6] and mapped it in the "configure system clock" - window to EXTCLK.
In the same window I routed the EXTCLK to "Routed2" and was then able to configure the clock-component in the TopDesign to the existing clock "Routed2".
I get the error:
Pin guidance unavailable: Invalid connection for clock input "\IVC_S1_Timer:cy_m0s8_tcpwm_1\:clock" driven from "ClockBlock:dsi_in_1". The component requires a clock from the clock block.
I tried also another pin and configured and routed it as "DigitalSignal" with the same result.
Is there somewhere a tutorial on how to use an external clock with PSoC 4?
What is a "clock from the clock block"?
Thanks
Thomas
Hi All,
This question is related to my original programming clarification case #00562834.
To summarize the case, I was having problems programming a 022001-00 module mounted on a board, but was able to program it with a MiniProg3 programmer. I had conference call with your staff, and in preparation for the call, I had switched to a much shorter cable (about an inch) instead of the original 18 inch cable I had been using. When I demonstrated the "problem" during the call, the module was acquired and successfully erased -- problem solved. Since the call, I have moved away from the project for several weeks, but have now returned to it.
So, using the erased module (and the same short cable), I am unable to set the CPU clock to 48 MHz to enable programming. Attempts to do so fail at pollsromstatus() immediately after WriteIO (CPUSS_SYSREQ, SROM_SYSREQ_BIT | SROM_CMD_SET_IMO_48MHz) at the bottom of Page 22 of CY8C4xxx, CYBLxxxx Programming Specifications, Document number 002-22325 Rev *E. pollsromstatus() returns 0x80000000 every time it is read for the entire timeout period of 1 second.
There is no mention in the programming document, but I believe there is a way to recover from this error because I was able to reprogram the module using the MiniProg3 without any issues. Having reprogrammed it, my firmware can now successfully acquire, set the IMO clock and read the CPU's ID. So my question is: how should firmware recover from getting this incorrect status value (0x80000000) back after (unsuccessfully) attempting to set IMO clock?
Thanks,
Scott
Show Less