PSoC™ 4 Forum Discussions
hey! Community.
I'm facing one issue while programming CY8CKIT-145-40xxS PSoC DevKit. I ordered CY8CKIT-145-40xxS PSoC now I'm playing with that kit I started following the User guide of that Kit.
I performed these steps
1) Download and installed PSoC 4 IDE
2) install Kit package from here
3) create a new blank project
4) Select kit as shown below
5) Compile/build project
6) insert kit to the USB port of the laptop
7) Select the programmer
8 ) Acquire the port
and that point I'm getting this error.
I'm waiting for few seconds and got this message pop-up.
Thank you 🙂
Show Less
We are using the Capsense CSD together with the Analog Mux.
For the capsense we are using 6 touch keys, and 5 ADC inputs for the multiplexer. We have a conflict between Analog Mux and CapSense CSD that causes the baseline to vary as a function of the ADC inputs.
We tried to manage them at different times, waiting for the end of the conversion of each procedure, but we couldn't solve the problem.
Is there any way to fix this without designing a new layout?
Attached screenshot of the Topdesign.cysch file.
best regards
Alessio
Show LessI use CY8C4247AZI-L485 internal reference (1uF at P1.7) free running 2 channels avarage 4(accululate). Voltage range on the analog pins is 0...1V.
Is there a pssibility to grab results when ever I like without using an interrupt. Having ADC free running sequencing and averaging in background. I could not find an example in free running mode and the datasheet does not tell much about free running mode and what capabilities I have. The block diagramm on page 26 show the structure of ADC block. It seems that every thing is done automatically and the avaraged results will always be avalibale in result regitser... so I can access asynchrounously access .... doing so the result I get is not as expected... please advice how to handle, thanks.
Show Less
Hello all,
I'm working on controlling LED with NEC remote control and Capsense(Using custom PCB with PSoC4 MCU cy8c4245axi-483). My Project which I have attached here is work fine with either through remote or Capsense button. As Problem is different from previous one, I have already opened thread regarding this issue. but problem has not been solved .https://community.cypress.com/t5/PSoC-4-MCU/IR-interfacing-with-Capsense-Button/m-p/273105/emcs_t/S2h8ZW1haWx8dG9waWNfc3Vic2NyaXB0aW9ufEtOOU5IQ0I4UkVBUUkzfDI3MzEwNXxTVUJTQ1JJUFRJT05TfGhL#M39362 .
Please Note that I wanted to operate LED by both the ways. Here I am attaching my Project(in which it is working only with CapSense)
#include "project.h"
#include "stdio.h"
#define TIMER_FREQUENCY 1000000UL
#define ADDRESS_SIZE 16U
#define DATA_SIZE 16U
volatile uint16_t timeStart;
volatile uint16_t timeEnd;
uint32_t pulseWidth;
volatile uint16_t pulseReceived;
volatile uint16_t overflow;
uint32_t timeDiff;
/******************************/
uint8_t startFrameFlag = 0;
uint8_t addressCount = 0;
uint8_t dataCount = 0;
uint16_t address_temp;
uint8_t address_temp2;
uint8_t address;
uint8_t address_inv;
uint16_t data_temp;
uint8_t data;
uint8_t data_inv;
uint8_t frameReceived;
unsigned char status=0;
unsigned char prev_status=0;
unsigned char flag[10];
/*****************************/
typedef enum
{
IDLE,
ADDRESS_FRAME,
DATA_FRAME,
}state;
state nec_state;
volatile uint16_t countFlag;
uint16_t timerPeriod;
asm (".global _printf_float");
int _write(int file, char *ptr, int len)
{
(void) file;
int i;
for (i = 0; i < len; i++)
{
UART_UartPutChar(*ptr++);
}
return(len);
}
void Pin_ISR();
void Timer_ISR();
void DecodeProcotol(uint16_t pulseWidth);
CY_ISR(Pin_ISR)
{
uint8 intrSrc;
intrsrc=NEC_IN_ClearInterrupt();
if(intrSrc != 0u)
{
if(countFlag == 0)
{
timeStart = Timer_ReadCounter();
countFlag = 1;
}
else
{
timeEnd = Timer_ReadCounter();
pulseReceived = 1;
}
}
}
CY_ISR(Timer_ISR)
{
if((Timer_GetInterruptSourceMasked() & Timer_INTR_MASK_TC ) != 0)
{
if(countFlag != 0)
overflow++;
Timer_ClearInterrupt(Timer_INTR_MASK_TC);
}
}
void DecodeProcotol(uint16_t pulseWidth)
{
uint8_t bit = 0;
switch(nec_state)
{
case IDLE://Checks for start of frame
{
if(pulseWidth > 12000 && pulseWidth < 15000)
{
nec_state = ADDRESS_FRAME;
startFrameFlag = 1;
}
else
{
//Invalid Frame received
nec_state = IDLE;
}
break;
}
case ADDRESS_FRAME:
{
if(pulseWidth > 1100 && pulseWidth < 1160)
{
bit = 0;
}
else if(pulseWidth > 2200 && pulseWidth < 2300)
{
bit = 1;
}
address_temp |= ( bit << addressCount);
addressCount++;
if(addressCount >= ADDRESS_SIZE)
{
addressCount = 0;
nec_state = DATA_FRAME;
}
break;
}
case DATA_FRAME:
{
if(pulseWidth > 1100 && pulseWidth < 1160)
{
bit = 0;
}
else if(pulseWidth > 2200 && pulseWidth < 2300)
{
bit = 1;
}
data_temp |= ( bit << dataCount);
dataCount++;
if(dataCount >= DATA_SIZE)
{
dataCount = 0;
nec_state = IDLE;
frameReceived = 1;
}
break;
}
}
}
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
CapSense_Start();
CapSense_InitializeAllBaselines();
CapSense_ProcessAllWidgets();
CapSense_ScanAllWidgets();
Pin_Interrupt_StartEx(Pin_ISR);
Timer_Interrupt_StartEx(Timer_ISR);
UART_Start();
UART_UartPutString("Working\r\n");
nec_state = IDLE;
Timer_Start();
timerPeriod = Timer_ReadPeriod();
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
for(;;)
{
countFlag = 0;
timeEnd = 0;
timeStart = 0;
frameReceived = 0;
address_temp = 0;
data_temp = 0;
address_inv = 0;
address = 0;
data_inv = 0;
if(pulseReceived)
{
if(timeEnd > timeStart)
{
timeDiff = (overflow * timerPeriod) + (timeEnd - timeStart);
}
else
{
timeDiff = (overflow * timerPeriod) - (timeStart - timeEnd);
}
timeStart = timeEnd;
overflow = 0;
pulseReceived = 0;
pulseWidth = timeDiff; //in uS
//printf("%u uS\r\n", pulseWidth);
DecodeProcotol(pulseWidth);
}
if(frameReceived)
{
address_inv = address_temp >> 8;
address = address_temp & 0x00FF;
data_inv = data_temp >> 8;
data = data_temp & 0x00FF;
if((uint8_t)(~data) == data_inv)
{
//printf("Data received: %u\r\n", data_temp);
printf("Data received: %u\r\n", data);
}
else
{
printf("Data corrupted\n\r");
}
}
if (CapSense_NOT_BUSY == CapSense_IsBusy()) {
CapSense_ProcessAllWidgets();
status = CapSense_IsWidgetActive(CapSense_BUTTON08_WDGT_ID) || data==18;
if (status && !prev_status) {
if(flag[8]==0)// && (OF_1_Read()==1))
{flag[8]=1;OF_8_Write(0);
}
else
{flag[8]=0;OF_8_Write(1);
}
}
prev_status = status ;
CapSense_ScanAllWidgets(); }
}
}
. Please Have look. Your suggestions are always helpful for me.
Thanks & Regards,
Prem KB
@MotooTanaka @Hari @Bob_Marlowe @BragadeeshV
Show LessHello,
We have a PSOC 4 MCU with BLE 4.1 and mobile application like as CySmart.
Actual behaviour
The application cannot get a response from characteristic on ios device
Devices:
iPad Air 2 iOS 14.4.1
PSoC 4
Steps what I am doing on the app:
- connect to the device
- enable short and long notifications
- request MTU (Android only API 21+)
- write value
Description
According to Apple documentation - The MTU is negotiated during connection process. iOS will automatically use the largest value supported by both devices.
We set up attribute MTU size which equals 512 bytes on the PSoC side.
On the iOS device we used maximumWriteValueLengthForType (https://developer.apple.com/documentation/corebluetooth/cbperipheral/1620312-maximumwritevaluelengthfortype?language=objc). It has got 512 bytes. But unfortunately the app has not received a response from the peripheral.
However, we had the same issue when we have worked with Android. After a long search we found resolve. It was necessary to using requestMtu (https://developer.android.com/reference/android/bluetooth/BluetoothGatt#requestMtu(int)). When we added requestMtu, the android app started getting a response from characteristic.
Logs from Xcode (iOS):
2021-03-31 17:43:42.445821+0300 emeter_testing_environment[7235:730555] Get connected peripherals
2021-03-31 17:43:43.406298+0300 emeter_testing_environment[7235:730555] retrieveServices (null)
2021-03-31 17:43:43.410845+0300 emeter_testing_environment[7235:730235] Services Discover
2021-03-31 17:43:43.411516+0300 emeter_testing_environment[7235:730235] Service 12345633-0000-1000-8000-00805F9B24FB <CBService: 0x283b14b00, isPrimary = YES, UUID = 12345633-0000-1000-8000-00805F9B24FB >
2021-03-31 17:43:43.467310+0300 emeter_testing_environment[7235:730235] Characteristics For Service Discover
2021-03-31 17:43:43.473929+0300 emeter_testing_environment[7235:730555] startNotification
2021-03-31 17:43:43.474878+0300 emeter_testing_environment[7235:730555] Looking for FC27 with properties 16
2021-03-31 17:43:43.475536+0300 emeter_testing_environment[7235:730555] Found FC27
2021-03-31 17:43:43.597629+0300 emeter_testing_environment[7235:730235] Notification began on FC27
2021-03-31 17:43:43.636951+0300 emeter_testing_environment[7235:730618] startNotification
2021-03-31 17:43:43.637658+0300 emeter_testing_environment[7235:730618] Looking for AEF9 with properties 16
2021-03-31 17:43:43.638046+0300 emeter_testing_environment[7235:730618] Found AEF9
2021-03-31 17:43:43.755061+0300 emeter_testing_environment[7235:730235] Notification began on AEF9
2021-03-31 17:43:46.404088+0300 emeter_testing_environment[7235:730555] Write
2021-03-31 17:43:46.405077+0300 emeter_testing_environment[7235:730555] Looking for 8AA5 with properties 8
2021-03-31 17:43:46.405881+0300 emeter_testing_environment[7235:730555] Found 8AA5
2021-03-31 17:43:46.407011+0300 emeter_testing_environment[7235:730555] [native] Message to write(1): (
1
)
2021-03-31 17:43:46.407912+0300 emeter_testing_environment[7235:730555] [native] Message to write(1): 01
2021-03-31 17:43:46.408064+0300 emeter_testing_environment[7235:730555] MAX WRITE --> 512
2021-03-31 17:43:46.477202+0300 emeter_testing_environment[7235:730235] didWrite
2021-03-31 17:44:47.030206+0300 emeter_testing_environment[7235:730235] Peripheral Disconnected: 2D3F177A-15BE-0C3C-6729-EA6F779F5E67
Also I attached logs from CySmart.
Maybe we are missing something on the PSoC side.
Can we get a detailed description of the MTU installation?
Thank you and Best Regards,
Bohdan
Show Less
Hello Team,
We are developing algorithm that uses BLE signal strength to measure relative proximity of different animals in harsh environmental conditions.
For this we have implemented an algorithm to monitor RSSI values and accordingly calculate the distance and determine the behavior based on the variations in RSSI signal.
Earlier we were transferring the data (RSSI value and timestamp) using debugg board (KIT SOLAR POWER BLE BEACON RDK CYBLE-022001-00, S6AE103A series pval(183) Evaluation Board) using UART.
But now we want to transfer the RSSI value directly from BLE beacon to PC without the debugging board i.e. transfer RSSI value using bluetooth.
So we were searching for the ìnformation on it but couldnt find any so can you please help us in that?
Please find the attachment for understanding the circuit (in this we want to remove the UART part).
BLE Units details :
Detailed Description
CYALKIT Bluetooth Low Energy (BLE) RF BLE-Beacon™️ Platform Evaluation Expansion Board
Hi,
I am trying to use the IDAC component in the PSoC 4 BLE. When I let the PSoC Creator auto-assign the pins during build, it assign the pin P2.7 [44] to the iOut which is unavailable on the board. I have assigned it to a analog pin (p0.0) but it doesn't work correctly and displays the following message:
"Function CSIDAC8.iout is reachable through the analog routing fabric, but using this pin may lead to routing congestion or failure."
I don't know if the problem is because of the pin I assigned or another thing I've done in the project?
Thank you
Show LessI could not able to connect to CY8CKIT-042-BLE-A without cysmart app.
Is there any way to connect to CY8CKIT-042-BLE-A without cysmart app?
I am designing my own GUI and connect to PSOC4 BLE using Bluetooth communication.
Show LessHello,
I'm working on a custom bootloader on a CY8CKIT-042.
My work is based on AN68272 and this article: https://community.cypress.com/t5/Knowledge-Base-Articles/PSoC-4-Custom-Bootloader-KBA229075/ta-p/257179
So basically i start the bootloader from the application via Bootloadable_Load and in the bootloader section I receive rows of data via a proprietary interface. These rows are programmed using CySysFlashWriteRow.
If there are no errors, Bootloader_Exit is called and the new Application starts.
This works fine so far.
My problem is that on a power reset I want the application to start, but it always starts the bootloader.
If I would use Bootloader_Start, this would work, but I can't because I wouldn't know how to work my interface into the default functions like CyBtldrCommWrite and CyBtldrCommRead.
So i checked Bootloader.c and tried to make sense of it.
I tried to call CyBtldr_CheckLaunch during initialisation, but this didn't do anything.
I tried
if(Bootloader_ValidateBootloadable(0) == CYRET_SUCCESS)
{
Bootloader_Exit(Bootloader_EXIT_TO_BTLDB);
}
But this leads t the bootloader always directly jumping back to the application, even if the bootloader ist startet from the application.
I tried:
if ((Bootloader_GET_RUN_TYPE == Bootloader_SCHEDULE_BTLDR) ||\
(CYRET_SUCCESS != Bootloader_ValidateBootloadable(Bootloader_MD_BTLDB_ACTIVE_0)))
{
Bootloader_Exit(Bootloader_EXIT_TO_BTLDB);
}
But this seems to crash the bootloader. When bootloader is active a PWM is used for a blinking red LED but with this code the LED stays always on.
Now I thought i try to ask the community for help on this.
I know that the Bootloadable manipulates a certain memory part so the bootloader can differ between being called from the application with a software reset and a power reset.
I need to know how I can manually detect this in the bootloader.
Thanks in advance.
This is the content of my bootloader main.c:
#include "main.h"
void CyBtldrCommStart(void){}
void CyBtldrCommStop(void){}
void CyBtldrCommReset(void){}
cystatus CyBtldrCommWrite(uint8 pData[], uint16 size, uint16* count, uint8 timeOut)
{return CYRET_SUCCESS;}
cystatus CyBtldrCommRead(uint8 pData[], uint16 size, uint16* count, uint8 timeOut)
{return CYRET_SUCCESS;}
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
PWM_Start();
//CyBtldr_CheckLaunch();
for(;;)
{
/* Place your application code here. */
if(OWS_Main() == UPD_CMD_UPDATE)
{
PWM_WriteCompare(192);
if(UPD_RunUpdate() == UPD_STAT_SUCCESS)
{
Bootloader_Exit(Bootloader_EXIT_TO_BTLDB);
}
}
}
}
/* [] END OF FILE */
Show LessCan a Cy8C4013SXI-410 be programmed with a KitProg?
This is a S08 packaged part with NO XRST pin.