PSoC™ 4 Forum Discussions
We are using Upgradable OTA Stack mode with 3 projects (Launcher, BLE Stack, BLE application) on the CYBLE222014.
1. When we build BLE Stack the image size is always around 128 kB. For debugging purposes I had to add
Uart component and then the image size was bigger than 128kB:
Flash used: 199237 of 262144 bytes (76,0%). Bootloader: 132352 bytes. Application: 66629 bytes.
Metadata: 256 bytes. SRAM used: 16828 of 32768 bytes (51,4%). Stack: 1536 bytes. Heap: 9472 bytes.
Strangely also FW update was working which is confusing me as from the Upgradable OTA documentation the
256 kB Flash is split into 2 parts so that the BLE stack should be less or equal than 128kB. Am I correct?
And if yes why does the PSoC Creator 4.2 not give any warning? Would there be enough space for later
BLE stack updates (like going to new BLE standard version)?
2. As I see Bonding information is stored in the section "Checksum exclude" which is deleted each time a
FW OTA upgrade is performed.
In the files "ota_mandatory.c/ota_optional.c" method "AfterImageUpdate()" I have disabled the clearing of
the bonding information. And this is working fine for the BLE app, but saldy not for the BLE bootloader.
I am still investigating why for the BLE bootloader this is not working.
I assume this approach is ok as section "Checksum exclude" is in our control. Also from the documentation
its stated that this section is not overwritten when we perform OTA FW upgrade.
Why this approach is not working on the BLE bootloader? I have checked the Laucher and its clearing only the
metadata section. Also the Loader in the BLE stack does not seems to do anything with this section.
Just to mention that I am using CySmart for all this testing. Could the CySmart be involved in this?
And another idea or question. For the moment we have separata BLE profiles and bonding information. Could
I at first bonding with the BLE app copy the bonding information to the BLE stack section "Checksum exclude"?
Can the BLE App access the BLE Stack section "Checksum exclude" or event better, can BLE App and BLE Stack
use only one, the same section "Checksum exclude"?
3. When performing the FW OTA update using the CySmart v1.3 on the Android mobile phone and using the option
"Application and Stack Upgrade (Combined Files)" we have some problems
to perform OTA FW update when the BLE FW image is build using the ARM GCC 5.4-2016-q2-update and
Compiler->Optimization->Optimization Level set to Size or High. CySmart always responds with error:
"Firmware update cancelled Error: CYRET_ERR_ROW"
Just like a year ago, I was absent from CDC for a couple of weeks.
This time it was the 14th annual FPGA design course at the Ryukoku University.
昨年と同じように今年も先週、先々週と CDC をお休み(?)していました。
今回は14回目になる龍谷大学での FPGA設計講座でした。
FPGA and PSoC Course at Ryukoku University
Every year, I enjoyed the limited time campus life and the goldfish living in the fountain in front of the main building.
毎年、期間限定のキャンパスライフと一号館前の噴水で暮らしている金魚さんたちに会うのを楽しみにしていました。
https://twitter.com/ryukokust/status/1297071003131162624?s=21
But this year, thanks for the COVID-19 all the students were studying from home and the course took place in cyberspace.
So although physically I was in the same location, I could not afford to do anything else.
しかし今年はコロナ禍のおかげで学生さんたちもテレワークで講義を受講しているということで、私の講座もサイバースペースで行われることになりました。
その為、物理的にはいつもと同じ場所にいたのですが、とても他のことをする余裕はありませんでした。
And because of the increased number of attending students, we realized that the number of FPGA boards we had for this course was not enough.
So we needed to switch to the off the shelf FPGA board, which resulted that I needed to redesign and/or update all the circuits in the text and update the text itself. (T^T)
また、諸事情によって受講者が増えた為に、これまでこの講座に使用していた FPGA 基板では数が足りない事が判明しました。
急遽、FPGA 基板を市販のものに変更することになり、教科書の書き直しと全回路の再設計を余儀なくされました。 (T^T)
Anyway I barely made it. Then a couple of days before the first day,
we found that oscilloscopes were not available either. This made me to perform another hack.
何はともあれ、何とかなりそうだ!と思った矢先、本番2日前に(当然ながら)オシロスコープも足りない!ということが判明。
下記 URL のトピックの急ぎ仕事が発生しました。
A Simple Oscilloscope (CY8CKIT-044) using SerialPlotter
And finally the course started.
ようやく講習が開始されました。
The following picture was an error screen of one of the most challenging error, which the student noticed that he gave a wrong name for the project after creating the project and he renamed the project folder from the Windows. And the poor PSoC Creator could not notice the situation when it tried to save the project (to the original location).
下記写真の画面に表示されているエラーは、もっとも手ごわかったものの一つで、プロジェクトを作成した学生さんが、プロジェクト名が教科書と違うことに気が付いてウィンドウズからプロジェクトフォルダ名を変更しちゃったのですが、その時実行中だった PSoC Creator はそれを知るよしもなく・・・
The primary purpose of using an oscilloscope is to show the students bouncing of a mechanical switch.
BUT, thanks for the FPGA board maker's effort, probably they added an external low pass filter (capacitor) to the switch,
on the students' FPGA board bouncing did not take place. orz
Note: My older FPGA board shows the bouncing.
もともとオシロスコープを使用する最初の目的は機械スイッチのチャタリングを観測してもらうことでした。
し か し、FPGA 基板のメーカーさんが頑張っちゃって、チャタリングを除去する外付け回路を追加してくれたようです、
おかげさまでチャタリング発生しないし・・・ orz
※少し古い版の私の FPGA 基板では発生するのですが。
Then I utilized the PSoC 4 oscilloscope with the servo-motor controlling project.
次に、サーボモータ制御のプロジェクトに PSoC 4 オシロを適用してみました。
And we could monitor the change of PWM pulse width.
今回は無事に PWM のデューティが変化することを観測していただくことができました。
Anyway, I'm back in one piece 😉
なにはともあれ、ただいま(?)です (^_^)v
moto
Show LessI'm using CyBle_GapRemoveBondedDevice(clearAllDevices), where clearAllDevices
= {{0,0,0,0,0,0},0}; Problem is that I am always getting an apiresult = 2 (CYBLE_ERROR_INVALID_OPERATION). According to the documentation, this can result from either a pending flash write or whitelist already in use. I've eliminated the first so it seems that it's telling me that the whitelist is already in use. How can I get it to NOT already be in use?
One post said to call api, RemoveDeviceFromWhitelist first. However, information from Cypress engineering says not to use this (soon to be obsolete) api since CyBle_GapRemoveBondedDevice clears both the bonded devices list and the whitelist.
Thanks for any advice you can offer,
Dennis
Message was edited by: Dennis Coburn to clarify the question.
Show LessTo all,
I have place a Windows PC terminal source code in C# on the Code sharing forum.
PC Terminal Program with C# Source Code
Enjoy,
Len
Show LessTo all,
I have place a Windows PC terminal source code in C# on the Code sharing forum.
PC Terminal Program with C# Source Code
Enjoy,
Len
Show LessHi,
This is announcement of the new custom component, Pins Annotation v0.0, which facilitates PSoC pins configuration. It identifies terminals with direct access to PSoC internal hardware and graphically displays pin configuration.
Pins Annotation component for PSoC5 and PSoC4
odissey1
Show Less
I add another note: to obtain the scope I need to know when transmission frame starts to trigger collision detection and there's no signal output from UART component.
Show LessTo all,
I've upload to the Community code share forum a set of custom components that should ease the creation of Terminal user interfaces.
Terminal Support Component Library
Here is a list of the components in the library:
- Term - Terminal (UART) replacement that can be configured as UART or USBUART types for the PSoC5.
- String_Funcs - This is an enhancement of the GetString() function. It is easier to use.
- MenuCmds - This feature was included in the GetString demo code I shared earlier. It is now a component with some improvements.
Len
Show LessHi,
This is announcement for new custom component for interfacing with real-time plotting software SerialPlot:
SerialPlot: interface to real-time data charts
Regards,
/odissey1
Show Less