CY8CPROTO-063-BLE Bluetooth example - CapSense doesn't work

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Bartek
Level 3
Level 3
10 replies posted 10 sign-ins 5 replies posted

Hello,

I try to run Bluetooth mouse example on CY8CPROTO-063-BLE, after change device by device selector in project, bluetooth works fine. I try to add capsense button using capsense example - it look that capsense doesn't work at all, nothing change in tuner as well as in program also it doesn't give any reaction on touch.

When I create new project and add capsense it works fine ( only difference I found is clock that for bluetooth example is 50Mhz and for Cap sense is 100MHz ( it defines maximum modulator frequency for 50Mhz is 25000KHz and for 100Mhz is 50000kHz)

Code I add to Bluetooth mouse hid example:

......

__enable_irq(); /* Enable global interrupts. */
EZI2C_Start(); /* Start EZI2C Component */
/*
* Set up communication and initialize data buffer to CapSense data structure
* to use Tuner application
*/
EZI2C_SetBuffer1((uint8_t *)&CapSense_dsRam,
sizeof(CapSense_dsRam),
sizeof(CapSense_dsRam));
CapSense_Start(); /* Initialize Component */
CapSense_ScanAllWidgets(); /* Scan all widgets */

/***************************************************************************
* Main polling loop
***************************************************************************/
while(1)
{

/* Do this only when a scan is done */
if(CapSense_NOT_BUSY == CapSense_IsBusy())
{
CapSense_ProcessAllWidgets(); /* Process all widgets */
CapSense_RunTuner(); /* To sync with Tuner application */
if (CapSense_IsAnyWidgetActive()) /* Scan result verification */
{
     Cy_GPIO_Write(Advertising_LED_0_PORT, Advertising_LED_0_NUM, 1);
     /* add custom tasks to execute when touch detected */
}
else
{
     Cy_GPIO_Write(Advertising_LED_0_PORT, Advertising_LED_0_NUM, 0);
}
CapSense_ScanAllWidgets(); /* Start next scan */

}

.......

 

I will be very thankful for any suggestions 

0 Likes
5 Replies
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi @Bartek 

 

This looks like a tuning issue. Can you share the tuner waveform that you are observing in both the conditions- ModClk = 25MHz and 50MHz?

 

The parameters to look for would be the IDAC code. The IDAC code must be in the range of 20 to 90 for smooth operation. 

You can also check if sense clock frequency is getting modified as this would also affect the tuning.

 

Best regards, 
Hari

0 Likes
Bartek
Level 3
Level 3
10 replies posted 10 sign-ins 5 replies posted

I will check waveform for 50MHz. for 25Mhz In tuner I get nothing unfoutunately. 

I try to set 25MHz in project with only capsense that works , and check if it will still working 

0 Likes
Bartek
Level 3
Level 3
10 replies posted 10 sign-ins 5 replies posted

The  most strange thing is that for 25MHz clock in bluetooth example I get nothin not even any noise 

0 Likes
Bartek
Level 3
Level 3
10 replies posted 10 sign-ins 5 replies posted

It doesn't work. I don know why at all. Maybe someone try to add capsens to bluetooth mouse hid example for CYBLE-416045-02 and gives any idea what could be wrong.

0 Likes
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi @Bartek 

 

This seems like a tuning issue. Can you check the IDAC code that you are getting in tuner?

 

Best regards, 
Hari

0 Likes