CSD2X Interrupt_2

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
RyYo_1406951
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

CSD2X Interrupt のつづきで記載しております。

「CY3280_22X45_SLM」のサンプルプロジェクトを動かしております。

しかし、「_CSD2X_1_L_ISR と _CSD2X_1_R_ISR」の割り込みが発生しません。

※ブレークポイントを置いているのですが、割り込み関数内で止まりません。

これらの割り込みを使用する際に何か、レジスタの設定を変更する必要があるのでしょうか?

0 Likes
7 Replies
Anonymous
Not applicable

CSD2Xユーザーモジュール構成で "BackGroundScannning"を有効にしていましたか?

"BackGroundScanning"を有効にして、割り込みが発生するかどうかを確認してみてください。

以上よろしくお願いいたします。

Nada

0 Likes

>CSD2Xユーザーモジュール構成で "BackGroundScannning"を有効にしていましたか?

>"BackGroundScanning"を有効にして、割り込みが発生するかどうかを確認してみてください。

⇒"BackGroundScanning"を有効にすることで割り込みが発生しました。

"BackGroundScanning"は、CSD2X ver3.00から使用できますが、

CSD2X ver2.5("BackGroundScanning"なし)を使用して、

割り込み(CSD2X_1_L_ISR と _CSD2X_1_R_ISR)を発生させるにはどのようにすればよろしいでしょうか?

0 Likes
Anonymous
Not applicable

デバッグによりCSD2X ver2.5で割り込みが発生していないことを確認しましたか?

割り込みサービスルーチンでカスタムコードを追加し、メインループ内のmycountが0以外になれるかどうかを確認してみてください。

_CSD2X_1_L_ISR:

   ;@PSoC_UserCode_R_ISR@ (Do not change this line.)

   ;---------------------------------------------------

   ; Insert your custom code below this banner

   ;---------------------------------------------------

   ;   NOTE: interrupt service routines must preserve

   ;   the values of the A and X CPU registers.

add [mycount],1 

;---------------------------------------------------

   ; Insert your custom code above this banner

   ;---------------------------------------------------

   ;@PSoC_UserCode_END@ (Do not change this line.)

   Reti

本件に関して、もう少し検討しますので詳しく回答するまでに日数を要する可能性がございます。

ご了承頂きますようお願いいたします。

Nada

0 Likes

>デバッグによりCSD2X ver2.5で割り込みが発生していないことを確認しましたか?

>割り込みサービスルーチンでカスタムコードを追加し、メインループ内のmycountが0以外になれるかどうかを確認してみてください。

⇒ISR内にブレークポイントを設置し、デバッグしたところ、ブレークポイントで止まりませんでした。

 mycountの値も変化ありません。

0 Likes
Anonymous
Not applicable

本件に関して時間がかかってしまい、大変申し訳ございません。

CSD2X_L_ISRまたはCSD2X_R_ISRの割込み処理すると、CSDユーザモジュールの通常の動作が妨げられます。 CSDユーザモジュールは、これらの割り込みの割り込みフラグがアクティブであることを期待し、対応するISRを実行されなくなります。したがって、これらの割り込みはマスクされます。これらの割り込みを処理することにより、割り込みフラグがクリアされ、CSDユーザーモジュールのポーリングが中断されます。CSD2X_L_ISRまたはCSD2X_R_ISRの割込み処理はCSDの通常の動作を妨げるため、推奨しません。

バージョン3.10では、バックグラウンドスキャンを導入し、このバージョンのCSDユーザモジュールでは、ユーザモジュールISRが実行されます。 ユーザーは、ISRのカスタムコード部分を使用して、フラグの設定や値のインクリメント/デクリメントなどのいくつかの命令を実行できます。

Handling the CSD2X_L_ISR or the CSD2X_R_ISR interferes with the normal operation of the CSD User Module. The CSD User Module expects to see the interrupt flags of these interrupts active, and not execute the corresponding ISR. Hence, these interrupts are masked. By handling these interrupts, we clear the interrupt flags, and disrupt the polling in the CSD User Module. Our advice is not to handle these interrupts, as they interfere with the normal operation of the CSD.

In version 3.10 we have introduced Background scanning. In this version of the CSD User Module, the User Module ISRs are executed. Customer can use the custom code portion of the ISR to execute a few instructions, such as setting a flag, or incrementing / decrementing a value.

以上、よろしくお願いいたします。

Nada

0 Likes

>CSD2X_L_ISRまたはCSD2X_R_ISRの割込み処理はCSDの通常の動作を妨げるため、推奨しません。

⇒CSD ver2.5を使用しておりますが、なぜ推奨しない割り込みハンドラ(関数)がPSoCDesignerで生成されるのでしょうか?

 仕様でしょうか。

0 Likes
Anonymous
Not applicable

割り込みハンドラはCSD v 2.5に設計されているため割り込みハンドラがPSoC Designerでを生成しますが、割り込みは有効になっていません。 ただし、この制限はv3.1で修正されています。 バックグラウンドスキャンと適切な割り込みハンドリングもv3.1で導入されました。

PSoC Designer generates interrupt handlers, because it is designed into CSD v 2.5, but the interrupts are not enabled. However, this limitation was rectified, and in v3.1, we introduced background scanning and proper interrupt handling as well.

以上、よろしくお願いいたします。

Nada

0 Likes