arch_printf不工作。arch_printf_process ();不叫

2个职位/ 0个新职位
最后发表
ciano
离线
最后看到:1个月3个星期前
加入:2014-10-03 08:13
arch_printf不工作。arch_printf_process ();不叫

嗨,对话框中,

我已经在下面的GPIO上为arch_printf设置了UART2
# ifdef CFG_PRINTF_UART2
#定义GPIO_UART2_TX_PORT GPIO_PORT_0
#定义GPIO_UART2_TX_PIN GPIO_PIN_6

#定义GPIO_UART2_RX_PORT GPIO_PORT_0
#定义GPIO_UART2_RX_PIN GPIO_PIN_7
# endif

我定义
#定义CFG_PRINTF

然而,在我移动函数“schedule_while_ble_on(void)”中的“arch_printf_process();”的loaction之前,我没有得到任何打印,现在看起来是这样的
静态内联void schedule_while_ble_on(void)

//开启BLE时钟
而(ble_is_powered ()) {

//设置BLE事件结束。有条件的射频校准可以运行。
uint8_t ble_end_set = ke_event_get(KE_EVENT_BLE_EVT_END);

//执行消息和事件
rwip_schedule ();

//
如果(ble_evt_end_set)

Uint32_t sleep_duration = 0;
rcx20_read_freq ();

//如果你有足够的时间,对收音机进行温度校准
如果(lld_sleep_check(&sleep_duration, 4)) //6个槽-> 3.750 ms . If (lld_sleep_check(&sleep_duration, 4)
//检查时间和温度以进行无线电校准。
conditionally_run_radio_cals ();

//我的arch_printf_process()
arch_printf_process ();

//将控制权授予应用程序,尝试进入睡眠
//如果应用程序返回GOTO_SLEEP
如果(! app_asynch_trm ())
打破;

/ / SDKIMPROVEMENTS需要测试! !我们可以添加以下条件,然后移动
//退出循环
//我们可以考虑把它放在app_asynch_trm之前
/ /如果(GetBits16 (CLK_CTRL_REG RUNNING_AT_XTAL16M))

//执行printf进程
/ /上升arch_printf_process ();


通过这个修改arch_printf可以工作。
信息:我user_app_main_loop_callbacks。app_on_sytem_powered是NULL,所以schedule_while_ble_on在到达arch_printf_process()的原始位置之前返回;

这是SDK中的一个bug(在函数“schedule_while_ble_on(void)”中放置了错误的“arch_printf_process();”),还是我做错了什么?
如果我做错了,那我该怎么做?

先谢谢你。
最好的问候,
Ciano霜
丹麦。

设备:
MT_dialog
离线
最后看到:1个月1个星期前
工作人员
加入:2015-06-08 34
嗨ciano,

嗨ciano,

是的,这是SDK上的一个bug,正如你注意到的是arch_printf_process()的错误位置,请也检查这篇文章:

http://support.dialog-semiconductor.com/sdk-5-uart

由于MT_dialog