亲爱的对话支持团队,
I have successfuly integrated theuartSDK的示例ble_app_peripheral。我有能力在具有BLE功能时发送和接收数据。
但是,当UART不忙节省电量时,我试图将我的电路板放入扩展的睡眠模式。换句话说,两件事应该能够在扩展睡眠模式下唤醒板:
1-BLE定时器发送广告数据包。
2-UART RX PIN.。
I understand that the following steps should be taken for this purpose:
1-Right before going to sleep I have to disable the uart and set the Rx pin to be used for waking up the board.
2-从此引脚唤醒时,我应该激活UART并开始收听消息。(我明白我可能会失去一些数据!)
I'm a bit lost about how to properly configure the extended sleep mode and seting the callbacks. could you please provide me with some instructions in this regard? (Due to hardware limitations, I can't use UART in 4-wire mode, therefore; I'm trying to use the sam Rx pin for both purposes.)
Regards,
汉米德
Device:
嗨哈米德,
谢谢你的问题。我建议首先检查我们的睡眠模式从DA14531产品页面 - 对于您的方便链接提供如下:
http://lpccs-docs.dialog-semondile.com/da14531_sleep_mode+/index.html.
Additionally, the ble_app_sleepmode example of the SDK configured the DA14531 in permanent sleep mode. In order to wake it up, you should use the WAKEUP controller. Please check app_button_enable() function.
谢谢,PM_DIALOG.
你好,
Thanks for your response.
I've read through the tutorial but I can't find my answers.
Is is possible to useapp_easy_timer.during extended sleep mode? In other words, can this timer wake up the board from extended sleep? THat being said, the board would be sleeping unless it needs to wake up for sending an advertisement packet or while uart is busy.
Regards,
汉米德
嗨哈米德,
Sorry, probably I misunderstood your question. Yes, you can use app_easy_timer(0 in order to wakeup periodically, as this API is used the BLE timer, so it can be used in sleep mode.
Let's assume that you want to wake up and start advertising . This can be achieved by setting the timer as shown here:
app_easy_timer(100,cb_my_timeout);
第一个参数指定在100 * 10 ms = 100ms = 1s后的超时计时器。此时回调CB_MY_Timerout()调用。
谢谢,PM_DIALOG.
你好,
Thanks a lot.That clarified some parts of this problem for me. I have another question which I'm doubtfull about:
我想使用UART_RX_PIN.醒来以及计时器。更清晰,我想必须唤醒方式(定时器和提到的PIN)。
据我所知,在醒来的回调中我需要
然后我可以开始receiving data。之后我必须
返回正常运行。
Am I correct? Is it possible to change the use of a pin during operation like this?
Regards,
汉米德
嗨哈米德,
如果您想通过GPIO触发(UART RX)唤醒(UART RX),则应配置唤醒控制器并寄存该引脚。在SDK的BLE_APP_SLEEPMODE示例中,可以通过GPIO_BUTTON_PORT / _PIN唤醒设备。请检查wkupct_enable_irq()。在您的情况下,您应该使用UART RX引脚配置它。
请记住,当系统是睡眠模式时,所有包括UART的外围域都会关闭,因此当芯片睡眠时,它不可能具有UART活动。这意味着您将错过将第一个字符捕获到UART RX PIN才能唤醒它。
谢谢,PM_DIALOG.
到目前为止我已经完成了以下事情:
但是,当我在调试模式下运行代码时,在接收到唤醒引脚上的新字节时没有更改,并且设备保持广告。你能给我一些关于这个问题可能原因的建议吗?
Regards,
汉米德
你好,
我想表明我已经成功实现了我所需的架构。谢谢你的时间。
Regards,
汉米德
嗨哈米德,
高兴你和感谢佛求了你的问题r let us know. According to the app_wkup_pin_enable(), a low pulse signal should trigger the wake-up controller.
如果您有任何其他问题,请提出一个新的论坛线程。
谢谢,PM_DIALOG.