PSoC™ 4 Forum Discussions
This is a basic question... I have a custom service with multiple custom characteristics. The characteristics have various read/write permissions, some notify some do not. I am having trouble with one characteristic. It is read-only and it notifies. I am using a phone app (LightBlue) as a client.
The idea is to have the BLE peripheral provide a status to the client via this characteristic, the app can read the characteristic and receives updates via notification.
In the GeneralEventHandler I update this characteristic on the "stack on" event. When I connect the update is not there, I see the default value of the characteristic as entered in the GUI dialog.
I does not work when set to read only, but it does work when set to read/write. What am I missing?
Thanks
Rich
Show LessHi all,
I want to use SL3S4011 tag with i2c interrupt. It pull low to scl signal for a 200uS(Attached) when tag is readed from rf. I read the datasheet but I couldn't find a solution how I can detect isr signal.
I tried to show i2c pins and connect them an isr but i2c master mode don't support this mode.
Do you have any solution ?
Thank you
Show LessHi ,currently i am using PWM in my project to generate a square wave continuosly and it's working fine as per below
//ADC Initialization
ADC_Start();
ADC_StartConvert();
//PWM Initialization
PWM_Start();
UART_Start();
/* Start CYBLE component and register generic event handler */
CyBle_Start(AppCallBack);
/* Register service specific callback functions */
CyBle_BasRegisterAttrCallback(BasCallBack);
CyBle_HtsRegisterAttrCallback(HtsCallBack);
WDT_Start();
calculate_Data();
/***************************************************************************
* Main polling loop
***************************************************************************/
char temp_buf[30];
while(1)
{
#if 1
memset(temp_buf,0,sizeof(temp_buf));
calculate_Data();
sprintf(temp_buf,"hot_temp :%.2fV\r\n",value);
UART_UartPutString(temp_buf);
memset(temp_buf,0,sizeof(temp_buf));
sprintf(temp_buf,"voltage :%.2fV \r\n",value);
UART_UartPutString(temp_buf);
memset(temp_buf,0,sizeof(temp_buf));
sprintf(temp_buf,"current :%.2fV \r\n",value);
UART_UartPutString(temp_buf);
memset(temp_buf,0,sizeof(temp_buf));
sprintf(temp_buf,"pcb_Temperature_value :%.2fV \r\n",value);
UART_UartPutString(temp_buf);
CyDelay(5000);
#endif
}
but if i am using CyBle_ProcessEvents(); then PWM stop's and i am not getting any waveform as per the code shown
*********************PWM NOT working code
ADC_Start();
ADC_StartConvert();
//PWM Initialization
PWM_Start();
UART_Start();
while(1)
{
/* CyBle_ProcessEvents() allows BLE stack to process pending events */
CyBle_ProcessEvents();
// PWM_Start();
/* To achieve low power in the device */
LowPowerImplementation();
/***********************************************************************
* Wait for connection established with Central device
***********************************************************************/
if(CyBle_GetState() == CYBLE_STATE_CONNECTED)
{
/*******************************************************************
* Periodically measure a battery level and temperature and send
* results to the Client
*******************************************************************/
if(mainTimer != 0u)
{
mainTimer = 0u;
MeasureBattery();
CyBle_ProcessEvents();
if(temperatureMeasure == ENABLED)
{
MeasureTemperature();
CyBle_ProcessEvents();
}
}
}
}
}
Show LessHi, I'm quite new to this but i have this project going on and hopefully you are able to point me i the right direction. The project itself is to replace a USB module delivered from cypress, and replace it with a bluetooth connection. Transmitter and receiver. One of the measurement cards that is located inside our computer should be moved out to a wireless connection box. This connection box should be communicating wireless to our computer and I need some help to get the suitable hardware.. I'm not quite sure if I've explained it properly enough, but I really hope you guys are able to help me out.
Thanks.
Show LessHello!
Where could we find the most recent CySmart source code? Really wanting to find current reference code for the OTA.
I know there is code from 2016 here: CySmart – Mobile App | Cypress Semiconductor
But the projects seem to be dated? (using latest versions of Android Studio and XCode) Is there anything more current?
Thanks!
Show LessHi.
i am working on PWM to generate the continous signal but after few seconds PWM stops working.
If i made a CyBle_ProcessEvents(); as commented than PWM working fine but i want to use the CyBle_ProcessEvents(); and PWM also.
please help me to resolve the issue thanks in advance.
i attached my project please find thw attachment.
Show LessHi,
Application note AN85951 manual tuning sections recommend tuning for a baseline Cp reading of 85% of full range for single IDAC operation and 70% for dual IDAC. These values seem very high, what is the reason for these values? Why can't I tune for, say, 15% and then give myself much more headroom for the signal?
By ensuring that your reading is always above 85% of full range you are effectively reducing the resolution. I guess there must be a reason to do this?
Regards,
Andy
Show LessI'm working on creating a custom bootloader host program. I need to compute the checksums of the .cyacd file and to verify against the checksum calculated by the PSoC. I've seen some mixed descriptions and implementations in calculating this checksum and wonder if anyone could help.
To help guide the answers here is a list of what I'm confused about and what I understand.
1. The .cyacd is in ASCII and has to be parsed into hex values. I've done this in my code using help from btldrutils.
2. Format of the header in the .cyacd file is [4-byte silicon ID][1-byte Silicon Rev][1-byte checksum type]
Format of row in the .cyacd file is [1-byte array ID][2-byte row number][2-byte data length][64 data bytes][1 byte checksum]
3. The start of the program row is marked by a ':' and the end of the row is marked by '..'.
4. I'm using the basic summation (type 00 in header) from the data sheet this adds up every byte sent (besides the checksum) and takes the 2's complement of this value. Note- App note AN86526 attaches example code to run a bootloader host on a PSoC kit board and in the code the checksum for each row is calculated without taking the 2's complement.
My questions revolve around 4.
1. Is the header included in the checksum calculation?
2. Are the semi colons and periods part of this calculation?
3. Is the checksum calculated for each row or is it a running checksum for the entire file?
4. If its a running checksum do you take the 2's complement each row and then add it to the continuous checksum or do you take the 2's complement to verify that row and then add the number before you took the 2's complement to the continuous checksum?
5. Do you just add everything up and check the data after each row?
Any help or directions toward a file that would help me out would be great.
Show LessHi,
I am using CYC8CKIT-048 PSOC Analog Coprocessor Pioneer Kit and am experiencing issues while using both UART and DMA block in the same project.
I need to use the digital data sent from a PC and received via UART to determine which frequency sine wave should be generated (basically I need to make a FSK modulator).
I was trying to do that by connecting UART_tx to the switch input of a TCPWM by using one pin configured as digital output for UART and one as digital input for PWM and connecting them (by wire). I was planning to use the PWM as a clock divider (since this PSOC doesn't have a digital mux, or I can't seem to find it?) which counts to different values depending on the value of switch input.
Then i would connect PWM line output to DMA trigger input, and DMA would transfer data from a sine LUT table to VDAC's internal register and route VDAC to an output pin.
But when i try to build the project I get an error saying that the placer is unable to find a valid placement for pins and fixed-function blocks.
Is there a way to do this the way I imagined, or am I missing something?
Thanks
Here is a copy of placer.txt file:
Phase 4
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.
I2722: The following instances could not be placed:
\PWM_1:cy_m0s8_tcpwm_1\ (0 location(s))
ClockBlock (1 location(s): F(Clock,0))
\UART_1:SCB\ (3 location(s): F(SCB,0) F(SCB,1) F(SCB,2))
Fixed function block and pin placement:
P1[1]: Pin_2(0)
F(HALFUAB,0): \VDAC_1:UAB:halfuab\
F(p4prefcell,0): CyDesignWideVoltageReference
P4[1]: Pin_3(0)
F(CLK_GEN,0): ClockGenBlock
F(OA,2): \VDAC_1:OUTBUFFER:cy_psoc4_abuf\
P0[4]: Pin_1(0)
P1[2]: Pin_4(0)
E2055: An error occurred during placement of the design.
Show Less