AnsweredAssumed Answered

Dynamic pin assignment for serial port on Kinetis running MQX 3.8.1

Question asked by Wayne Taylor on Oct 15, 2012
Latest reply on Feb 18, 2013 by alejandrolozano

In the file, init_gpio.c, there is a function, _bsp_serial_io_init() that is used to initialize the hardware pins used by each UART device. The port&pins are hard-coded to a port and mux assignment via a switch statement with no parameters.


On my rev 1 board I want to use Port XYZ Alt N, but on my Rev 2 board I want to use Port PDQ Alt M. I want my CPU to discover what board type I'm running on and use the correct pins for that board. How can I do this at run-time if the function wants them to be hard-coded in the library?