init_gpio and pin choice for uart using MQX 3.8

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

init_gpio and pin choice for uart using MQX 3.8

Jump to solution
840 Views
Fabi
Contributor III
Hello, I'm beginner in using MQX 3.8. I want to use another pins for uart RX/TX than defined in init_gpio.c (e.g. not PTD6/PTD7, but PTB16/PTB17 for uart0 at MK60N512). What's the smartest solution. Because of 'hard wired' flags in serl_pol_kuart.c@419, the only solution is to alter the mux table after calling fopen for the uart port, isn't it?
1 Solution
323 Views
MarkP_
Contributor V

Hi,

I have changed the port and pin code directly into init_gpio.c: _bsp_serial_io_init().

I think that MQX-team has designed that the file init_gpio.c contains HW-dependant code,

which should be tailored to suitable for own HW.

Remove also the switch-cases for dev_num/ports which are not included in your HW.

~Mark

View solution in original post

2 Replies
324 Views
MarkP_
Contributor V

Hi,

I have changed the port and pin code directly into init_gpio.c: _bsp_serial_io_init().

I think that MQX-team has designed that the file init_gpio.c contains HW-dependant code,

which should be tailored to suitable for own HW.

Remove also the switch-cases for dev_num/ports which are not included in your HW.

~Mark

323 Views
Fabi
Contributor III

Hi,

Mark, TY for reply. You are right. The BSP contains the project specific (user) files. Your suggestion solves it.

- Falko

0 Kudos