1885121_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

1885121_en-US

1885121_en-US

PWM module does not want to access the custom interrupt routine but always jumps to the default rout

Hi there,

I am working with the FRDM-MCXA153 board.
I´m trying to get an interruot on every rising edge using the standart PWM example portet to c++.
So far so simpe, bit unfortunately the interrupt always wants to jump tot the standart interrupt routine (declared as WEAK) and ignores my self-written one.

The PWM module is configured via ConfigTools -> Peripherals -> FLEXPWM0 and should generate an interrupt at VAL2.

Thanks in advance for your help.

MCXARe: PWM module does not want to access the custom interrupt routine but always jumps to the default

Hi,

if your main-file is written in c++, you need to add extern "C" before your ISR.

Following is a short text I found in the startup file:


//*****************************************************************************

// Forward declaration of the core exception handlers.

// When the application defines a handler (with the same name), this will

// automatically take precedence over these weak definitions.

// If your application is a C++ one, then any interrupt handlers defined

// in C++ files within in your main application will need to have C linkage

// rather than C++ linkage. To do this, make sure that you are using extern "C"

// { .... } around the interrupt handler within your main application code.

//*****************************************************************************


タグ(1)
評価なし
バージョン履歴
最終更新日:
‎11-22-2025 07:11 AM
更新者: