Skip to content

KeilChris/Blinky_FRDM-MCXN947

Repository files navigation

Blinky project for FRDM-MCXN947 (Core 0)

The Blinky project can be easily used to verify the basic tool setup:

  • In the beginning, vioLED0 blinks in 1 sec interval.
  • Pressing vioBUTTON0 changes the blink frequency and start/stops vioLED1.
  • printf messages are shown on the serial console.

The output of the serial console can be observed via the SERIAL MONITOR in Visual Studio Code.

Refer to Project Configuration for board specific settings.

Prerequisites

The following tools need to be installed on your machine:

Build solution

Using Keil Studio

The following is written for Keil Studio, a set of VS Code extensions.

Required tools described in file vcpkg-configuration.json should be automatically installed by vcpkg. You can see the status of vcpkg in the status bar.

Required CMSIS packs need to be also installed. In case a required pack is missing, a notification window will pop-up to install the missing pack.

Open the CMSIS view from the side bar and press the Build button.

Using command line interface (CLI)

Download required packs (not required when the packs are already available) by executing the following commands:

csolution list packs -s Blinky.csolution.yml -m > packs.txt
cpackget update-index
cpackget add -f packs.txt

Build the project by executing the following command:

cbuild Blinky.csolution.yml

Run and debug in Keil Studio

Run

  • Connect the board's MCU-LINK USB to the PC (provides also power).
  • Open the 'CMSIS' view from the side bar and press the 'Run' button and wait until the image is programmed and starts running.

Debug

Open the CMSIS view from the side bar and press the Debug button. In the Debug view, use the SERIAL MONITOR to connect to the board's serial port with 115200 baud rate and observe the output.

RTOS awareness is available through the XRTOS view in the bottom panel.

Project configuration

Keil RTX5 real-time operating system

The real-time operating system Keil RTX5 implements the resource management.

It is configured with the following settings:

Refer to Configure RTX v5 for a detailed description of all configuration options.

CMSIS-Driver configuration

This example uses virtual I/Os to map physical board hardware using the CMSIS-Driver VIO API.

CMSIS-Driver VIO Physical board hardware
vioBUTTON0 Wake up button (SW2)
vioLED0 User LED Red (RGB)
vioLED1 User LED Green (RGB)

Other settings

STDIO is routed to a debug console through a virtual COM port (MCU-Link, baudrate = 115200).

About

Blinky example for the NXP FRDM-MCXN947 board

Topics

Resources

Stars

Watchers

Forks