PSoC™ 4 Forum Discussions
I am making a program using PSoC 4 BLE software that connects to the CySmart App. I want to control two different LEDs (red and green) using PWMs so that one LED would blink at the speed of one second, and another would blink at 2 seconds. I have tried doing this, but this error occurs: Pin guidance unavailable: Resource limit: Maximum number of Datapath Cells exceeded (max=4, needed=6).
Does anyone know how to fix or get around this problem?
Thanks,
Andrew Collins
Show LessI created a simple UART bootloader and bootloadable. Both so far use just GPIO pins to control LEDs, and a standard UART component. Everything is configured as in AN68272. When trying to load the bootloadable with Bootloader_Host_GUI_exe, I'm getting error 0x0000A - "The flash row is not valid" (per Bootloader_Host_GUI_exe source). The workspace is attached. I'm using PSOC Creator 4.1 update 1 with CY8CKIT-041-40XX. Any help or pointers will be appreciated.
Show LessI try to program PSoC101-049-CY8CKIT-049-42xx by Bootloader Host in PSoC Creator,but the log show the followings:
09:23:55 PM - Selected device: USB Serial Port (COM4) - UART
Generic Serial Port
09:23:58 PM - program Started
09:23:59 PM - The operation has timed out.
09:23:59 PM - The bootloader reported error 'Unknown error '0x38' occurred in the bootload process.'.
09:23:59 PM - program failed in 1002 ms.
Show LessI am working on a capsense design and someone informed me that they used a capsense device that did not require programming (CY8CMBR3102). Would this work in that fashion? In other words is it pre-programmed with anything where i can just place it into my design and have it work / register inputs?
Regards,
Ramon
Show LessAs stated in this discussion, in the specification of PSOC 4, it stated:
"UART Mode: This is a full-feature UART operating at up to 1 Mbps. It supports automotive single-wire interface (LIN), infrared interface (IrDA), and SmartCard (ISO7816) protocols...."
However the Creator does not have LIN bus component, I would like to ask if there is any example or library that implement the LIN bus in PSOC4 ?
I am actually using PSOC 4 BLE.
Thank you.
Show LessHi sir i am interfacing cyble 22001 with Thermocouple ic USING SPI.But while reading data i am getting only 0xff.
my code is here.
uint8 MAX31856_Read_Data(uint8 Reg_Addr)
{
uint8_t ReadData = 0;
uint8_t dummy = 0;
SPIM_SpiUartClearRxBuffer();
SPIM_SpiUartWriteTxData(Reg_Addr);
while (!SPIM_SpiUartGetRxBufferSize());
dummy = SPIM_SpiUartReadRxData();
SPIM_SpiUartWriteTxData(0xFF);//writing Dummy Data
while (!SPIM_SpiUartGetRxBufferSize());
ReadData = SPIM_SpiUartReadRxData(); // Read Data
return ReadData;
}
if i am using this while(!(SPIM_ReadTxStatus() & SPIM_STS_SPI_DONE)); compiler unable to find SPIM_ReadTxStatus() and SPIM_STS_SPI_DONE)
generates error. please help me to solve the issue.Thanks in advance..
Show LessHi,
I know how to set the custom characteristics of a custom service using following code -
CYBLE_GATT_HANDLE_VALUE_PAIR_T tempHandle;
tempHandle.attrHandle = CYBLE_CUSTOMSERVICE_NAME_CHAR_HANDLE;
tempHandle.value.val = data;
tempHandle.value.len = sizeof(data);
CyBle_GattsWriteAttributeValue(&tempHandle, 0, &CYBLE_CUSTOMSERVICE_NAME_CHAR_HANDLE, CYBLE_GATT_DB_LOCALLY_INITIATED);
But now I want to set characteristics of Device Information service programatically (i.e Serial Number String). These services are standard services. Is there any example which I can use to set standard characteristics? If I try the above code to set it, it doesn't work. I can see the constant value set using the BLE settings.
Please help. Thanks in advance.
Kind Regards,
Jitender
Show LessHow do I get to this event CYBLE_BLESS_STATE_EVENT_CLOSE ?
I need to use it for CyBle_GapUpdateAdvData( ) function.
What will force that event?
Is it
CySysPmSleep(); ?
CySysPmDeepSleep(); ?
CySysPmHibernate();?
I will make this for the Peripheral.
Also if it hibernates, sleep, deep sleep ... will i ever connect to it ? via Central.
Message was edited by: Cyrus Nikko Pante
Show LessHi, I'm using a '042-BLE' kit here and it's working fine. But I can't get a timer interrupt to work. Here is the main code:
* ========================================
*/
#include <project.h>
uint16 ms_count = 0;
CY_ISR(MY_ISR)
{
ms_count++;
if(ms_count == 1000)
{ // 1 second
LED_2_Write(!LED_2_Read()); // Toggle LED
ms_count = 0; // reset ms counter
}
}
int main()
{
Timer_Start(); // Configure and enable timer
Timer_ISR_StartEx(MY_ISR); // Point to MY_ISR to carry out the interrupt sub-routine
CyGlobalIntEnable; // Enable global interrupts
for(;;)
{
// Infinite loop for timer/interrupt to keep executing
}
}
The pin output is square running at 900us, not 1 second I had hoped for. Changing the clock frequency makes no difference.
This is going to be such a silly problem, I'm already embarrassed, but I've at this for some time and I can't see what is wrong.
Project is attached.
Show LessHow can I change an advertisement packet...
I followed this tutorial...
and made my own version for my application.. I'm currently debugging it.
I set my Service Data to 0.
I need it to switch it from 0 to 1, and vice versa.
CYBLE_GAPP_DISC_MODE_INFO_T discoveryReport;
int main(void)
{
CYBLE_API_RESULT_T apiResult;
CyGlobalIntEnable; /* Enable global interrupts. */
apiResult = CyBle_Start(StackEventHandler);
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
for(;;)
{
CyBle_ProcessEvents();
DynamicADVPayloadUpdate();
}
}
void DynamicADVPayloadUpdate(void)
{
if(CyBle_GetBleSsState() == CYBLE_BLESS_STATE_EVENT_CLOSE)
{
discoveryReport.advData->advData[14u] = 0x01;
CyBle_GapUpdateAdvData(discoveryReport.advData, discoveryReport.scanRspData);
}
}
void StackEventHandler(uint32 event, void *eventParam)
{
switch(event)
{
/* Mandatory events to be handled by Find Me Target design */
case CYBLE_EVT_STACK_ON:
case CYBLE_EVT_GAP_DEVICE_DISCONNECTED:
/* Start BLE advertisement for 30 seconds and update link
* status on LEDs */
CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST);
break;
case CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP:
if(CyBle_GetState() == CYBLE_STATE_DISCONNECTED)
{
CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST);
}
break;
default:
break;
}
}
Message was edited by: Cyrus Nikko Pante
Show Less