Keil uvision 4, ulink2, k61, printf to debug(printf) viewer is garbage

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

Keil uvision 4, ulink2, k61, printf to debug(printf) viewer is garbage

2,229 次查看
daweiy
Contributor I

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?

printf.jpg

Thanks in advance.

0 项奖励
回复
2 回复数

1,108 次查看
RadekS
NXP Employee
NXP Employee

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!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

1,108 次查看
daweiy
Contributor I

Anyone can help me? Who is the boss? administrator? Thanks!

0 项奖励
回复