PSoC™ 4 Forum Discussions
text.format{('custom.tabs.no.results')}
Hello,
I have a PSOC 4 MCU with BLE 4.1
I would like to understand if there is a way to verify a write response was actually sent to a write request?
Today, I use this API function provided by cypress:
CyBle_GattsWriteRsp(cyBle_connHandle)
The function is said to return the following options:
* \return
* CYBLE_API_RESULT_T : Return value indicates if the function succeeded or
* failed. Following are the possible error codes.
*
* Errors codes | Description
* ------------ | -----------
* CYBLE_ERROR_OK | On successful operation
* CYBLE_ERROR_INVALID_PARAMETER | 'connHandle' value does not represent any existing entry in the Stack
* CYBLE_ERROR_INVALID_OPERATION | This operation is not permitted
* CYBLE_ERROR_MEMORY_ALLOCATION_FAILED | Memory allocation failed
So even if I get CYBLE_ERROR_OK returned, it doesn't necessarily mean that the response was sent yet. I understand that it just means that the request to send a response has been received successfully by the stack and it will now take care of it asynchronously. This is a problem for us because we need to reset the MCU immediately after receiving a specific write request. But we need to send a response before the reset, otherwise, it will cause a problem in the device that had sent the write request.
So we need to be able to know that the response has actually been sent. How can we know this?
Thanks,
Eyal
Show LessI have a large project which I am trying to add a new characteristic to an existing service. I am using the CY8C4248LQI-BL583 chip and I can't seem to get the BLE APIs to properly generate. I keep getting an error when referencing the characteristic's handle. Note that this project is configured for OTA updates so I have a bootloader and a bootloadable projects.
Steps taken so far:
1. Go to the bootloader project, open the BLE 4.2 component, navigate to profiles, and add my new "custom glows" characteristic under the LED service. I set the read / write properties and the UUID of the characteristic.
2. I delete the automatically generated custom descriptor and add a CCCD, as instructed by the documentation.
3. Click OK, then clean / build the bootloader project.
4. I clean / build the bootloadable project.
5. I navigate to my bleCallback.c file in the bootloadable project and try to reference the newly added characteristic handle (as such: CYBLE_LEDS_GLOWS_CONTROL_CHAR_HANDLE) and it throws an error that I'm using an undeclared identifier.
The strange thing is if I navigate to the CyBle_custom.h file in the bootloader project, I see my CYBLE_LEDS_CUSTOM_GLOWS_CHAR_HANDLE value defined. I just can't reference it in my bootloadable project.
Also, my newly defined characteristic handle does not show up in the cyapicallbacks.h file of my bootloadable project. But, this file does contain all of the handles for my previously defined custom characteristics.
Does anyone have any thoughts as to what I'm doing wrong here?
I should note that I have recently migrated from a CY8C4148LQI-BL453 to the CY8C4248LQI-BL583 I'm using currently. This is my first time manipulating the BLE stack on this new MCU.
Show Lessello there,
I created a program in Psoc 4 BLE using uC / OS III, however when I add a task for the button and send it to Psoc and put it to work, the other tasks start normally, but do not do their functions normally, that is , they start and remain the same as they started, without doing their job. Could someone please check my program for me. The problem is in the App_Botao_Pedestre_1_Task task.
To access the project, open Psoc Create and then click on "file-> Open-> Project / workspace" and open the folder "Micrium\Examples\Cypress\CY8CKIT-044\OS3\PSoC\OS3.cywrk"
Show LessHi, I am using CY8C4248LQI-BL583 and Launcher - Stack - Application configuration.
Currently having an issues providing OTA functionality to iOS app, because, after bonding to application, when it jumps to stack and tries to connect, it complains about "Peer removed pairing information".
It happens that iOS tries to pair, but since the Stack and Application has its own checksum exclude areas, they have its own bonding information, so the pairing with stack fails, because bonding information stayed with application, moreover both of them have the same MAC address, and this is what smartphone does not like.
Question - is there an easy way to share bonding keys between the two?
We can make workaround, to copy one bonding information to another, from Application to Stack project, but maybe there is a way to link them to one place using linker scripts?
Show LessHello to all,
I am new to the BLE and bluetooth, OTA and few weeks ago started with the development kit (There I have 2 CPUs: BLE - CYBLE-222014 and MCU - CY8C4146AZI-S433). The firmware upgrade is done over the OTA and code is already available. The application to perform upgrade is on the mobile phone. But the procedure to update the FW seems very complicated for the normal user. As I see for the BLE part we have 3 projects: launcher, stack using the BLE with profile "BLE bootloader" and application with BLE and profile "BLE application".
When application is being used mobile phone and the kit are connected using the BLE profile "BLE application". And over this profile I can also update the MCU fw (both are connected using the I2C and on the MCU we have I2C bootloader) Which is ok and simple to the user. In the MCU we have 2 projects bootloader and application.
When we try to update the BLE fw over the OTA, the user has to disconnect from the kit. Then start the kit in such a way, that BLE is started in the bootloader mode. User then has to connect to the kit using BLE profile "BLE bootloader". After the update is done, user has to unpair with the kit "BLE bootloader" and again pair to the kit "BLE application".
I looked at the example and found similar case in this example: CE220960 - PSoC 6 MCU BLE Upgradable Stack Bootloader
The question is, why can't I use one BLE profile for all the actions? Must say that this approach is very complex for normal users. And also why are the bonding information deleted?
Also, could we not just use the mobile phone to put the kit into the bootloader mode? From the documentation 001-97060_AN97060_-_PSoC_4_BLE_and_PRoC_BLE_-_Over-The-Air_OTA_Device_Firmware_Upgrade_DFU_Guide.pdf
the bonding information should remain unchanged.
I am still searching the forum to find the answer to this question or maybe an example how someone has done this using one BLE profile only.
I again apologize for any beginner questions as lot of stuff here is new to me and I hope someone can clarify this questions.
Thank you very much for the answers, Frenk
Show LessHello
There is the following description in the debug select column of PSoC Creator.
”Controls whether or not to reserve pins for debugging. If any JTAG or SWD option is selected, the debugging features of the chip will be externally accessible. If GPIO is selected the pins are available for general purpose use. When set to GPIO the device can For more information see the device datasheet or Technical Reference Manual (TRM). Still be acquired with SWD / JTAG, and reprogrammed, but not for debugging.”
Where can I specifically refer to TRM for more information on this?
Best Regards
Hayato
Show Less
We use the Cypress CY8C4248LQI-BL553 CPU and an Ethernet Controller (ENC28J60).
We need to implement a TCP Stack for this system. Do you have some know-how concerning such a case ?
and can we get some support ?
Hello,
I am using CYBLE-212020-01 modules which sends and receives some values over BLE from App.
I use Over-the -Air (OTA) firmware update.
The workspace encloses three projects functions are as follows:
1. Launcher project
The purpose of the project is to:
- Start either the Stack or Application project image
- Copy the Stack project image from a temporary location to the persistent location (just after the Launcher project image).
2. Stack project (contains the BLE Stack)
The purpose of the project is to:
- Host the BLE Stack
- Upgrade the Application project image
- Upgrade the Stack project image itself
- Receive updates for the Stack project image itself or for the Application project image
3. Custom Apllication Project
The Stack project is the bootloader.
I have a build that creates a stack.cyacd and app.cyacd.
I would like to combine the two to take advantage of the "Application and stack (combined) update" option of CySmart App.
The reason for this is that my application is using Upgradeable Stack project and so application image must match the correct stack or else device will not boot / operate correctly.
With two separate files, it is easy for client to update incorrectly and "brick" the device.
How can I either create the "combined update" file during build or combine the separate stack and app .cyacd files?
I read the following guide
CyMCUElfTool 1.0 User Guide but It is for PSoC6.
We in our project use CYBLE-212020-01 (PSoC 4.2).
Then I read the following link
But in the previous link Cypress explain how to merge two elf in one file .hex.
How I can convert .hex file combined in a .cyacd2 file for CYBLE-212020-01 (PSoC 4.2)?
Thanks in advance for any replies.
Lucia
Show LessHi,
I am currently working on a system, where I transmit data using SPI master component. I ahve a counter connected. Which count SCLKs. After a certain number of bits have been clocked out, I want to halt the transmission using the component on the topdesign.
I have tried to use a basic count7 component and connected the tc output to the reset input of the SPI master component. But that did not work.
Does anyone know how this can be achieved ? What is the timing requirement for the reset input ?
To ensure no further bits are clockced, it needs to be fast and therefore SW intervention, may not be fast enough. Thats why i do not use interrupts.
Show LessHi,
in our products we are using the CYBLE-022001-00 controller. We have sold more the 10'000 units and got a lot of consumer returns. The reason is that the Flash content of a specific section got lost.
The FW is calling WriteUserSFlashRow to write some information provided by the production script into the flash. After a while it turned out, that those information are gone. All other sections in the flash are still ok, the FW is running. After analyzing the code it turned out, that the FW reads out this section and write it back. I think that could be the root cause but I'm not sure.
- Did someone observe same issues?
- How to check if the brown out reset (BOR) is enabled?
- What are the maximum write cycles to the Flash?
Thank you for supporting me
Best Regards
Lehsam
Show Less