I planned this program to show the minimum usage of the basic components of PSoC
and to help testing a new board or peripheral when application is yet to be written.
このプログラムは PSoC を初めて使用する方に基本的なコンポーネントの使い方をお見せするとともに
新しく作った基板や周辺をアプリケーションが出来る前に試せるようにと考えて作ってみました。
More than a couple weeks has passed since I posted CY8CKIT-044 version of this program.
And what I learned during this period is that PSoC 6 is different from PSoC 4!
Anyway, here is the first PSoC 6 version of this program.
このプログラムの CY8CKIT-044 版を投稿してから、既に2週間以上が経ってしまいました。
その間で学んだことは、PSoC 6 は PSoC 4 とは違う!という事でした。
何はともあれ、このプログラムの PSoC 6 用の初版です。
When you build and program or debug, you will see something like below.
Basically the same help message is displayed.
Except the last one and the prompt.
プロジェクトをビルドして書込むかデバッグを開始すると下記のような表示になります。
基本的に前回のものと同じです、
最後の命令とプロンプトを除いては。
Assuming that the E-Ink Shield is mounted on your CY8CKIT-062-BLE.
Enter "i2c" at the prompt.
Now prompt changes to "CM0P:i2c>"
Enter "scan" to scan the I2C bus... it finds a device at 0x68, which is the BMI160 on the E-Ink Shield.
We can read its ID from the register address 0.
So enter "readreg 0", then expected ID of D1 is returned.
CY8CKIT-062-BLE に付いてくる E-Ink シールドを接続した状態で
プロンプトに "i2c" と入力します。
するとプロンプトは "CM0P:i2c>" にかわります。
更に "scan" と入力すると I2C バス上にあるデバイスを探し始め... 0x68 にデバイスがあることが分かります、
これは E-Ink シールドに乗っている BMI160 センサーです。
このセンサはレジスタアドレス 0 を読むと ID を返すことになっています。
そこで "readreg 0" と入力すると、予定通り ID の D1 が返されました。
Now let's try the catch of the day!
Either push "reset" key or Enter "return" to return to the "CM0P:>" prompt.
Then enter "cm4" to switch the core to the CorTex-M4.
The splash says that it is "MCU Tester (CM4)..." and the last command is now "cm0".
Here we can use all commands in the previous mode, except "cm4".
For example, if you enter "i2c" same set of commands are available.
それでは今回の目玉を実験しましょう!
基板の RST ボタンを押すか、"return" コマンドを入力して "CM0P:>" プロンプトに戻ってください。
そこで "cm4" と入力すると、使用コアが CorTex-M4 に変わります。
オープニングメッセージも "MCU Tester (CM4) ..." となってコマンドリストの最後は cm0 に変わっています。
ここで cm0 の時に使えたコマンドは cm4 を除き全て同様に使用できます。
例えば ”i2c" と入力すると I2C モードで使用できた全てのコマンドがここでも使えます。
To return the root prompt, enter "return".
Then enter "mem" to test the Memory Mode.
According to the TRM of PSoC 6/62 SRAM seems to be starting from 0x08000000.
So please enter "dump 0x08000000" to see what in the memory now.
トップレベルのプロンプトに戻るには、"return" を入力します。
次にメモリーモードを試したいので、"mem" と入力してください。
PSoC 6/62 の TRM によると、SRAM は 0x08000000 から始まっているようなので
"dump 0x08000000" と入力して、今、メモリーの中に何が入っているのか見てください。
Enter "return" to go back to the root prompt.
Then enter "cm0" to switch the core to CorTex-M0+.
Now we are home.
再度、トップレベルのプロンプトに戻るのに "return" と入力してください。
その後、"cm0" と入力すると CorTex-M0+ のコアに戻ることができます。
ただいま!
To explain all the commands will take some time and energy, so let me cheat by saying that...
For other commands, please refer to the page of the previous version below.
コマンド全ての説明はかなり長くなってしまいますので、各コマンドについては
先のヴァージョンの説明がある以下の URL をご参照ください。
MCU Tester, a Swiss Army Knife for PSoC (CY8CKIT-044 version)
moto
27-May-2020 First introduction lines were added
28-May-2020 Sensor name corrected to BMI160
28-May-2020 There were source/header for spi and i2c missing with the first attachment. Attached file was replace with 200528A version.
Hello:
I am trying to add a custom service to the example code in CE217643 i.e. the BLE Temperature Measurement
with PSoC 6 MCU with BLE Connectivity, Health Thermometer Profile example application.
I have added a custom service to the ble GATT server via the schematic BLE block parameters tool.
The custom service has only one custom characteristic, the default uint8 field with read prosperities set.
The custom descriptor had one field the uint8 default.
I was looking for where the event handler or callback was/is for the custom service so I could access the custom characteristic value.
Why in the generated code module cyble_custom.c function Cy_BLE_CUSTOM_EventHandler... is there no code for handling a CY_BLE_CUSTOM_SERVER that my example is?
How ? and where ? do I write the Cy_BLE_CUSTOM_EventHandler for a CY_BLE_CUSTOM_SERVER?
What events in the handler do I need to look for, and what is in them?
Thanks Brian
Show LessHi,
I am uploading annotation component for the CY8CKIT-042 PSoC4 Pioneer Kit.
The component helps visualizing ports and pins and creating connection diagrams for CY8CKIT-042 PSoC4 Pioneer Kit. It shows pins with direct connection to the ADC_SAR bypass capacitor, OpAmps, USB-I2C bridge, USB-UART bridge, RGB LEDs, Capsense pad, Switch and PMOD connector.
The KIT-042 annotation component can be used in conjunction with Cypress stock annotation components (capacitors, resistors, etc.) as well as small-sized annotation components from the complimentary PSoC Annotation Library:
Attached archive contains KIT-042 component library. Upon installation it will show up in the folder:
/Community/Off-Chip/Annotation Library/Kits/
The component provided as-is, no liabilities. It is free to use, modify and distribute.
regards,
odissey1
Figure 1. Component default appearance
Figure 2. Typical component use in conjunction with complimentary PSoC Annotation Library (Diffeferntial pre-amp example).
As per the current implementation of PSoC4 BLE upgradable stack OTA example project, bonding data is not shared between "Application" and "Stack" projects.
So that, user has to connect and bond again with stack project before performing firmware update over the air.
Steps to be followed to perform firmware update over the air
Both "Application" and "Stack" projects store bonding data at different locations. That is the reason why user need to connect and bond with the stack project before performing firmware update over the air.
The solution is to make the "Application" and "Stack" projects share the bonding data between them. Below steps are followed to share the bonding data between "Application" and "Stack" projects. Both “Application” and “Stack” projects store the bonded device list in the structure “cyBle_flashStorage” separately.
Changes made to the Upgradable Stack OTA example project.
Updated project is attached with this post.
Show LessI am trying to get the DebugPrintf function working in CE220331 example project, and do not get anything via Tera Term.
I have enabled #define UART_DEBUG_ENABLE (true) in uart_debug.h .
Any hints would help.
Thanks
Brian
Show LessHi,
I tried to translate this KBA222854 into Japanese.
Warning Message When Selecting PSoC 4 CapSense Sense Clock Source – KBA222854
==========
タイトル:PSoC 4 CapSenseクロックソースを選択する際の警告メッセージ
バージョン:**
質問:
下図に示すように、CapSense のセンスクロックソースとしてPRS12またはPRS8を選択すると警告メッセージを受けるのはなぜですか?
回答:
選択(PRSまたはSSC)に関係なく、センスクロックはLFSRシーケンスを完了するためにダイレクトセンスクロックよりも長い時間を必要とします。
PRSセンスクロックの場合、PRS(N) の完了時間は (2N-1) / (センスクロック周波数) に等しくなります。計算された時間がセンサのスキャン時間よりも長い場合、図で示すような警告メッセージを受けます。
CapSenseのパフォーマンスを保証するには、スキャン時間中に少なくとも1つのフル スペクトル拡散多項式を完了する必要があります。
例:
ModClock = 12 MHz
SenseClock (Average) = 300 kHz
Scan Resolution = 14 bits
Sensor Scan Time (TSCAN) = (214-1) / 12 MHz = 1365.25 µs
Time to complete PRS8 (TPRS8) = (28-1) / 300 kHz = 850 µs
Time to complete PRS12 (TPRS12) = (212-1) / 300 kHz = 13650 µs
TSCAN < TPRS12 および TSCAN > TPRS8 であるため、CapSenseコンポーネントのセンスクロックソースとしてPRS8を選択しても警告を受けませんが、PRS12を選択すると警告メッセージを受けます。
自動モードを使用して、与えられた構成に対して最適なクロックソースが選択されるようにする事を推奨します。
参照:
PSoC® 4 and PSoC Analog Coprocessor CapSense® Design Guide
PSoC 4 Capacitive Sensing (CapSense®) Datasheet
==========
BR,
Omoi
Show LessHi,
I'd like to translate KBA226869 into Japanese.
moto
Original KBA: KBA226869
Effects of Design Wide Resources - Operating Conditions on PSoC Analog Section – KBA226869
Being Translated by: MoTa_728816
==============================
タイトル:デザインワイドリソース (DWR) の影響 - PSoC アナログ部の動作条件 - KBA226869
ヴァージョン:**
質問:
PSoC® Creator™ の デザインワイドリソース (DWR) の影響 - PSoC アナログ部の動作条件はアナログ部の動作にどのような影響を与えますか?
回答:
DWR の system エディタはさまざまなシステムプロパティを設定するのに使用されます。動作条件 (Operating Conditions) は DWR のカテゴリーのひとつです。動作条件の設定はデバイスが使用される電圧や温度範囲を指定します。さまざまなコンポーネントがこれらの値を設定情報として使用します。これらの値はアナログ部品にいろいろな形で影響を与えますが例えば:
さらに、これらの値はチャージポンプを有効にするかの指針にもなります。例えば、 SAR ADC では、VDDA が低い(4V未満)の場合にデータシートのAC特性規格を満たすために SAR ポンプを有効にする必要があります。VDDA の低いアプリケーションでは、コンポーネントを正常に動作させるために DWR の system 設定の VDDA が正しく設定されていることをご確認ください。アナログでは、VDDA が誤って設定されていると広範囲におよぶ問題の原因となります。チャージポンプを使用するコンポーネント (例えば SAR ADC) の想定外の動作から始まって、この値を動作時に参照するコンポーネント API (例えば ADC であれば、ADC_CountsTo_Volts() API) の誤った結果等が挙げられます。
==============================
30-Apr-2020
Motoo Tanaka
Show LessHi,
I will translate this KBA into Japanese.
There is no KBA number.
Need for Type-C Controller on Type-C to Type-A Cable
https://community.cypress.com/docs/DOC-10767
Best regards,
obana
Show LessHi,
I tried to translate this KBA222076 into Japanese.
How to Watch Variables in Real Time for PSoC 4 Debug – KBA222076
==========
タイトル:PSoC 4 デバッグでリアルタイムに変数を監視する方法
バージョン:*A
質問:
PSoC 4デバッグで、リアルタイムに変数を監視するにはどうすればよいですか?
回答:
PSoC Creatorは、変数をリアルタイムに直接監視することをサポートしていません。PSoC Creatorのデバッグモードでは、変数を監視するために、ブレークポイントを使用するか、「実行を停止」ボタンを手動でクリックしてデバッグを停止する必要があります。
PSoC 4デバッグでリアルタイムに変数を監視するには、以下のいずれかの方法を使用します:
方法1:ソフトウェア送信UARTコンポーネントとUSB-UARTブリッジを使用する
ソフトウェア送信UARTコンポーネントを使用すると、変数データをカスタマイズされたバッファーにロードし、SW_Tx_UART_PutArray(const uint8 array [], uint32 byteCount)
などのソフトウェア送信UART APIによってデータを送信できます。その後、USB-UARTブリッジを介してターミナルアプリケーションで変数を監視できます。SCB UART / I2C / SPIコンポーネントと比較して、ソフトウェア送信UARTコンポーネントはチップのリソース消費が少なく、ピンアサインはより柔軟です。ソフトウェア送信UARTコンポーネントの使用方法の詳細については、PSoC Creator の SW_TX_UART_Example を参照してください。
方法2:サードパーティのデバッガーとIDEを使用する
変数をリアルタイムに監視することは直接は利用できませんが、PSoC CreatorはプロジェクトをEclipse、IAR、µVisionなどの多くの一般的なサードパーティIDEへのエクスポートをサポートしています。これらのIDEの一部は、リアルタイムでの変数の監視をサポートしています。また、サードパーティのIDEのデバッグ機能を検討する際には、サードパーティのデバッガが必要になる場合があります。
参照:
Software Transmit UART (SW_Tx_UART) Component datasheet
CE95379 - Software based UART transmit with PSoC 3/4/5LP
PSoC Creator 101: C. IDE Export
==========
BR,
Omoi
Show LessEmployee
Esteemed Contributor
Esteemed Contributor
Honored Contributor II
Honored Contributor
Valued Contributor II
Honored Contributor
Valued Contributor
Honored Contributor
Contributor