I used the UART3 connector to exchange data between PC an kinets K60 Tower.
Without MQX I ve no problems to read the data via interrupt. Now I try to do the same inside a MQX project.
I used the same interrupt routine as bevore and I exchange the command
enable_irq(51);
with
_int_install_isr(INT_UART3_RX_TX, isr_uart3,isr_ptr);
but I never jump into the isr. The initialization of the UART3 cannot be the problem, cause I used the same routine as in my former non MQX project and a comparison of the register settings shows the same. And I can read the UART receive data by polling. But fortunately my application need a interrupt solution.
I tried the isr example in the mqx directory without problems. In the isr example project there s no problem in jumping to the isr routine.
Instead of
_int_install_isr(INT_UART3_RX_TX, isr_uart3,isr_ptr);
I tried
_int_install_isr(51,isr_uart3,isr_ptr);
or
_int_install_isr(67,isr_uart3,isr_ptr);
and many different other numbers, everything without success.
I read in the forum, that maybe the settings for BSPCFG_ENABLE_ITTYA
BSPCFG_ENABLE_ITTYB
BSPCFG_ENABLE_ITTYC
BSPCFG_ENABLE_TTYA
BSPCFG_ENABLE_TTYB
BSPCFG_ENABLE_TTYC
might be the problem. But I tried many different combinations of 1 or 0 and recompile the BSP project, but everything without success.
So I hope you can help me?
Many thanks
Ulf
Solved! Go to Solution.
UART3 is mapped into TTYD device in MQX. If you would like to use MQX serial driver you can remap default serial console from OSJTAG to TWR-SER uart with using interrupt mode by adding following lines into user_config.h.
#define BSPCFG_ENABLE_TTYD 0
#define BSPCFG_ENABLE_ITTYD 1
#define BSP_DEFAULT_IO_CHANNEL "ittyd:" /* TWR-SER interrupt mode */
#define BSP_DEFAULT_IO_CHANNEL_DEFINED
Other parameters as baud rate ,.... can be changed in init_sci.c file. Then recompile BSP and your application and you can test it. Run hello example application and it will print "Hello World" message into UART3 in interrupt mode.
That s the solution!
Many Thanks
Ulf
UART3 is mapped into TTYD device in MQX. If you would like to use MQX serial driver you can remap default serial console from OSJTAG to TWR-SER uart with using interrupt mode by adding following lines into user_config.h.
#define BSPCFG_ENABLE_TTYD 0
#define BSPCFG_ENABLE_ITTYD 1
#define BSP_DEFAULT_IO_CHANNEL "ittyd:" /* TWR-SER interrupt mode */
#define BSP_DEFAULT_IO_CHANNEL_DEFINED
Other parameters as baud rate ,.... can be changed in init_sci.c file. Then recompile BSP and your application and you can test it. Run hello example application and it will print "Hello World" message into UART3 in interrupt mode.