init_gpio and pin choice for uart using MQX 3.8

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

init_gpio and pin choice for uart using MQX 3.8

ソリューションへジャンプ
858件の閲覧回数
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 解決策
341件の閲覧回数
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 返答(返信)
342件の閲覧回数
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

341件の閲覧回数
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 件の賞賛