I am working on Keil uvision 4, ulink2, k61, cpu clock is 120 MHZ, MQX 4.0.2.
I want to use printf() and display the information on debug(printf) viwer. So I enable the io debug function in MQX.
#define BSPCFG_ENABLE_IODEBUG 1
#define BSP_DEFAULT_IO_CHANNEL "iodebug"
I also followed the instructions in "Getting Started with Freescale MQX™ RTOS and MDK-ARM Keil™ μVision® 4 Rev. 02 " to enable the ITM communication channel.
Now I have two questions.
First, when function _io_debug_itm_write_char() sends a character to ITM, nothing displayed on debug(printf) viewer window. Is there any configuration needs to be done?
Second, the debug(printf) viewer window keeps display garbage data. The data is not coming from printf(), because I set break point in printf(), but it is not stopped. The picture is attached. Anybody has any idea about it?
Thanks in advance.
From my point of view it looks like problem with baud rate.
Could you please try setting bus clock value instead of core clock value in target driver setup window?
I would like to recommend route bus clock to some pin, measure exact frequency and recalculate real Core clock trough dividers settings.
Best Regards,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Anyone can help me? Who is the boss? administrator? Thanks!