PSoC™ 4 Forum Discussions
Hi,
Can i do BLE profile developement in IAR work bench? Since it is so tightly coupled with PSOC creator and drag and drop components are present ,how can i migrate it into IAR? Is there anyway?
Show LessI'm looking through the example code for BLE_Proximity01 and in main.c noticed the code to start the watchdog timer (WDT). I opened the WDT's datasheet and didn't see any reference about a Start() function. So, I searched the generated source for "CySysWdtUnlock" using GREP and found that it is defined in CyLFClk.c. Where did that come from? So, I looked at the Clocks resources and found a number of references to "LFCLK". I assume that setting them there added the code to the generated source: CyLFClk.h and CyLFClk.c, but am not sure. Then I search CyLFClk.h and find a large number of WDT functions in the WDT API section. Why wouldn't they be listed in the WDT datasheet?
My question is, if I was going to create this from scratch, I wouldn't have a clue as to how I would do this. Is there anything that explains what is going on here? The PDF with the example code doesn't explain much about the nuts and bolts and the BLE datasheet says:
"Note The LFCLK is used in the BLE Component only during Deep Sleep Mode and hence the ILO inaccuracy does not affect the BLE communication."
Or, are we supposed to just use the code as supplied and not worry about being able to write this from scratch after we gain a much better understanding?
Show LessI'm using the CY8C4247AZI-M485 to generate tones with the IDAC and DMA components. I can create a custom sequence of tones. The total duration of my sequence is 125 ms. I repeat the sequence every second for a "beeping" effect. I can initiate the beeping with a CAN message and I can stop it with a CAN message. The problem I'm having is starting it again. I have a feeling I'm not resetting my DMA channels properly. What is the proper way to reset the DMAs?
Show LessI have a pressure transducer circuit that outputs a voltage between 0-5V. There's a pin connected to that output that I connect to analog pin P2[2] on the PSoC 4 board. I was wondering how to divide this down to meet the 3.3V max VDDA for the ADC SAR Sequencer. Right now I have my "Transducer" analog input pin connected to the 1st pin of the 12 bit ADC (the 2nd going to ground). For the divider, I have R1 as 5k and R2 as 10k, connected to the PWR Vdd (all of which is fed to external terminal of the analog pin). Is this how it's supposed to be connected in the TopDesign.cysch?
I attached the project bundle.
-Anthony
Show LessHi everyone,
I would like to know if the only difference between CY8C4247LQI-BL493 and CY8C4247LQI-BL483 is the CapSense characteristics. I need to know if the same code can run in both MCU without any problem (I don't use the Capsense). Searching the CY8C4247LQI-BL483 in the search box of the cypress main web page, if you click on the datasheet link you're redirected to the 4XX7_BLE family datasheet, meanwhile if you do the same thing with the CY8C4247LQI-BL493 you're redirected to the 4XX8_BLE family datasheet. Is this a mistake in the link?
Thanks in advance.
Show LessI'm implementing a GATT server on a PSoC 4 BLE.
I'm investigating the usage of CyBle_GattsNotification(), and the proper approach to send multiple notifications in series. I plan on using this to send a short burst (several seconds) at maximum bandwidth, while inbound GATT writes are occurring at the same time (but at a low bandwidth) I have not been able to find any documentation on this.
I have seen a couple approaches when using CyBle_GattsNotification(). One in the Cypress example project Day042_PSoC_4_BLE_Frequency_Measurement, is to capture the busy status via a BLE event:
case CYBLE_EVT_STACK_BUSY_STATUS:
/* This event is generated when the internal stack buffer is full and no more
* data can be accepted or the stack has buffer available and can accept data.
* This event is used by application to prevent pushing lot of data to stack. */
/* Extract the present stack status */
busyStatus = * (uint8*)eventParam;
and then use that status before writing notifications with:
if(busyStatus == CYBLE_STACK_STATE_FREE)
{
...
/* Report data to BLE component for sending data by notifications*/
CyBle_GattsNotification(connectionHandle,¬ificationHandle);
}
The other approach, which perhaps is equivalent, is in example project Day024_Throughput:
/* Send new data only when the previous data has gone out,
* which is indicated by Stack being Free.
*/
if(CyBle_GattGetBusStatus() == CYBLE_STACK_STATE_FREE)
{
SendNotification();
}
(Note: there appears to be a typo in the above function, and it has been deprecated in favor of the more applicable name that uses "Busy" not "Bus"). However, the above function appears to be undocumented (Bus or Busy versions) - at least, it's not in the BLE component PDF (BLE_v1_0_001-91490_B.pdf).
What is the best approach for sending out multiple notifications from a GATT server to client? What if there may be concurrent GATT writes? Can the stack be free but then a notification still fail because some inbound (GATT write) BLE traffic occurs? Any app notes or other documentation on this?
Thanks!
Brian
Show LessAs part of my current education as an Electronic Engineer, I am currently attending a course in Embedded Systems. For this course, we are required to complete several projects concerning the PSoC4 Pioneer Kit and multiple Shields (including the Arduino MultiFunctionShield); my final assignment for this course is to simulate an alarm system, which must be monitored via at least three methods (see below). However, I am currently experiencing several recurring problems, which have caused me to restart my project multiple times.
As such, I thought it might prove fruitful to ask for your advice concerning the project. To be specific, the hard requirements for the project are as follows:
- The system has to detect/simulate the status of the loop via three methods; the Capsense present on the PSoC4 (loop 1), the PotMeter present on the Shield (loop 2) and an additional slider which has to be configured on the Shield via Input Gate A5 (loop 3).
- In each loop, five specific voltage/current intervals have been defined. As these are applied in relation to a 5V power supply, these are as follows:
1; Sabotage 1 --> 2,483 V - 4,999 V
2; Alarm open --> 2,246 V - 2,482 V
3; Sabotage 2 --> 1,345 V - 2,245 V
4; Alarm active --> 1,161 V - 1,283 V
5; Sabotage 3 --> 0,001 V - 1,160 V
- If Key 1 on the Shield is pressed, the RGB-LED on the PsOC4 has to turn Green after a 10-second delay; As long as this is not the case, the RGB-LED has to turn Blue, EXCEPT when any of the loops is subject to Sabotage. In case of Sabotage, the RGB-LED has to turn Red and the Buzzer on the Shield has to produce a continuous signal, which can be turned of by pressing Key 2 on the Shield. Once all loops are in correct current ranges (either Alarm open or Alarm active), the Buzzer has to turn off automatically and the RGB-LED has to turn Blue once again.
- Each of the specified areas has to produce specific visual messages via the 7-segmentsdisplays (present on the Shield), as well as turning on LED's on the shield in binary code. These messages/LED's are as follows:
1; Sabotage 1 --> "S1" --> LED1
2; Alarm open --> "OPEN" --> None
3; Sabotage 2 --> "S2" --> LED2
4; Alarm active --> "AAN" --> None
5; Sabotage 3 --> "S3" --> LED3
- When sabotage is detected, the display has to be followed by a space, after which the respective loop is also displayed. Each of the aforementioned visual messages must be displayed for exactly the duration of 1 second, which is followed by the actual Voltage meassured in that specific loop (varying between 0,000 V and 5,000 V); the programme itself continuously alternates between each of the three loops.
FOR EXAMPLE: when the PotMeter is adjusted to create 1,500 V, the text "S2 2" is displayed; Exactly one second later, the text 1.500 is displayed; afterwards, the correct message for loop 3 (the slider) is displayed, after which the correct voltage is displayed; the same follows for loop 1 (CapSense), and so forth. I have been able to construct the necessary components and Pin Configuration for the project (see the attached project). It is mainly, and perhaps purely, the software programme itself that presents the challenges I can't seem to overcome.
As such, the realisation of the system presents the following challenges;
I. To construct a scanning-program that puts data obtained via inputs in array(s).
II. To create a display-programme that can relay data from the array(s) dynamically per second.
III. Loop both programmes continuously.
IV. Control the 7-segmentsdisplays with the help of an interrupt-routine.
Additional Requirements:
- Incorporation of a Deep Sleep Mode into the system --> By pressing both Key 1 and Key 2 simultaneously for three seconds, the system has to put itself into Deep Sleep Mode to preserve energy; after pressing both buttons for three seconds once again, Deep Sleep Mode is lifted and the system functions normally.
- Incorporate Hard Reset into the system --> by pressing the Reset-button, the user has to be able to completely reset the entire system.
As an enthousiast technician (who seriously attempts to obtain as much knowledge in as little time as possible), I sincerely hope you might be able to help me in creating the project. Sincerely and many, many thanks in advance.
Show LessI am having CY8CKIT-042-BLE and want to interface Adafruit Neopixel ring(Data sheet attached below) with it, as per datasheet I need to generate delay of minimum 300 nanoseconds using timer, but timer doesn't give exact delay when used at high frequency(above 1Mhz).
I also downloaded project created by Mark Hasting for CYBL10563 as well as CY8C4247LQI but it pops me error as "Component 'StripLights' uses component 'cy_clock_v2_10' in its implementation. 'cy_clock_v2_10' has an error: The cy_clock_v2_10 component (StripLights_HFCLK) is not compatible with the selected device. Please check the component datasheet for details on updating to a compatible component."
Please guide me to overcome above error so that I can use "StripLights" block in my project.
Also I had updated my PSoC creater to version 4.
Please help
Show LessHello dear community!
We are developing Firmware Over The Air update functionality with our iOS and Android apps. We got everything working and are able to update the firmware from the Bootloader Host Tool, as well as from our iOS app (and the CySmart app on iOS). The remaining platform is Android, and it is causing a lot of headache.
When starting the firmware update on Android, at first, everything seems alright. The bootloader is entered, and all commands are executed perfectly until the data is written. It seems like Android is trying to send 138 bytes of data to write a row to the memory on the chip. The write doesn't get any positive response notification, supposedly because the "Attribute MTU size (bytes)" in the BLE CSD's GAP Settings is set to 23. If you set the MTU size to 138 or bigger, the FOTA process succeeds on Android. Unfortunately, that breaks the FOTA functionality on iOS… As we've already shipped the iPhone apps, we prefer fixing the Android side.
Apparently Android fails to chunk the data under the hood so that the chunks are reassembled at the link layer on the peripheral's side. This happens with both our own Android app and the Android CySmart app.
The underlying code of our embedded application is "BLE OTA Bootloader and Bootloadable Example Project 1.0".
Questions:
What should the MTU size be?
How should the Android size chunk the data into 20 bytes packets?
Why is the CySmart Android app not able to update the firmware either?
All the best,
Julian
Show LessFor my design i'm using a SCB SPI slave component and need to generate a interrupt from slave select. This pin is hidden from the top level schematic so i cant simply place a ISR component on this I/O line.
I need the steps for enabling the interrupt at the GPIO pin and all other steps up to the ISR service function. I have so far determined these steps but dont have the complete solution:
Create ISR prototype
CY_ISR_PROTO(SPIS_nSS_Isr);
Create function
CY_ISR(SPIS_nSS_Isr)
Link function to interrupt vector??? I believe port 5 is connected to IRQ5
CyIntSetSysVector(5,SPIS_nSS_Isr);
Enable interrupt vector???
Enable Pin interrupt
SPI_SLAVE_ss_s_SetInterruptMode(SPI_SLAVE_ss_s_INTR_ALL,SPI_SLAVE_ss_s_INTR_RISING);