AnsweredAssumed Answered

Need Clarification of 2.3.1 SDK Examples and MCUXpresso Config

Question asked by Keith Smith on Apr 23, 2018
Latest reply on May 8, 2018 by Daniel Chen

Using MCUXpresso IDE, I have cloned a few 2.3.1 SDK examples for the FRDM-K22F eval board.

I then created the <peripheral, clock_config, pin_mux>.<c,h> files using MCUXpresso Config for the FRDM-K22F eval board.

 

The SDK pin_mux.c file has YAML comments, as do the files generated by MCUXpresso Config.

 

However, the SDK pin_mux.c file seems to be an example minimal version of the Config pin_mux.c.

The SDK files board.<c,h> are the equivalent to peripheral.<c,h> in Config.

 

main() in an SDK example calls

 

BOARD_InitPins();
BOARD_BootClockHSRUN();
BOARD_InitDebugConsole();

 

Using the Config files it appears that main() should call

 

BOARD_InitBootPins();

BOARD_BootClockHSRUN();

BOARD_InitBootPeripherals();   // BOARD_InitDEBUG_UARTPeripheral() called.

 

My goal is to be able to configure all the peripherals I need for a target K22 project. The SDK examples configure only one peripheral per example. My project will need to have multiple peripherals, ADC, GPIO, etc. configured at boot.

 

I believe I could substitute the files from Config for the board/pin_mux/clock_config files in the SDK and call the appropriate functions in main().

 

Is this an expected method to customize an SDK example?

Outcomes