PSoC™ 4 Forum Discussions
Hello
I am trying to make a program to get temperature reading and send between two cy8ckit 042 ble kit. And want to see the results through UART.
Till now i tried UART_BLE example from https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days
Can anyone help me how to proceed from here??
Thanks
Show LessHello,
I am confused about the development kits and Proc devices currently available.
First I found an CYBLE-212019-00 PROC module BLE 4.1 with an appropriate development kit CY8CKIT-042-BLE for the PSOC 4 hardware.
But after checking the website at Cypress I got the information that a new development kit CY8CKIT-042-BLE-A with BLE 4.2 is out. Unfortunately this new kit seems not to be available everywhere or at any distributor.
As both kits seem to be based on the PSOC 4 I wonder if there is an difference in the software only and the hardware has not changed.
Is that right and I can buy an non A version kit and use or update with the newer software or am I wrong here ?
Same applies for the available CYBLE-212019-00 PROC module which is reported as 4.1 module. Can I update this module to 4.2 with the newer development kit or the updated non A kit ?
Or are there any diffs in the PSOC4 hardware or the older 4.1 devices locked in any way to this version ?
Can somebody please clarify because if I start with a new project I would like to get the latest version if ever possible.
Thank you very much for any usefull answer.
Show LessGood morning,
I am currently developping software with PSoC Creator 3.3 on a chip CYBLE-022001-00. My question is about the security. This is my configuration :
General :
GATT Server.
GAP Paripheral.
GAP Settings (Security) :
Security Mode : Mode 1.
Security Level : Authenticated pairing with encryption.
I/O Capabilities : Display Only.
Bonding requirement : No Bonding.
Encryption key size (bytes) : 16.
I have created 2 Services in a Custom profile : One for Read and one for write data. I have a bridge between BLE and I2C (i am using a project « Day035_I2C_BLE_Bridge » for that).
To have an higher security betweek two devices, i am using encryption and authentication. I used the project « Day016_Authentication » to have the same thing. The problem is : during the authentication, i enter the passkey in a smartphone (the passkey generated by the cyble-022001-00), but if i fail the authentication, i am still able to write data in a characteristic and i am able to read theses datas with the I2C component.
In the profile properties, all permissions need an encryption (encryption required) and an authentication (authentication required).
Do you know how it is possible to write (and read) in all characteristics even if the anthentication if fail ?
Thank you for your answer.
Kind regards.
Show LessHi,
I am facing a problem when using PSOC4 as a SPI master.
The SPI slave is a chip, and the operation defined by the chip is the following.
The SPI mode is 0,0
#1. NSS = 0
#2. Master MOSI write the address byte . e.g 0x01
#3. Master MISO read the data byte generated by the slave.
#3. NSS = 1
The following code is used in this operation.
////////////////////////////////////////////////////////////////////////
uint8 mTxBuffer[1] = {addr};
SPIM_SpiUartPutArray(mTxBuffer, 1);
while(2!=SPIM_SpiUartGetRxBufferSize())
{
}
SPIM_SpiUartClearTxBuffer();
while(SPIM_SpiUartGetRxBufferSize()>0){
Value = SPIM_SpiUartReadRxData();
}
SPIM_SpiUartClearRxBuffer();
/////////////////////////////////////////////////////////
But always found the NSS will be set to 1 after the write is executed.
Then it is not possible to read the byte return from the slave.
Any suggestion on this? Or have to using the GPIO to simulator this feature?
Show LessMy board design uses a MMA8653FC Accelerometer
I defined an I2C SCB to communicate with it
Set up the SCL and SDA pins per my board schematic. The part SendStart routine returns no error so I assume the SCB is configured properly
The part spec describes the single byte register read as follows
5.8.1 Single-byte read
1. The transmission of an 8-bit command begins on the falling edge of SCL. After the eight clock cycles are used to send the command, note that the data returned is sent with the MSB first after the data is received. Figure 10 shows the timing diagram for the accelerometer 8-bit I2C read operation.
2. The Master (or MCU) transmits a start condition (ST) to the MMA8653FC [slave address (0x1D), with the R/W bit set to “0” for a write], and the MMA8653FC sends an acknowledgement.
3. Next the Master (or MCU) transmits the address of the register to read, and the MMA8653FC sends an acknowledgement.
4. The Master (or MCU) transmits a repeated start condition (SR) and then addresses the MMA8653FC (0x1D), with the R/W bit set to “1” for a read from the previously selected register.
5. The Slave then acknowledges and transmits the data from the requested register. The Master does not acknowledge(NAK) the transmitted data, but transmits a stop condition to end the data transfer.
I'm having trouble translating steps 4 and 5 into code that uses the I2C SCB
#5 implies that the register must be read immediately after the repeated start is sent. It's not clear how to do this in SCB I2C.
The Accel_I2CMasterReadByte issued after Accel_I2CMasterWriteBuf returns 0xFF because the check if master is active in Accel_I2CMasterReadByte fails :
Here is a routine I use
byte IIC_RegRead(byte address, byte reg)
{
byte b = 0;
byte repeatStartAddr = (address << 1) | 0x01; /* slave address 0x1D with the R/W bit set to “1” for a read from the previously selected register. */
status = Accel_I2CMasterSendStart(address,DIR_WRITE);
if(status == Accel_I2C_MSTR_NO_ERROR)
{
Accel_I2CMasterWriteByte(address); // Send IIC "Write" Address
Accel_I2CMasterWriteByte(reg); // Send Register
Accel_I2CMasterWriteBuf(address,&repeatStartAddr,1,Accel_I2C_MODE_REPEAT_START);
----These fail
b = Accel_I2CMasterReadByte(GENERATE_ACK); // *** Dummy read: reads "IIC_ReadAddress" value ***
b = Accel_I2CMasterReadByte(GENERATE_ACK); /* read the value */
status = Accel_I2CMasterSendStop();
}
return b;
}
Your help is much appreciated.
Hi All,
Could you help me to find out the document for CYREG_RADIO_TX_RX_MUX_REGISTER details please.
This is used in BLE_Power_Measurement project to route Tx and Rx radio signals onto PIOs. I would like to know can I route into any PIOs or 3.2 and 3.3 are fixed?
Thank you very much.
Show LessHello,
Has anyone tried to redirect printf through SWD using EVAL 012011 board and MiniProg3 connected using a 10-pin connector? What debugging options do I have using this setup?
Thanks
Dheeraj
Show LessHi,
I am trying to get an interrupt to change some data when an Android app sends a characteristic write request. Both UUIDS are identical in Android Studio and PSOC Creator, however, this line never seems to match:
if(wrReqParam->handleValPair.attrHandle == CYBLE_DMX_CONTROLLER_CUSTOMCOLOR_CHAR_HANDLE)
The CYBLE_DMX_CONTROLLER_CUSTOMCOLOR_CHAR_HANDLE always has a value of 0x0014u, but the wrReqParam->handleValPair.attrHandle either has a value of 0x0010, or 0x0015. I have checked and double checked when debugging that the app is sending the characteristic with the correct UUID (00000000-0000-1000-8000-00805f9b34f1), and cannot make sense of this.
Any ideas?
Thank you in advance.
Regards, Tom
Show LessHey All
Wishing all of you and your families a very happy and prosperous new year in advance !!!
Anyone one working or has worked on UART? I need a task to be accomplished as below:
- PSoC4 should receive a character string and store it in an array.
- The programming should be interrupt based, specially with UART Rx interrupt and no delays included.
For example, let us assume I am receiving a character string "OK\n". On receiving the entire string, I should come to know that the entire string has been received. I will compare that string with a setpoint string "OK\n". If both match, an LED should blink.
Regards
Shaunak
Show LessHi,
I'm using a UDB UART, and it's sometimes producing errors, despite the input signal looking well within spec. Am I doing something wrong?
I have two PSoC4s: one is transmitting "BlahblahHello!", and one is receiving. The receiving one has two outputs for debugging:
- A copy of the input digital signal, so I can check that it's getting a good waveform.
- Re-transmitted bytes, so I can check that the UART us correctly interpreting the incoming signal.
The baud rate is 2Mbaud, using a 16MHz input clock on the UART component. Most of the time the UART works fine, but sometimes it seems to generate an error, and then loose synchronisation for the rest of the string.
The obvious cause would be that the transmitter and receiver have very slightly different clock frequencies. But I have checked their clocks using a 1MHz output from each using a PWM component. Their clocks differ by less than 0.1%. Am I doing something wrong? Is there anything I can do to reduce the error rate?
Hugo
Show Less