multiple instances of debug console

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

multiple instances of debug console

Jump to solution
696 Views
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.

Labels (1)
0 Kudos
1 Solution
478 Views
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.

View solution in original post

2 Replies
479 Views
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.

479 Views
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 Kudos