PSoC™ 4 Forum Discussions
I'm working with the CYBLE Pioneer Kit. I'm trying to switch between two different connection intervals. The purpose is to change modes, between high throughput and low power modes.
Mode 1 is fast and responsive, at the expense of battery power.
Mode 2 is the low power mode. It is too slow for user-interface activity, but it's just enough to keep the connection alive.
In the final product, the device will idle in Mode 2 for low power. When the user pushes a button, it will switch to Mode 1 for a while, and then revert to low power mode after a timeout.
To test this, I modified the code example Day019_Connection_Parameters, so there are two sets of connection parameters:
CYBLE_GAP_CONN_UPDATE_PARAM_T connectionParameters_1 =
{
12, /* Minimum connection interval - 12 x 1.25 = 15 ms */
24, /* Maximum connection interval - 24 x 1.25 = 30 ms */
0, /* Slave latency - 1 */
500 /* Supervision timeout - 500 x 10 = 5000 ms */
};
CYBLE_GAP_CONN_UPDATE_PARAM_T connectionParameters_2 =
{
160, /* Minimum connection interval - 160 x 1.25 = 200 ms */
160, /* Maximum connection interval - 160 x 1.25 = 200 ms */
29, /* Slave latency - 1 */
1800 /* Supervision timeout - 1800 x 10 = 18000 ms */
};
To toggle between them, I just test one of the LEDs that toggle when the user button on the Pioneer Kit is pushed:
if (Led_Green_Read() == 1)
CyBle_L2capLeConnectionParamUpdateRequest(cyBle_connHandle.bdHandle, &connectionParameters_1);
else
CyBle_L2capLeConnectionParamUpdateRequest(cyBle_connHandle.bdHandle, &connectionParameters_2);
The behaviour is almost exactly as expected, toggling between the two modes whenever the user button is pressed. When the device is in Mode 1 (fast mode) and the button is pressed, Mode 2 activates within a few seconds.
However, to go back to Mode 1, there is a very long lag time (between 30-60 seconds). This is what I would like to understand.
The peripheral (the CYBLE) is acting quickly. However, the central (CySmart) is very slow to respond. This is shown by the two BLE stack events:
- CYBLE_EVT_L2CAP_CONN_PARAM_UPDATE_RSP shows that CySmart receives and accepts the request very quickly in each case. Then (I presume) CySmart must process the request and modify the central's BLE connection settings. When this is complete, it announces the next stack event, which (eventually) arrives at the peripheral as:
- CYBLE_EVT_GAPC_CONNECTION_UPDATE_COMPLETE.
The long delay occurs between these two stack events. In Windows CySmart, this delay varies between 45-60 seconds. Android CySmart is a little better, at about 30 seconds.
Questions:
- Is this delay something peculiar to CySmart, or is this expected from all BLE devices and apps?
- Why does it vary across BLE platforms (Android, iOS, Windows)?
- Is there a programming trick that would allow the central device to process the Connection Parameter Update Request more quickly?
Thanks for your collective knowledge.
Show Less
Ever see and ADC input that changes if it's watched?
I have an ADC battery monitor that works as expected, ONLY IF you touch it ONE time after startup with anything, like a scope probe or even tweezers. Unless you do this, it reads a very high, impossible high value, as if the VSS is -3.3V.
I realize there is a pin usage error that might cause this, and even though I will probably change it, I just want to understand why it works this way. The error is that Pin 5.1 is OVT tolerant, but P1.6 is not. Even if P1.6 is left low it acts this way, so perhaps when the device is off, the pin protection is latching.
If there is a software fix for this I would be interested in knowing, just because I despise ghosts in the machine.
Thanks.
int32_t MeasD=0;
int32_t retval=0;
VBAT_ADC_Start();
CyDelay(1);
VBAT_ADC_StartConvert();
VBAT_ADC_IsEndConversion(VBAT_ADC_WAIT_FOR_RESULT);
MeasD=(int32_t) VBAT_ADC_GetResult16(0); // Channel
VBAT_ADC_Stop();
Show Less
Hello, I'm using PSoC Creator with a PSoc 4 M-Series Pioneer Kit. I'm trying to run the Deep-sleep Blink example but I am unable to connect to the target. I don't see any target when I select debug target. Is this kit too old for version 4.4?
Thank you
Show Lesswhen we try lock the debug port. We found that the chip can not be changed to Kill mode from Open mode. the error is shown as attached file.
‘Transition ‘protection OPEN’ – ‘protection KILL’ is not supported’
But when we change it to protected mode from open mode. it was successfully changed. Is there other setting for kill mode?
Show LessI am currently on the lookout for an experienced firmware developer with a strong background in PSoC development, preferably based in the US. The project involves optimizing existing firmware for a sports technology device to enhance battery life and improve Bluetooth connectivity.
Requirements:
- Proficient in C programming within an embedded systems environment.
- Extensive experience with PSoC, including familiarity with PSoC Creator or PSoC Designer.
- Knowledgeable in power management and Bluetooth Low Energy (BLE) technologies.
- Able to provide comprehensive documentation and testing for firmware modifications.
This is an exciting opportunity to contribute to a project that blends technology with sports performance. If you are interested or know someone who might be the right fit, please reach out to me here on the forum or send a private message.
Thank you!
Show LessHello,
I just want to get started with writing simple code for a custom board with theCY8C4148AZI-S553, I downloaded the modustoolbox and the EclispeIDE for modustoolbox but when you create a project and try to select the MCU there is only the option to select kits and the closest kit is CY8CKIT-041S-MAX which uses CY8C4149AZI MCU. Is there another IDE that I can use or a way to use this one to write code for the MCU directly
Show Lesssmartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/PSoC-4/CY8C4014LQI-421%E7%BC%96%E7%A8%8B%E8%B0%83%E8%AF%95%E8%BF%9E%E6%8E%A5%E5%A4%B1%E8%B4%A5%E7%9A%84%E5%8E%9F%E5%9B%A0-%E6%80%8E%E4%B9%88%E8%A7%A3%E5%86%B3/td-p/735447
Show LessHello,
The Bootloader is defined as Dual-Application.
I want to upgrade the image applications through UART and cyflash.
Upgrading of the Application1 (the valid and active) is failed with the message from cyflash:
The application is currently marked as active or golden image
Can you please advise what should I perform to upgrade the Applications in Dual-Application configuration through cyflash?
I use the product CY8C4247AZI-M485.
Thanks in advance.
Yacob.
Show Less
Using miniprog4 is the burning of the program. We are using the cy8c4146lde model, and the miniprog4 burning tool is used in conjunction with openocd (the brush writing tool included in cypress programmer 4.2) to write. The following error message appears, and we don't know how to solve it?
Thanks!
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/PSoC-4/CY8C4146LQE-Debug-issue/td-p/498261
Show LessHi, Community,
I want to use the LIN component on CY8C4147(PSoC4100S Plus).
I have tried to implement a LIN component in my project but failed due to errors related to UDB.
Unfortunately, the PSoC4100S Plus does not have UDB. So it makes sense that these errors would occur.
However, is there any way to use LIN communication with this device?
These are errors shown in my project.
[Error#1] Pin guidance unavailable: Resource limit: Maximum number of Macrocells exceeded (max=0, needed=1).
[Error#2] Resource limit: Maximum number of Macrocells exceeded (max=0, needed=1).
Best Regards,
Chihiro Tatebayashi / NEXTY