PSoC™ 4 Forum Discussions
Hi all,
I am new for Psoc4 series, and trying to run some features. When I try to use capsense, the code doesn't work. And when I debug I see code stays in while loop when I call CapSense_Start() in "CapSense_Control.c" and the while loop is
while(CapSense_NOT_BUSY != CapSense_IsBusy()) {}
The board is a custom board, but it works properly with an already written code. If necessary I can upload project. What coud be the problem, any comment?
Thanks
Show LessHello everyone.
I am having an issue with the i2c functions when performing a read using the blocking functions. For some reason the first I2CMasterReadByte(0); is ignored and returns 0xE0.
Below is the code to read 3 bytes from the eeprom, but it actually only reads 2. First, the address that you want to read is sent, then the read operation begins. Attached is an image from the logic analyzer.
i2c_error = I2C_Master_I2CMasterSendStart(0b1010000,0);
I2C_Master_I2CMasterWriteByte(0); // address high byte
I2C_Master_I2CMasterWriteByte(3); // address low byte
i2c_error = I2C_Master_I2CMasterSendStop();
I2C_Master_I2CMasterSendStart(0b1010000,1);
byte0 = I2C_Master_I2CMasterReadByte(0);
byte1 = I2C_Master_I2CMasterReadByte(0);
byte2 = I2C_Master_I2CMasterReadByte(1);
i2c_error = I2C_Master_I2CMasterSendStop();
To actually read 3 bytes I have to add an extra I2CMasterReadByte(0), after the start function. Attached is also an image of the logic analyzer
i2c_error = I2C_Master_I2CMasterSendStart(0b1010000,0);
I2C_Master_I2CMasterWriteByte(0); // address high byte
I2C_Master_I2CMasterWriteByte(3); // address low byte
i2c_error = I2C_Master_I2CMasterSendStop();
I2C_Master_I2CMasterSendStart(0b1010000,1);
I2C_Master_I2CMasterReadByte(0);
byte0 = I2C_Master_I2CMasterReadByte(0);
byte1 = I2C_Master_I2CMasterReadByte(0);
byte2 = I2C_Master_I2CMasterReadByte(1);
i2c_error = I2C_Master_I2CMasterSendStop();
Does anyone know why this behavior is occurring?
Show LessHi,
I want to connect a electret microphone, using the Scan_ADC component of the Analog CoProcessor.
I wonder where to connect the VAGND input signal of the Scan_ADC component when filtering on channel 0 is used? The VREF component seems to only support VDDA. Do I have to make an external connection to GND by a dedicated pin?
Regards,
Ralf
On building a simple program with Creator V4.1 update 1, Microsoft Windows NT 6.1.7601 Service Pack 1 (windows 7) I get:
"Error: dbg.M0023: There was an error while programming the device: failed to reacquire the device"
In the past this has always ended up being a problem with the optimisation level chosen for the project. I have switched everything to "Debug" that I can, removed all optimisation and ensured that all the programmer firmware is up to date.
But the problem still arises.
I raised this as a technical query but the query was cancelled (and no email telling me so was ever recieved......)
Show Lesshow can we toggle an led in psoc by writing a single value in control registers and using logic gates? i don't want to toggle it through command
Show LessJust set up a PSOC 4000 project which comprises of 1 Timer, 1 I2C, 1 digital input pin (external terminal). Add in interrupt to the digital pin, click generate application and got the error:
E2809: Unable to find a valid placement for pins and fixed-function blocks. See the Digital Placement's Detailed placement messages section in the report file for details.
Doesn't PSOC 4000 support external signal as interrupt?
Please see atteched project file.
Show LessWe have a project that I've newly inherited using CapSense. The environment ranges to room temperature to extreme temperatures. After cooling back down to room temperatures we'll find that some of our button no longer respond to presses. Unplugging the unit and replugging it in will restore full funtionality.
From what I was reading, when using Auto(SmartSense) tuning method with Sensor Auto Reset should be resolving this for us but it isn't. I'm having trouble understanding how to proceed from here.
Show LessHello everyone,
I would like how to handle correcty the "busy state" of the ble stack.
I tried a basic test where the same data is send constantly with notification :
void SendDataOverStatesNotification(uint8 StatesData, uint8 len)
{
/* 'StatesnotificationHandle' stores States notification data parameters */
CYBLE_GATTS_HANDLE_VALUE_NTF_T StatesnotificationHandle;
/* If stack is not busy, then send the notification */
/* Update notification handle with CapSense slider data*/
StatesnotificationHandle.attrHandle = CYBLE_SHUTBASSCV_STATES_CHAR_HANDLE;
StatesnotificationHandle.value.val = &StatesData;
StatesnotificationHandle.value.len = len;
/* Wait until stack is free to send data*/
while(busyStatus != CYBLE_STACK_STATE_FREE) { CyBle_ProcessEvents(); }
/* Send the updated handle as part of attribute for notifications */
CyBle_GattsNotification(connectionHandle,&StatesnotificationHandle);
}
If i put a CyDelay(5); before this function this work fine (at least during 10 minutes).
Without the delay it's crashing after 5 sec.
I would like to have something which is not crashing no matter the connection interval.
How i can just wait the BLE stack properly without a delay ?
Should i use :
while(busyStatus != CYBLE_STACK_STATE_FREE) { CyBle_ProcessEvents(); }
or
if(busyStatus == CYBLE_STACK_STATE_FREE) {my function code}
I don't see why the stack is crashing if I wait unti it is not busy after each send..
Thanks for your answers
Show LessHello everyone,
We want to use Bluetooth for configuring and parameters a motorized door (with a phone APP)
It's for small quantities then a module like the CYBLE-012011-00 could fit perfectly well.
I have some questions about different features in BLE :
1) Addresses :
1.a)
For the Company-ID part :
Does we have to purchase a 24 bit Organization Unique Identifier (OUI) ?
Can we purchase IEEE address chips for this use ?
For the company assigned part : how to be sure of the uniqueness of the silicon-generated company-assigned part?
1.b) Does we have to use the public address ? From specifications i see that we could use random static address instead.
Here a topic about it : http://www.cypress.com/forum/proc-ble/want-use-random-static-ble-address
My idea was to generate a random static address at the device first use. This address could be the same during the lifetime or reset (an other address is randomly generated) when the user press a button. Is it ok to do it like that ? It's absulutely not native in the API so maybe I'am just totally wrong...
No sure if a static address is ok with specifications because it say that static address should be generate after each power cycle..
2)Security
The Bluetooth could provide the possibility to the user to command his door with a phone App :
Security during pairing seems not that great in 4.1. Is it sufficient to add nonce and reponse-challenge schemes in the application part ?
With 4.2 security during pairing seems a lots of better, but how to be sure that it is sufficient ? (and the drawback is that module cost the double comparing to 4.1 module)
Actually many door locks using Bluetooth seems to have lack of security.
If we cannot reach an acceptable level of security we could just keep the configuration part and expire the session after configuration (pairing is only possible with physical access). But i would like to know if we could reach a great level of security with what Bluetooth 4.1 or 4.2 provide to us and with just few security addons in the application layer or without it.
Thanks for your answers
Show LessI have a trackpad design requirement. Does PSoC® 4100 supports trackpad design. Since we need to implement X and Y layer.
Why i selected GPIO is since it contains some GPIO.
Please let me know if PSoC® 4100 is the best choise.
Show Less