IDE: CW10.3
MQX: 4.0
MCU: K60
Here is my experience for K60
modify _bsp_serial_io_init()
navigation to init_gpio.c
in CodeWarrior Projects window
bsp_twrk60d100m -> twrk60d100m BSP Files -> init_gpio.c
function
/*FUNCTION*-------------------------------------------------------------------
*
* Function Name : _bsp_serial_io_init
* Returned Value : MQX_OK for success, -1 for failure
* Comments :
* This function performs BSP-specific initialization related to serial
*
*END*----------------------------------------------------------------------*/
_mqx_int __bsp_serial_io_init()
here is the setting of AUX for UART0 (for K60)
case 0:
pctl = (PORT_MemMapPtr)PORTD_BASE_PTR;
if (flags & IO_PERIPHERAL_PIN_MUX_ENABLE)
{
/* PTD6 as RX function (Alt.3) + drive strength */
pctl->PCR[6] = 0 | PORT_PCR_MUX(3) | PORT_PCR_DSE_MASK;
/* PTD7 as TX function (Alt.3) + drive strength */
pctl->PCR[7] = 0 | PORT_PCR_MUX(3) | PORT_PCR_DSE_MASK;
}
I think it is the same source code file/function for K40
Leslie