multiple instances of debug console

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

multiple instances of debug console

跳至解决方案
1,402 次查看
thiagopalmieri
Contributor III

Is is possible to use multiple instances of debug console?

 

I am trying to use the debug console on two "serial" ports, the USB CDC virtual com, and LPUART0. My main reason for that is SCANF, which is available on the FSL_DEBUG_CONSOLE component.

 

I'm able to set it for one or another, and it works fine, but when I try to add another debug component so I can activate both "serials", the KDS complains that only one is supported.

 

Is there a way to do that?  I can think of three alternatives (in order of preference):

 

1. Add another component. (how?)

2. Re-init the component when I change "serials", pointing it to the corresponding "serial".

3. Or keep the debug component on one of then (USB CDC) and write a "SCANF" function and use it on a FSL_LPUART component.

 

I'm using MKL43Z with FreeRTOS.

 

Thanks.

标签 (1)
0 项奖励
回复
1 解答
1,184 次查看
EarlOrlando
Senior Contributor II

Hello Thiago,

It is supported just one instance at the same time. I think that the best alternative is the second one that you listed above. You can De-Init a component by calling the function DbgConsole_DeInit and then Re-Init the module by calling the functions configure_uart_pins and DbgConsole_Init as they are called in the function dbg_uart_init.

Please let me know if this information is useful or if I can do anything else for you.

Best regards,

Earl Orlando.

在原帖中查看解决方案

2 回复数
1,185 次查看
EarlOrlando
Senior Contributor II

Hello Thiago,

It is supported just one instance at the same time. I think that the best alternative is the second one that you listed above. You can De-Init a component by calling the function DbgConsole_DeInit and then Re-Init the module by calling the functions configure_uart_pins and DbgConsole_Init as they are called in the function dbg_uart_init.

Please let me know if this information is useful or if I can do anything else for you.

Best regards,

Earl Orlando.

1,185 次查看
thiagopalmieri
Contributor III

Hello Earl Orlando,

Thanks for the support. The solution indeed works, but it did not suited my implementation, so I've gone for option 3 and implemented the PRINTF and SCANF on top of a FSL_UART component.

Now I can use PRINTF/SCANF with USB and a Serial port simultaneously.

Thanks for the support anyway !

0 项奖励
回复