PSoC™ 4 Forum Discussions
Hi, relating to the trackpad and pads dimensions, how should I change the Maximum x-axis and y-axis positions?
In the CapSense_CSD_P4_Trackpad_Gesture code example values of 395 and 395 are used, what is the choice based on?
I'm building a trackpad which is much smaller then traditional pc trackpads, its is 5 col, 6 rows, but I could also do 5x5.
In the first case should I have different values of x and y?
If the dimensions of the trackpad are lower and the relative dimension of the finger is higher should I increase the 2 parameters?
For example if my trackpad is 1/2 - 1/3 of a traditional trackpad dimension, should I increase the values from 395 to 800-1200 or decrease them by a 2 factor to 200 ??
I'm currently scanning at 16 bits resolution, 12000 Hz with a CyBle 214015-01
Thank you for the advices
Show LessHi,
I'm using CapSense Tuner to see 16 sensors on the graph view. However, I can't see the exact value of the sensor signal in the graph. It shows a value around 50,000 (16 sensors all connected with cables cause a lot of interference). Is there a way to scale the graph?
Thanks.
Show Less
On CY8CMBR3116-LQXIT is the pull-up on HI/BUZ/GPO7 mandatory ?
When HI/BUZ/GPO7 is used as inetrrupt (Active LOW) is a Floating output when HIGH ?
Or the pull-up is to avoid false triggering when powering up the device ?
Show LessGood Evening:
I am trying to use the SysTick timer which is part of the cortex M0 family. I spent some time learning how to use the registers that are part of the SysTick timer structure.
I am attaching the simple code that I am using to try and generate a 10ms ON/OFF cycle on the GPIO pin that I can capture using the Saleae Logic analyzer. According to ARM documents I should be able to take the SysClk frequency and compute a "period" for the pulse.
My SysClk is current set at 48Mhz, so a 10ms waveform can be determined by:
Reload = (10ms / Clock Period) - 1;
Reload = .01 * 48 X 10^6 - 1 ==> 479999 ticks
If I program in this value into the SysTick->LOAD register, use the fast GPIO toggle and capture the output, I am getting a pulse that is well under the expect value.
for(;;)
{
SysTick->LOAD = 479999;
SysTick->VAL = 0;
SysTick->CTRL = SysTick_CTRL_ENABLE_Msk | SysTick_CTRL_CLKSOURCE_Msk;
while(!(SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk));
SysTick->CTRL = 0;
Pin_1_DR |= Pin_1_MASK; // direct register write this takes 500 nanoseconds
// there is a second block with the same parameters
Pin_1_DR &= ~Pin_1_MASK; // direct register write
}
The digital waveform capture is below.
Help would be appreciated in solving this problem.
I would like to know if I can accurately use the SysTick for microsecond times.
Thank you.
Show LessHi,
I currently have CY8CKIT-046 and trying example codes that I found on the Internet. In TopDesign section, I added a second button which has exactly same Widget Details as the first. Also ports are configured and main.c file has been edited just like the first button that is in the example code. I built the code and programmed. In CapSense Tuner, device is connected and everything looks OK. But when I try to press the buttons, one of them isn't working at all. Example code works by itself.
What should I do?
Thanks.
P.S: The attached file below is the example code.
Show LessHello,
We would like to know about SW_Tx_UART baud rate tolerance.
In case of UART(SCB mode) default oversamping(12) for IMO 24MHz, the tolerance from 115200bps is from 0.08% to 4.17%.
We hope it between about +/-2%.
So, we should set oversampling value to 16.
In case of SW_TX_UART for IMO 24MHz, what about this case?
Best regards,
Yocchi
Show LessHello.
Our customer is evaluating CY8C4247LTI-L475.
They have questions about software reset.
Please confirm and answer below questions.
Q1)
They used Reset() of Cm0Start.c in order to execute software reset.
But PSoC is frozen after it.
Is API for software reset “Reset()”?
Or should they use other API?
Should they use “CySoftwareReset” if they want to execute software reset?
(“Reset()” is not used at software reset.)
Is “Reset()” a reset command for interrupt? And should “Reset()” be used at bootloader?
(“Reset()” is used at bootloader.)
Q2)
Are there any restrictions and procedure when executing software reset?
Q3)
Is it OK to execute software reset during I2C communication?
Or are there any problems?
For example, PSoC or other I2C devices on same I2C line will hang up at restart if there is a reset before stop condition(so SDA may be locked at low level due to it), software reset is not execute correctly, etc.
Should software reset is executed after I2C communication is complete if there are any problems?
Best Regards.
Yutaka Matsubara
Show LessI'm trying to use the code example CapSense_Csd_P4_Trackpad_Gestures on a CYBLE_214015_01 (psoc 4 ble), but I keep getting a driver error when connecting it to a Windows 10 pc, after a first connection is accomplished.
I read that the code would work better with Windows 8, is there a way to have it rwork on windows 10 or do I need to modify or write any drivers?
Thank you
Show LessHello all,
My code sends a command to a cyble-214015-1 writing a characteristic and then waits for a notification on the same char
mtu is 70 bytes and notify is 3 bytes: 32 2E 9B
Sometimes it works but sometimes it fails: after a timeout of 5 s I pause psoc creator 4.2 and I find this:
The timeout happens on my pc because the command is not syncronized with events, but I receive EVT_CONNECTION_TERMINATED_NOTIFICATION from cy5677, that is CYBLE_EVT_GAP_DEVICE_DISCONNECTED.
The device seems stucked
The function that sends the notification is:
void BLE_notify(uint16_t h, void * v, uint16_t lenght)
{
if (connesso) {
CYBLE_GATTS_HANDLE_VALUE_NTF_T hvntf = {
.attrHandle = h
} ;
uint8_t * dati = (uint8_t *) v ;
while (lenght) {
if (CYBLE_STACK_STATE_BUSY == CyBle_GattGetBusyStatus()) {
CyBle_ProcessEvents() ;
continue ;
}
uint16_t dim = lenght ;
if (dim > mtu-3)
dim = mtu-3 ;
hvntf.value.len = dim ;
hvntf.value.val = dati ;
CYBLE_API_RESULT_T ris = CyBle_GattsNotification(cyBle_connHandle, &hvntf) ;
CyBle_ProcessEvents() ;
switch (ris) {
case CYBLE_ERROR_OK:
DBG_PRINT_HEX("notif ", dati, dim) ;
lenght -= dim ;
dati += dim ;
break ;
case CYBLE_ERROR_MEMORY_ALLOCATION_FAILED:
// Bisogna aspettare che lo stack spedisca i dati
CyBle_ProcessEvents() ;
break ;
default:
// ??? esco
DBG_PRINTF("ERR %s %d ris = 0x%04X\n", __FILE__, __LINE__, ris) ;
lenght = 0 ;
break ;
case CYBLE_ERROR_INVALID_PARAMETER:
// notifiche disabilitate
DBG_ERR ;
lenght = 0 ;
break ;
case CYBLE_ERROR_INVALID_OPERATION:
// Riprovo
DBG_ERR ;
CyBle_ProcessEvents() ;
break ;
}
}
}
else {
DBG_ERR ;
}
}
What am I doing wrong?
Show Less