init_gpio and pin choice for uart using MQX 3.8

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

init_gpio and pin choice for uart using MQX 3.8

跳至解决方案
855 次查看
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 解答
338 次查看
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

在原帖中查看解决方案

2 回复数
339 次查看
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

338 次查看
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 项奖励