PSoC™ 4 Forum Discussions
Hi,
My example is next:
unsigned char value=0x10;
unsigned char* US_InQEnd;
unsigned char US_InBuffer[3];
Test_Write(1u);
InQEnd = US_InBuffer; // getting buffer address
*(US_InQEnd++) = value++; // writing at buffer first location
*(US_InQEnd++) = value++; // writing at buffer second location
*(US_InQEnd) = value++; // writing at buffer third location
Test_Write(0u);
I can see Test pin getting up but not getting down. Is there any mistake ?
Thank you,
Asier.
Show LessI'm having a strange issue with my CYBLE-022001-00 board that I'm trying to develop. When I run my application in debug-mode everything seems fine and works as I want it to, but when I switch and program the chip to run without debugging, then the chip no longer transmits/works as it did in the debugging mode.
Are there configuration or hardware settings that are different between the programming/free-running and debugging uses of the MiniProg3?
I've left SWDIO set to DEBUG, but that shouldn't affect the free-running program...
The only thing I can think of is that I'm using CySysPmSleep(), CySysPmDeepSleep(), or CySysPmHibernate() wrong, but then I would expect the debugging mode to fail as well.
Any thoughts on this would be appreciated. I've been having issues with the code behaving differently based on the debug/program uses of the MiniProg3 for about two weeks now, and I can't seem to figure out what is going on.
Show LessThe update SP1 for PSoC Creator 4.0 lists the Em_EEProm 1.20. The datasheet still shows usage for PSoC 3, 4, and 5. I cannot find that component in the catalog for any PSoC4, am I missing something???
Bob
Show LessHi colleagues,
In the Custom Profile Example (RGB LED Control), I would like to write in the red field (see attached in yellow highlighted) a desired value and not the done from the color map. I tried with the following but it is not working:
- BLE Component with write, read and notify parameters
- wrReqParam->handleValPair.value.val[RED_INDEX] = (uint8) MyValue;
Option 1) CyBle_GattsWriteEventHandler (wrReqParam);
Option 2) CyBle_GattcWriteCharacteristicValue(wrReqParam->connHandle,&wrReqParam->handleValPair);
Is there any possibility to write that value from the server to client and display it in that field or is it directly done from color map to that field by the Android App?
Thanks in advance,
John
Hi,
I'm using UART (SCB mode) [v3.20] component in CYBLE-012011-00 module and I see that all interrupt option are disabled for this component.
Is it possible Uart reception generates interrupt on this device?
Thanks,
ASier.
Show LessHi.
I've got Psoc 4 l-series pioneer kit and I'm trying to use the UART USB example (this SDK http://www.cypress.com/documentation/development-kitsboards/cy8ckit-046-psoc-4-l-series-pioneer-kit)
The UART communication wasn't responding in any way so I started going trough the kitprog user guide for this kit (http://www.cypress.com/file/226201/download).
I've used the PSoC Creator ( 3.3 SP1 (3.3.0.7343)) for flashing and debugger works fine.
The kitprog user guide however mentioned updating the firmware for the kitprog and that's not working. If I start up the PSoc programmer (3.25.0.2504) it doesn't contain the CY8C4xxx -family. Should I be able to upgrade the firmware via this tool or is the info in the documentation obsolete? Or is the problem the CCG3 SDK that I had installed before (I uninstalled it before installing this).
Show LessHi.
I would like to be able to generate software interrupts, to run code in higher priority.
Is it possible on PSoC4 (4200M) ?
I can't use UDB's for this project, so using a Control Register connected to an Interrupt component is not an option.
Thanks.
Show LessWe are going to use PRoC for a new project.
PRoC has 2 UART but we need to manage 3 serial devices.
We would like to use SCB0 for bot Device1 and Device2 connecting one to pins P0.4, P0.5 (SCB0_UART_RX[1]. SCB0_UART_TX[1]) and Device2 to pins P1.4, P1.5 (SCB0_UART_RX[0]. SCB0_UART_TX[0]) and change the pin configuration dynamically (Device1 and Device2 don't have to communicate at the same time).
Is it that possible or we have to use external hw switch?
If it possible how can we do this using PSoC 4 Creator?
Show LessHi all,
For our current application, we need a long range link. As a first step, we would like to perform a range test. For this, we bought two CY8CKIT-042-BLE-A kits and two CYBLE-224110-EVAL. We want to connect them one to each other (Central and peripheral) and see how the link
behaves in terms of distance.
We found this project on the web https://github.com/cypresssemiconductorco/PSoC-4-BLE/blob/master/100_Projects_in_100_Days/Day020_BLE_UART/UART_to_BLE.pdf which we used to connect both boards.
First we tried with the two CY8C4248LQI-BL583 modules that come with the CY8CKIT.
We took the above mentioned SW, we update the sw modules (As PSoC Creator suggest) and we changed the device to CY8C4248LQI-BL583. Everything worked properly.
Then, we change the module to the CYBLE-224110 in the kit board acting as Central, changed the device in PSoc and tried again. It was OK.
The other way round, CYBLE-224110 as peripheral and CY8C4248 as central also work fine.
But when we switched to CYBLE-224110 in both kit boards, they cannot establish communication.
Anyone has an idea of what could be the reason for this?
We are new to BLE and PSoC and we are a bit lost.
Thank you very much in advance
Xavi
Show LessI have two cy8ckit-042-ble and I am trying to connect my 1st BLE kit configured as GAP role: central and GATT Client with a 2nd BLE kit configured as GAP role: peripheral and GATT server. It can generate event
CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT: I can fetch address of peer device. STOP scanning using CyBle_GapcStopScan().
As a result following event is generated CYBLE_EVT_GAPC_SCAN_START_STOP: When I call res = CyBle_GapcConnectDevice(&peerAddr); value in res is CYBLE_ERROR_OK, but not generating CYBLE_EVT_GAP_DEVICE_CONNECTED. I get HCI error.
CYBLE_HCI_COMMAND_DISALLOWED_ERROR.
*****Is thereany specific way to call : CyBle_GapcConnectDevice((const CYBLE_GAP_BD_ADDR_T* )&add);
i have called this API wen event generated is CYBLE_EVT_GAPC_SCAN_START_STOP on calling CyBle_GapcStopScan().
code for central is as follows:
*************************
#include "project.h"
void ble(uint32 eventCode, void *eventParam);
CYBLE_GATTC_WRITE_REQ_T writeReqParam;
static volatile CYBLE_API_RESULT_T res;
static CYBLE_GAP_BD_ADDR_T add;
void v_workerBLE_slaveSelectionHandler(CYBLE_GAPC_ADV_REPORT_T* eventParam);
void resolveErr(CYBLE_HCI_ERROR_T *eventParam);
uint8 u8slaveFound;
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
CyBle_Start(ble);
while(1)
{
CyBle_ProcessEvents();
}
}
void ble(uint32 eventCode, void *eventParam)
{
switch(eventCode)
{
case CYBLE_EVT_STACK:
CyBle_GapcStartScan(CYBLE_SCANNING_FAST);
break;
case CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT:
// call api to vew n list scanned device, and save the address of device
// this API working fine and shows scanned devices and generates
// CYBLE_EVT_GAPC_SCAN_START_STOP event.
v_workerBLE_slaveSelectionHandler((CYBLE_GAPC_ADV_REPORT_T *)eventParam);
break;
case CYBLE_EVT_GAPC_SCAN_START_STOP:
{
// **** error section. not generating next event. CYBLE_EVT_GAP_DEVICE_CONNECTED
// API - CyBle_GapcConnectDevice((const CYBLE_GAP_BD_ADDR_T* )&add); generates
// CYBLE_EVT_HCI_STATUS event , which is error. res variable shows all OK-no error.
if(u8slaveFound)
{
//peerAddr.type = 0u;
// connect to the device
// ** error API- THIS API GENERATES HCI ERROR
res = CyBle_GapcConnectDevice((const CYBLE_GAP_BD_ADDR_T* )&add);
}
}
break;
case CYBLE_EVT_GAP_DEVICE_CONNECTED:
CyBle_GattcStartDiscovery(cyBle_connHandle);
break;
case CYBLE_EVT_GATTC_DISCOVERY_COMPLETE:
// do some work
break;
case CYBLE_EVT_HCI_STATUS:
resolveErr(eventParam);
break;
default:
CyBle_GapcStartScan(CYBLE_SCANNING_FAST);
break;
}
}
void v_workerBLE_slaveSelectionHandler(CYBLE_GAPC_ADV_REPORT_T* eventParam)
{
uint8 newDevice = 0u, device = 0u;
uint8 i;
uint8 adStructPtr = 0u;
uint8 adTypePtr = 0u;
uint8 nextPtr = 0u;
// copy peer device address- address of device which we want to connect to
memcpy(add.bdAddr, eventParam->peerBdAddr, CYBLE_GAP_BD_ADDR_SIZE);
add.type = eventParam->eventType;
{
// convert little endian to big endian as for now
add.bdAddr[0] = eventParam->peerBdAddr[5];
add.bdAddr[1] = eventParam->peerBdAddr[4];
add.bdAddr[2] = eventParam->peerBdAddr[3];
add.bdAddr[3] = eventParam->peerBdAddr[2];
add.bdAddr[4] = eventParam->peerBdAddr[1];
add.bdAddr[5] = eventParam->peerBdAddr[0];
u8slaveFound = 1u;
CyBle_GapcStopScan();
}
}
void resolveErr(CYBLE_HCI_ERROR_T *eventParam)
{
// see error code- CYBLE_HCI_COMMAND_DISALLOWED_ERROR in my case
volatile uint8 err = *eventParam;
}
Show Less