Hello.
Attached project uses 2 PWM components.
PWM makes square wave, and this square wave is stopped or started by PWM_Timer interrupt.
Attached pptx file is waveform of this square wave.
Sometimes it takes some time for voltage level to reach GND when square wave is stopped.
Please confirm red circle of attached pptx file.
Q1)
Could you please let us know reason why this behavior occurs?
Does this behavior occur if PWM is stopped when voltage level is high?
Why doesn't voltage level go to GND immediately?
Q2)
Could you please let us know solution to this behavior?
I want to immediately set voltage level to GND regardless of timing that PWM_stop is called.
Best Regards.
Yutaka Matsubara
Show LessHello,
in my application, I have a lithium battery.
the system is powered when USB is pluging in and a specific IC charge the battery?
the IC charger has two differents set up: 1: limit the current at USB specifications (100 mA and 500mA after enumeration) and 2 :boost current more than 500mA (max 1800mA) when the USB cable is connect to a wall adapter.
I need to kown, when this two different stage happen
_ when enumeration is ok and USB port can send 500mA
_when the USB cable is connect to a wall adapter.
is there fonctions in the API of the USBFS component that can handle that.
Show LessWe have a product that uses the CYBLE-012011-00 with EZ-Serial 1.1.1 that is experiencing issues when sending data over CYSPP.
We are seeing an intermittent issue where it seems the module stops forwarding the data sent to it over UART while in CYSPP mode when connected to an Android Phone (OnePlus 7T Android 10). Usually, the first 2 or 3 packets sent over UART after sent over BLE but after that, there are no more packets. The module is not completely non-responsive, when the phone doesn't respond to the CYPSS packets, we enter API mode to disconnect which works and then we reenter CYSPP mode awaiting connections. Following connection attempts from the phone do not work either. I have verified that we are sending the same data over UART for the working and failing cases.
I have captured Wireshark logs a successful connection attempt and failing attempt and nothing stood out to me, an example of both is attached taken using the nRF sniffer firmware. See attached images (couldn't attach pcapng)
We do not see this issue when an nRF product connects to our Cypress module. Sometimes after the nRF product has connected, sent data and disconnected, the following phone connection works.
Is this issue related to 274727 mentioned here?
We are in the process of testing this on other Phones.
Show LessHello
in my application the charger IC always feed the system and "disconnect" the battery when the charging process is finish.( ofr keeping a long life battery with less cycle)
So for my understanding, when a USB cable is plug into my device, my system is ALWAY bus powered.
Do I have to set my USB device as a self powered device, and just after the configured state, change into bus powered device ? or directly as a bus powere device ?
What about the hardawe configuration ? do i need external resistance for pull up or I just use the internal pull up resistance on D- and d+
Show Less
Hi,
What happens to PSoC4 if RS-232 serial cable is unplugged during a bootlodable update by the bootloader via UART? Does the bootloader keep waiting for the next UART reception?
Since it's only halfway written to Flash, it may lead to corruption of the bootlodable. But if PSoC4 is reset and the Host System sends the bootloadable image again, I think it's possible to update the bootloadable.
Best regards
Show LessHello,
We know that the "CE210291 - PSoC® 4 CapSense® Low-Power One Button" project transitions between Deep Sleep and Active mode to achieve CapSense with low power consumption. When the Deep Sleep current is measured using CY8CKIT-041-40XX with the power supply voltage set to + 3.3V, it is several μA.
On the other hand, when the Deep Sleep current is measured with the power supply voltage set to + 5 V and the VREF set to 2.021 V, approximately 350 μA is consumed.
Do we need to put VREF to sleep before executing CySysPmDeepSleep ()?
If the power supply voltage is + 5V and the Vref is 2.473V, the Deep Sleep current will be several μA.
We would like to adjust the gain of raw count value with Vref.
Best regards.
Yocchi
Show Less
Dear community,
i have a workspace containing 3 projects which are the Launcher, BLE OTA Update and Firmware. All projects with exception the launcher using BLE Component and ADC. I use the ADC to measure the battery voltage to use this value in the advertisement of 2 different projects. I would kindly like to know how i can implement my advertising-code in a separate project by using the BLE component and ADC? I would appreciate to edit this "library" code at any time. So dealing with binaries and copy them seems not a good option to me.
Thank you very much for information to solve this.
Daniel
Show LessHello,
I have a PSOC 4 MCU with BLE 4.1
I would like to understand if there is a way to verify a write response was actually sent to a write request?
Today, I use this API function provided by cypress:
CyBle_GattsWriteRsp(cyBle_connHandle)
The function is said to return the following options:
* \return
* CYBLE_API_RESULT_T : Return value indicates if the function succeeded or
* failed. Following are the possible error codes.
*
* Errors codes | Description
* ------------ | -----------
* CYBLE_ERROR_OK | On successful operation
* CYBLE_ERROR_INVALID_PARAMETER | 'connHandle' value does not represent any existing entry in the Stack
* CYBLE_ERROR_INVALID_OPERATION | This operation is not permitted
* CYBLE_ERROR_MEMORY_ALLOCATION_FAILED | Memory allocation failed
So even if I get CYBLE_ERROR_OK returned, it doesn't necessarily mean that the response was sent yet. I understand that it just means that the request to send a response has been received successfully by the stack and it will now take care of it asynchronously. This is a problem for us because we need to reset the MCU immediately after receiving a specific write request. But we need to send a response before the reset, otherwise, it will cause a problem in the device that had sent the write request.
So we need to be able to know that the response has actually been sent. How can we know this?
Thanks,
Eyal
Show LessI have a large project which I am trying to add a new characteristic to an existing service. I am using the CY8C4248LQI-BL583 chip and I can't seem to get the BLE APIs to properly generate. I keep getting an error when referencing the characteristic's handle. Note that this project is configured for OTA updates so I have a bootloader and a bootloadable projects.
Steps taken so far:
1. Go to the bootloader project, open the BLE 4.2 component, navigate to profiles, and add my new "custom glows" characteristic under the LED service. I set the read / write properties and the UUID of the characteristic.
2. I delete the automatically generated custom descriptor and add a CCCD, as instructed by the documentation.
3. Click OK, then clean / build the bootloader project.
4. I clean / build the bootloadable project.
5. I navigate to my bleCallback.c file in the bootloadable project and try to reference the newly added characteristic handle (as such: CYBLE_LEDS_GLOWS_CONTROL_CHAR_HANDLE) and it throws an error that I'm using an undeclared identifier.
The strange thing is if I navigate to the CyBle_custom.h file in the bootloader project, I see my CYBLE_LEDS_CUSTOM_GLOWS_CHAR_HANDLE value defined. I just can't reference it in my bootloadable project.
Also, my newly defined characteristic handle does not show up in the cyapicallbacks.h file of my bootloadable project. But, this file does contain all of the handles for my previously defined custom characteristics.
Does anyone have any thoughts as to what I'm doing wrong here?
I should note that I have recently migrated from a CY8C4148LQI-BL453 to the CY8C4248LQI-BL583 I'm using currently. This is my first time manipulating the BLE stack on this new MCU.
Show LessHi All,
I tried to implement I2C communication between Cy8C4025AZI-S412( Slave ) and Pic Microcontroller(Master). The speed is 100kbps and used polling method. When button not pressed then it will sent 0xFF. The polling time is 100msec by PIC controller.
The issue is,
1) Sometimes acknowledge not given by Slave.(need to sent data 3 to 4 times or delay of 30ms then it gives ack ).
I used one example code to develop I2C.
My code is below,
#include <project.h>
/* Macro Declaration */
#define BUFFER_SIZE (1u)
#define PACKET_SIZE (BUFFER_SIZE)
/* The I2C Slave read and write buffers */
uint8 i2cReadBuffer [BUFFER_SIZE] = {0};
uint8 i2cWriteBuffer[BUFFER_SIZE]= {0};
uint8_t flag1=0;
uint8_t flag3=0;
void Received_Data_From_Master1();
int main()
{
/* Eneble Global Interrupt */
CyGlobalIntEnable;
CapSense_Start();
CapSense_ScanAllWidgets();
/* Start the I2C Slave And I2C Address Setting*/
I2CS_I2CSlaveInitReadBuf(i2cReadBuffer, BUFFER_SIZE);
I2CS_I2CSlaveInitWriteBuf(i2cWriteBuffer, BUFFER_SIZE);
I2CS_I2CSlaveSetAddress(0x08);
I2CS_Start();
for (;;)
{
CyDelay(2);
/* With Respect to Master i.e Checked Whether the Master Write Complted Or Not */
if (0u != (I2CS_I2CSlaveStatus() & I2CS_I2C_SSTAT_WR_CMPLT))
{
/* Calling Function to Collect The Data From Master */
Received_Data_From_Master1();
/* Enable this above function when we used the data On Switch Function */
/* Clear the slave write buffer and status */
I2CS_I2CSlaveClearWriteBuf();
(void) I2CS_I2CSlaveClearWriteStatus();
}
if(CapSense_NOT_BUSY == CapSense_IsBusy())
{
/* API For Capsense Update Scanning And Process */
CapSense_ProcessAllWidgets(); /* Process all widgets */
CapSense_RunTuner(); /* To sync with Tuner application */
/* Checked whether Left Button Active or Not*/
if((flag3==0)&&(CapSense_IsWidgetActive(CapSense_BUTTON2_WDGT_ID)) )
{
flag3=1; /* Reseting Left Button Flag */
i2cReadBuffer[0] = 0x01;
while (I2CS_I2C_SSTAT_RD_CMPLT!=(I2CS_I2CSlaveStatus()));
/* Clear the slave read buffer and status */
I2CS_I2CSlaveClearReadBuf();
(void) I2CS_I2CSlaveClearReadStatus();
i2cReadBuffer[0] = 0xFF;
}
else if((flag3==1) && (!(CapSense_IsWidgetActive(CapSense_BUTTON2_WDGT_ID))))
{
flag3=0; /* Setting Left Button Flag */
i2cReadBuffer[0] = 0xFF;
}
/* Checking Right Button active or not */
if((flag1==0)&&(CapSense_IsWidgetActive(CapSense_BUTTON0_WDGT_ID)))
{
flag1=1; /* Reseting the flag*/
i2cReadBuffer[0] = 0x06;
while (I2CS_I2C_SSTAT_RD_CMPLT!=(I2CS_I2CSlaveStatus()));
/* Clear the slave read buffer and status */
I2CS_I2CSlaveClearReadBuf();
( void) I2CS_I2CSlaveClearReadStatus();
i2cReadBuffer[0] = 0xFF;
}
else if((flag1==1)&& (!(CapSense_IsWidgetActive(CapSense_BUTTON0_WDGT_ID))))
{
flag1=0;
}
}
}
}
void Received_Data_From_Master1()
{
switch(i2cWriteBuffer[0])
{
/* After Receiving 00 touch will be Ready to Work */
case 0x00:
i2cReadBuffer[0] = 0x19; /*According to New Document Wants to transmit new data acknowledgement */
POWER_LED_Write(0);
break;
}
}
Any Help will be highly appreciated .
Thanks & Regards,
AsDh
Show Less
Expert II
Esteemed Contributor
Employee
Honored Contributor II
Employee
Employee
Honored Contributor II
Employee