PSoC™ 4 Forum Discussions
hi, Im music developer try to create new instrument basic on Eastern instrument ,i start my prototype with Arduino board .
I want to change for Infineon microprocessor ,I need same touchkeys function in this link .
- different dimensions keys board
- Bluetooth MIDI/OSC transmit messages controller
- 156 touch switch
- 26 touch keys with full midi/osc controller function
-OLED display
((My main question is which microprocessor i need to start with .))
Show Less
Hello
My application calls the below function during a connection. It is configured as a peripheral. The connection interval is 100ms min/max with no 0 for slave latency. I'm reading a voltage from a sensor, sending it into an onboard opamp and then reading the output via the ADC. The problem is an inaccurate adc result. The reading I get is slightly higher by a few counts and sometimes toggles. If I don't call the function, the reading is accurate with no toggling.
I feel that placing the device into deepsleep between events is the issue but I don't know how to solve it. I've read the low power application note but I'm confused about what deepsleep does behind the scene. Do the GPIOs retain their states? Are the analog peripherals altered in any way? Is VREF affected?
thanks for your assistance.
void ManageLowPower(void)
{
CYBLE_LP_MODE_T bleMode;
uint8 interruptStatus;
if((CyBle_GetState() == CYBLE_STATE_ADVERTISING) ||
(CyBle_GetState() == CYBLE_STATE_CONNECTED))
{
/* Request BLE subsystem to enter into Deep-Sleep mode between connection and advertising intervals */
bleMode = CyBle_EnterLPM(CYBLE_BLESS_DEEPSLEEP);
/* Disable global interrupts */
interruptStatus = CyEnterCriticalSection();
/* When BLE subsystem has been put into Deep-Sleep mode */
if(bleMode == CYBLE_BLESS_DEEPSLEEP)
{
/* And it is still there or ECO is on */
if((CyBle_GetBleSsState() == CYBLE_BLESS_STATE_ECO_ON) ||
(CyBle_GetBleSsState() == CYBLE_BLESS_STATE_DEEPSLEEP))
{
/* Put the CPU into the Deep-Sleep mode */
CySysPmDeepSleep();
}
}
else /* When BLE subsystem has been put into Sleep mode or is active */
{
/* And hardware doesn't finish Tx/Rx opeation - put the CPU into Sleep mode */
if(CyBle_GetBleSsState() != CYBLE_BLESS_STATE_EVENT_CLOSE)
{
CySysPmSleep();
}
}
/* Enable global interrupt */
CyExitCriticalSection(interruptStatus);
}
}
Show Less
I'm using PSoC Creator 4.4 with a 4200 M0 processor. When debugging and stepping through the assembly code, the system freezes on attempting to execute a branch with link to a label instruction: "bl label" The label is valid and runs correctly in other situations. Creator freezes and there is no other information at that point.
When I halt the processor, I get the error message:
"The run request failed. Encountered error (This INTERRUPT operation is not valid while the state is Paused.)"
"The request to run the application on the target failed. Make sure that your code is valid and that the selected target supports debugging."
I would greatly appreciate any suggestions on how to find the cause of this. Thanks very much.
Frank
Show LessHi,
I am doing a research project using CY8CKIT-042 PSoC4 Pioneer Kit (CY8C4245AXI-483). The prototype device is powered from a battery of 40mAh capacity. After the normal mode operation when I power OFF the device, the uC enters into deep sleep power saving mode. From the deep sleep mode when I connect charger for charging the battery or press the power ON key then uC exits from deep sleep mode and enters into normal mode.
However in an extreme case, the battery was weak while the time I powered OFF the device then in between the deep sleep operation state the battery was fully drained and there was no power source to the device and uC wad fully turned OFF.
After the above scenario, when I connect a power source to the device the expected behaviour is that the device should turn ON automatically due to the reset signal that appears on connecting the power source. However, in some scenario the device didn't turned ON and a re-flashing of the uC was required for turning ON and resuming the expected behaviour.
Can anyone suggest some root cause for this behaviour and what could the possible solution to avoid it?
Thanks in advance.
Show LessHellow World example code, is an output string using cy_scb_uart_putString ().
How do I change to printf?
Although retartget-io was found, it can only be used for PSOC6, POSC4 cannot be used.
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/PSoC-4/CY8CKIT-041S-MAX-%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8printf/td-p/648379
Show LessI'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
Hi 正如我标题所描述的,我们现在有客户要测试cy8c4025相关的capsense防水功能,但bsp中没有相关芯片选择。是否是需要新建一个empty app然后从其他 项目移植过来。
I tried coneccting CySmart 1.3.0.8 and CY8CKIT-042-BLE-A using default settings.
Then, too many peer devices were listed in master tab.
Could I delete peer devices from list when I push [start scan]?
and is there a way to display only Cypress(Infineon) devices on master tab?
Or Could I serch and sort devices with device name?
best regards
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/PSoC-4/CySmart-configuration/td-p/741035
Show LessHello together,
in the description of the HSIOM_AMUX_SPLIT_CTL-Registers I found that there seems to be a switch to connect the Bus to GND/VSSA. The switch is named SWITCH_AA_S0 (or BB for Bus B). In one of my application it would be helpful to use this switch to discharge the whole bus.
Is there any documentation how this switch works? I tried to activate it, but I didn't see any success.
Unfortunately I did not find any details in the TRM for PSoC4100PS. Also I can't find any details in the code or in the analog routing graphics.
Br,
Pascal
Show LessEver 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