How to modify the interrupt vectors, using FRDM K64, sdk 2.0 with freertos ?

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

How to modify the interrupt vectors, using FRDM K64, sdk 2.0 with freertos ?

ソリューションへジャンプ
1,569件の閲覧回数
RaAolCortAcsMat
Contributor III

Do you have some examples using SW buttons in FRDMK64 with interrupts, SDK2.0 and freertos ?

ラベル(1)
0 件の賞賛
返信
1 解決策
1,166件の閲覧回数
Jmart
NXP Employee
NXP Employee

Raul,

Here's a simple example that will read the SW2 input and then change the color and frequency of the LED flash. This example builds off of the FrerRTOS hello world example that is shipped with SDK 2.0. You should be able to replace the freertos_hello.c file, build, and download to your target board.

The key points to enable the SW interrupt functionality can be round in the init_sw2() function.

This function will:

  • enable the clock for the SW2 port
  • setup the pin mux as GPIO
  • enable the port and system interrupts
  • set the GPIO as an input.

Once all of these steps are complete, the only step left is to add the IRQ handler to override the default weak implementation in the startup file. Don't forget to clear the interrupt before leaving your interrupt function.

Jason

元の投稿で解決策を見る

2 返答(返信)
1,167件の閲覧回数
Jmart
NXP Employee
NXP Employee

Raul,

Here's a simple example that will read the SW2 input and then change the color and frequency of the LED flash. This example builds off of the FrerRTOS hello world example that is shipped with SDK 2.0. You should be able to replace the freertos_hello.c file, build, and download to your target board.

The key points to enable the SW interrupt functionality can be round in the init_sw2() function.

This function will:

  • enable the clock for the SW2 port
  • setup the pin mux as GPIO
  • enable the port and system interrupts
  • set the GPIO as an input.

Once all of these steps are complete, the only step left is to add the IRQ handler to override the default weak implementation in the startup file. Don't forget to clear the interrupt before leaving your interrupt function.

Jason

1,166件の閲覧回数
RaAolCortAcsMat
Contributor III

Jason

I was missing

  • setup the pin mux as GPIO

Thanks

Raul

0 件の賞賛
返信