element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Smart Spaces Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Smart Spaces Design Challenge
  • More
  • Cancel
Smart Spaces Design Challenge
Forum DDS Elevator - Hello World!!!
  • Forum
  • Projects
  • DC
  • Leaderboard
  • Files
  • Members
  • More
  • Cancel
  • New
Join Smart Spaces Design Challenge to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 4 replies
  • Subscribers 36 subscribers
  • Views 82 views
  • Users 0 members are here
  • MCXA153
  • NXP FRDM MCX A
  • NXP FRDM MCX A & MCX N development kit.
  • MCXN236
Related

DDS Elevator - Hello World!!!

balajivan1995
balajivan1995 1 day ago

First Impressions

The boards are of really good quality. Offering much processing power, expandable headers, these boards could be used as a drop-in replacement for Arduino Uno boards (We will talk about library support later). Each board comes with its own USB C cable to power up the boards, hopefully we will be able to drive more power using USB C connection.

FRDM A153 board

A153 board operating at a modest 96mhz is packs more peripheral compared to similar priced microcontrollers. But most of the peripherals are not exposed to keep the Arduino form factor.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

FRDM N236 board

N236 board operates at 150mhz, supports CAN transceiver, audio inputs (Audio Jacks are not soldered by default), LCD connector. Among the two boards, this is the bigger one with whole lot of peripherals and a huge add on flash memory.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image


Software and SDK

MCUXpresso

MCUXpresso is the dedicated IDE for MCUX series of microcontrollers from NXP. Like every other IDEs this is also a clone of Eclipse IDE. MCUXpresso looks like a rebranded LPCXpresso and comes prepacked with SDK for LPC microcontrollers. To be honest I lost track of all the IDEs NXP has for its broad range of microcontrollers and microprocessors (Kinestis, DS).

Creating a new project

  1. We have an opening page where we select which controller or board we want to program.
  2. One thing different compared to other mainstream MCU IDE, we will have to select our library for the peripherals before even selecting the pins.
  3. NXP not only provides SDK, they also provide a HAL layer, device specific adapter, FREERTOS and CMSIS library as well.
  4. The basic template has lots of drivers and libraries enabled by default which might feel a bit bloated, for example GPIO and UART adapter and a debug library are enabled by default.
  5. Give the project a name and select finish to create the project.
  6. Now comes the pin selection. You can select “Pins” tab and select the required pins or select pins which are grouped to a specific peripheral.
  7. Once the pins are selected, we need to enable the clock for the peripheral. The peripherals are neatly organised and placed one after another. There is also a search option to look for the specific peripheral in case it’s hard to locate a peripheral among the lot. Enable the required peripheral.
  8. Switch to “Component” view. From here we can select the driver for our required peripheral, if we have selected CMSIS from the welcome page, we can see it listed here as well. Select the required one and click generate code.
    1. Component page offers a variety of ways to configure a peripheral when device specific component is selected and the SDK components can be modified anytime.

      1. Polling – Standard blocking way of sending/receiving data
      2. Interrupt – Standard interrupts set by using interrupt flags.
      3. Transfer – Provides blocking as well as non blocking API with support for interrupts
      4. DMA – for transferring huge amount of data faster, supports interrupts.
    2. When CMSIS is selected, we see only two options mostly

      1. Interrupt
      2. DMA

Note on Arduino support

Unlike other mainstream controllers which has support for Arduino Core, MCX series doesn’t have Arduino support. The board has Arduino form factor headers, and Arduino compatible pins, but libraries available for Arduino needs to be ported.
If you are comfortable working with Zephyr, MCXN has a rich and steady support for Zephyr, I would say like Nordic Semiconductors they are also actively pushing for Zephyr + West build. (NXP is one of the six founding member of The ZephyrTm Project). Since setting up Zephyr and west on a windows laptop is a migraine inducing feat that stresses both my laptop’s storage and my patience, I decided not to go there unless I am left with no other option.


Test Projects

Since I am new to MCXA/MCXN NXP family of microcontrollers, I started by exploring the GPIOs and UART first.

LED Blink

MCXA153 board comes with a RBG LED and 3 push buttons (labelled as switches). We will see how to set/clear a GPIO as well as read input using polling mechanism.
We can see how NXP tried their best not to look like a copy of ST’s HAL library as well.
APIs to initialize a GPIO pin, perform set and clear operations on a GPIO Pin for ST range of MCU

void HAL_GPIO_Init(GPIO_TypeDef  *GPIOx, GPIO_InitTypeDef *GPIO_Init)
HAL_GPIO_WritePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState)

APIs to initialize a GPIO pin, perform set and clear operations on a GPIO Pin for NXP MCXN/MCXA

void GPIO_PinInit(GPIO_Type *base, uint32_t pin, const gpio_pin_config_t *config)
static inline void GPIO_PinWrite(GPIO_Type *base, uint32_t pin, uint8_t output)

Maybe I am used to ST’s version, using “GPIOx” makes more sense than “base”.

I have created a brief tutorial on how to use the GPIOs.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Hello World

In this video I cover how to enable the pins for LPUART0 and how to send/receive message using polling mechanism.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

While we can use the blocking send function to send a message, using blocking receive is practically not at all useful as we won’t know exactly when we will receive a message. We will cover non-blocking receive in upcoming posts.

Timing and Delay

No Embedded project will be complete without using delays, be it either blocking or non blocking. MCX series provides us with Sysclock using which we can trigger an interrupt on nano second level.
Since we won't need that much accuracy and millisecond level timing is enough for most tasks, we will configure the sysclock to generate an interrupt every milli second.

SysTick_Config(96000000);

Copy the callback function and place it in main file.
static uint32_t ms = 0;
void SysTick_Handler(void)
{
    ms++;
}

uint32_t getMillis()
{
    return ms;
}


Since we shouldn’t hog the interrupt call back function, we will just increment a variable by 1 which will act as our timer, something similar to Millis() on Arduino or getMillis() on ST family.
For blocking delay, we will use the below function. You can refer the below code to see how to use the counter as both blocking and non-blocking delay.

void delay( uint32_t delayInMs)
{
    uint32_t currentTimeInMs = ms;
    while( ( ms - currentTimeInMs ) <= delayInMs )
    {
        ;
    }
}

void someFunc()
{
    static uint32_t prevTimer = 0;
    if( ( ms - prevTimer ) > 1000 )
    {
        prevTimer = ms;
        
        // Do something
    }
}


Thumbs up for

  1. MCXN236 board provides a lot of power and several 5v/3.3v options. Meaning we can power our sensors, output devices directly from it.
  2. If we select the board option in project create page, we can see the Arduino/MicroE interface showing up as an option to select the pins. Which helps us in narrowing the required pin as we know where it is located.
  3. The Clock configuration is really smooth. Compared to some other Microcontroller IDEs which does some calculation based on user input, and sometimes not at all work properly, leaving new users confused (cough, STM32 cough), MCUXpresso lists preconfigured clocks that works well and selecting it is quite easy.
    image
  4. Whether to use a callback when some interrupt happens is entirely up to you. During the peripheral selection, we have the option to enable or not use callback.
    image
  5. Let's say, we need to make some changes in a peripheral, now before generating the code we have an option to compare our existing code with the newly configured code. This is a really good option that allows us to verify whether we are adding some feature unnecessarily or removing a required one.
  6. image
  7. Support for CMSIS library is really good as well, especially for some peripherals you just need a high-level library, and interrupts to know the job is done. Which is much better than combing through several implementations for the same peripherals.

Thumbs down for

There are some bugs that needs to be fixed in the IDE and mistakes in schematic. Below are the few I encountered.

  1. There is no mild way for putting this nicely, if you select the default template to generate application, it will be bloated. Either you need to include everything from adapter, peripheral, common library to build an application that just blinks for a sec, or you will have to use their single header that has all the register you need to build from scratch. There is no in-between.
  2. Let’s say, we are planning to create a new project with new board, if we open the configuration page for the new board while keeping the previous project open, it will throw an error saying “Microcontroller Not found”. We will have to close every other project and select the configuration page.
  3. If you have previously configured the project to use CMSIS or Freertos, now want to remove or replace that component, after removing the previously selected components from Component page, if you try to build, it will throw error. Because the library files are still present in the components folder and needs to be manually removed.
  4. Even though the peripheral tab should list all the pins that can be used for that particular peripheral, CAN1 TX/RX pins are not showing up here. But if we select the Pins tab and select the pins manually, we can see CAN1 TX/RX showing up there.
  5. If you connect both boards at same time, it doesn’t automatically detect which one to flash. It will try to flash the first device it finds in LinkServer application.
  6. There are some times when debugging straight up fails or the values are not getting updated properly.
  7. These are all not a deal breaker in anyway, but this gets annoying when you have two boards and switching from one project to other or importing example projects to explore the peripherals.

Quick links

MCXA153 MCXN236
Product Page MCXA153 MCXN256
Schematic MCXA153 MCXN256
Datasheet MCXA153 MCXN256
Reference Manual MCXA153 MCXN256
SDK reference MCXA153 MCXN256

Conclusion

All in all, these boards are really worth for that price point. The MCXA153 is quickly becoming my favourite dev kit and I am excited to start interfacing all the modules together to finish my project.

  • Sign in to reply
  • Cancel

Top Replies

  • veluv01
    veluv01 1 day ago +2
    Nice and detailed post!
  • beacon_dave
    beacon_dave 1 day ago +2
    Did you really mean Thumps Up/Down ? Thumbs Up Thumbs Down Nice overview of the microcontroller board. There are so many out there now, that it's getting hard to keep up.
  • shabaz
    shabaz 1 day ago +2
    Nice work. They look like interesting parts, most NXP microcontrollers are good I feel. And nice to see the FRDM boards are back to a low cost (some of them reached very high prices in the past, which…
Parents
  • shabaz
    shabaz 1 day ago

    Nice work. They look like interesting parts, most NXP microcontrollers are good I feel. And nice to see the FRDM boards are back to a low cost (some of them reached very high prices in the past, which put me off using some of them).

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • shabaz
    shabaz 1 day ago

    Nice work. They look like interesting parts, most NXP microcontrollers are good I feel. And nice to see the FRDM boards are back to a low cost (some of them reached very high prices in the past, which put me off using some of them).

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube