PSoC™ 4 Forum Discussions
I'm currently working on a sensor (MAX30105) connected to a PSoC 4200M via I2C that delivers data through an 18 bit ADC.
The write and read registers are 5 bits, and I'm reading samples by taking the difference between the read and write pointers and reading that amount.
Whenever I do this, it seems the read and write pointers are part of the data I'm sampling and sending through to my receiver.
I cannot seem to see how this is happening.
The image attached from top to bottom: IR_L, IR_M, IR_L, with a difference of 256, and the bottom increment is resetting at 31, which made me question if this was the pointers.
Is this a normal problem, and how to remove it?
Show LessHi. I am working with the CY8CKIT-042-BLE kit using PSOC 4 and 4.1 but what I see is that my kit has a BLE 4.1 whereas I cannot find a BLE 4.1 module either PSOC 4 or 4.1. All I see is either a BLE Smart Module or a BLE Smart 4.2 module. So, how do I add the BLE 4.1 module in my design ?
Show Lesshello there i have one psoc ble device.
when i am trying to connect it with application. sometime it connects fine. but sometimes it takes time and if connection fails then i can't scan device. i have to restart device.
is there any API, that even after connection fails, it scans device.
void StackEventHandler(uint32 eventCode, void * eventParam)
{
static uint8 ledToggle = 0;
CYBLE_GATTS_WRITE_REQ_PARAM_T *wrReqParam;
switch(eventCode)
{
/* Stack is initialized. Start advertisement. */
case CYBLE_EVT_STACK_ON:
// UARt_UartPutString("\r\n==========Fixed Passkey Demo========\r\n");
if(CYBLE_ERROR_OK== CyBle_GapFixAuthPassKey(FIX_PASSKEY,passkey))
{
}
else
{
}
CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST);
/* Turn OFF all LEDs */
// Led_Red_Write(0);
// Led_Green_Write(0);
break;
/* Advertisement timed out. Restart advertisement. */
case CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP:
if(CyBle_GetState()==CYBLE_STATE_ADVERTISING)
{
// UARt_UartPutString("Started to advertise\r\n");
}
else
{
// UARt_UartPutString("advertisement stopped\r\n");
CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST); //Led_Red_Write(0);
}
break;
case CYBLE_EVT_GATT_CONNECT_IND:
//printf("Connection Handle: %d\r\n",cyBle_connHandle.bdHandle);
break;
case CYBLE_EVT_GAP_DEVICE_CONNECTED:
//UARt_UartPutString("Device Connected\r\n");
if(CYBLE_ERROR_OK==CyBle_GapAuthReq(cyBle_connHandle.bdHandle,&cyBle_authInfo))
{
//authInProcess=true;
// Led_Red_Write(1);
}
break;
/* Device is disconnected. Restart advertisement. */
case CYBLE_EVT_GAP_DEVICE_DISCONNECTED:
CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST);
break;
case CYBLE_EVT_GAP_AUTH_REQ:
case CYBLE_EVT_GAP_SMP_NEGOTIATED_AUTH_INFO:
break;
case CYBLE_EVT_GAP_PASSKEY_DISPLAY_REQUEST:
break;
case CYBLE_EVT_GAP_AUTH_COMPLETE:
break;
case CYBLE_EVT_GAP_AUTH_FAILED:
break;
case CYBLE_EVT_GATTS_WRITE_REQ:
CyBle_GattsWriteRsp(cyBle_connHandle);
break;
default:
break;
}
}
Show LessHi everyone,
in my project i use two generic event handler create from myself and the DIS service.
In my main.c , i start with CyBle_Start(MygenericEventHandler1).
I want to register MygenericEventHandler2 and the Dis Service.
How can i do that ?
I see the function "CyBle_DisRegisterAttrCallback" but what do i put in ()?
Thanks for your advice.
Show LessFor the fixed stack OTA bootloader it seems like if I don't use a BLE API function in the 'loader' project, it gets removed and is not available in the 'loadable' project, is this correct? We're using a 128k device and if I set 'remove unused sections = false' I get a ROM overflow condition. My workaround is to just put the BLE functions I need in a block that won't execute in the 'loader' project, then they will be available in the 'loadable'. Is this the right approach or am I missing something here?
Thanks,
Eric
Show LessThe definition of this structure is:
typedef struct
{
/** Advertisement event type
- Connectable undirected advertising = 0x00
- Connectable directed advertising = 0x01
- Scannable undirected advertising = 0x02
- Non connectable undirected advertising = 0x03
- Scan Response = 0x04
*/
CYBLE_GAPC_ADV_EVENT_T eventType;
/** bd address type of the device advertising.
- CYBLE_GAP_ADDR_TYPE_PUBLIC
- CYBLE_GAP_ADDR_TYPE_RANDOM
- CYBLE_GAP_ADDR_TYPE_PUBLIC_RPA
- CYBLE_GAP_ADDR_TYPE_RANDOM_RPA
*/
uint8 peerAddrType;
/** Public Device Address or Random Device Address for
each device which responded to scanning. */
uint8* peerBdAddr;
/** length of the data for each device that responded to scanning */
uint8 dataLen;
/** Pointer to advertising or scan response data */
uint8* data;
/** Rssi of the responding device.
* Range: -85 <= N <= 0
* Units: dBm */
int8 rssi;
} CYBLE_GAPC_ADV_REPORT_T;
For the data section, no distinction is made between a scan response packet or an advertising packet. data seems to lump the two together. Does this mean the data length can be 31 * 2 = 62? Should I expect advertising data to be in the first 31 bytes (0 .. 30) and the Scan Response Data to be in the second 31 bytes (31 .. 61)? How are the two discriminated in this structure?
Show LessI am configuring a system and trying to decide whether this device can be plugged into a daisy chained USB hub extension with a few other components. Does anyone know what the power rating is for the dongle?
Show LessI developed some applications for ProC BLe uC's and I was able to protect rows from Creator 3.3 without problems. I flashed using Programmer and the chip became properly protected.
Some months ago we were forced to migrate future upcoming applications to PsoC BLE equivalent uC's. We're using PSoc Creator 4.0 basically due to new required components.
After developing and tested I tried to protect rows using the same process. Basically, Chip protection selection and later on configuring flash Security.
After that I tried to flash using programmer but I was not able to properly protect the chip. The chiop became unprotected. I check several configurations with no success.
Following the thread, I notice that hex files does not contain the protection information that I got for ProC. Following some comparison for a complete rows protection for both ProC and Psoc 4 families.
---------------------------------------------------------------------------------------------------------------------------------------
PSoc 4:
0200000490303A
:02000000A780D7
:0200000490402A
:4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0
:400040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080
:0200000490501A
:0C00000000021A1711AA00011AA8B92A60
:0200000490600A
:0100000001FE
:00000001FF
ProC:
:0200000490303A
:020000001341AA
:0200000490402A
:40000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00
:40004000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0
:0200000490501A
:0C00000000020E02119E00000E0F24DF13
:0200000490600A
:0100000002FD
:00000001FF
---------------------------------------------------------------------------------------------------------------------------------------
Before going on to check other possiibilities,
Is there any known bug in Creator 4.0 ?
What am I going wrong ?
Ignasi Villagrasa
Show LessIn the datasheet for the BLE component 3.40, there is an image showing the architecture of the component that I also attached to this post.
In this image, there is a separation between the application and the profile API.
From what I understand, the profile API is allowed to make calls to the GATT DB and to the GAP/GATT in the host.
Those calls can also be made form the application, for example the CyBle_GattsWriteAttributeValue function, and should be made when implementing a custom profile.
In my custom profile, is the profile API part in the image my own implementation of the profile, and should it be completely separate, or is this only a visualization of how the standard profiles work?
Show LessI'm trying to use a Comparator component in a CY8C4146LQI-S432.
However, when I try to assign the output to a pin, I find that it won't let me assign it to any of the pins! The only thing I can connect it to seems to be the Quadrature Decoder.
Is this right? Surely the comparator can be used for more things than that?
What am I doing wrong?
Hugo
Show Less