如果我正确地找到,您正在尝试在延长睡眠中设置外围设备。为了我们的理解,发生这种情况 a)设备空闲,未连接或未连接 b) it is connected, between the communication events with the remote. In both cases you should wake up the device from your external processor (the one that connects to the 580 UART). For this you need to implement a wake up mechanism. There are two options you can implement this:
Sol1) You can use Hardware flow control and RTS/CTS in order to wake up from sleep. Sol2) You can use Rx/Tx. In this case a software flow control should exist. Set your Tx in 0, after a flow off command to signal that the device is sleeping. To wake the device up toggle the Rx. Wait for TX to become high and to receive a Flow On command before sending actual data, to give time to your device to wakeup. 我们建议使用Sol1。
谢谢for your usefully answer! But could you tell me in detail about what I have to do with RTS/CTS signals? Is it use a Wakeup timer and Quadrature decoder driver?
I 'm sorry but it seems that i misunderstood your question.
Can you please tell me exactly what are you trying to do? What do you mean in your first post " received some discrete data" and what normal data means to you? Are you having issues with the existing reference design or you are trying to do something else ?
I though that your were trying to modify the reference design. Sorry about the mix-up.
Of course you can send data from your android device, this isn't something extended sleep is responsible for, please check the connections on your dev-kit and see the User Manual UM-B-038. The da sleeps and awakens in every connection interval and not every time there are incoming data.
Thank you so much for clearly answer! I got it! So if I want to use uart comunication to trigger (wake-up) the DA, is it possible for that? My idea is I will use the Wakeup timer and Quadrature decoder driver to handle uart pin_port. Here is my code which I have added into app_sps_device_project.c and It seems work for me :
void app_uart_data_trans_incoming(void) { // Init System Power Domain blocks: GPIO, WD Timer, Sys Timer, etc. if(getBits16(sys_stat_reg,per_is_down)) // Re-initiate peripheral after exiting from sleep modes periph_init();
//Trigger when appear incoming data wkupct_register_callback (app_uart_data_trans_idle); // uart event resister wkupct_enable_irq(0x20, 0x00, 1, 0); // P0_5 (UART Rx) , polarity high (0 high & 1 low ) 1 event, debouncing time = 0
app_uart_status = 1;
if(ke_state_get(task_app)== app_connectable) { //Wakeup BLE here
In your code you are using the Rx pin in order to wake up the the chip (in my undestanding), does your chip wakes up and transmits but you experience corrupted data in the output ? You will have to consider that the chip needs some time in order to wake up from sleep, please advice post #3.
Yes It does, I mean that DA seems wake-up and transmits data but sometime when I debug my code again then it does not work! Could you tell me in detail about the time that DA needs to wakeup from sleep? Is it possible to set to zero because I want it wakes up right after there are incoming datas.
Thank you so much for your help! But could you tell me exactly what I have to do with 2 solutions that you have recommended for me. How I can use CTS/RTS signal to resolve my issue?
In solution 2 which you said " Set your Tx in 0, after a flow off command to signal that the device is sleeping. To wake the device up toggle the Rx. Wait for TX to become high and to receive 在发送实际数据之前的命令流程,为您的设备提供时间唤醒。“我令人困惑!你能给我一个示例代码或任何已经定义的参考设计吗?
Could someone help me with this question? Regards!
Hi chungtran
如果我正确地找到,您正在尝试在延长睡眠中设置外围设备。为了我们的理解,发生这种情况
a)设备空闲,未连接或未连接
b) it is connected, between the communication events with the remote.
In both cases you should wake up the device from your external processor (the one that connects to the 580 UART). For this you need
to implement a wake up mechanism. There are two options you can implement this:
Sol1) You can use Hardware flow control and RTS/CTS in order to wake up from sleep.
Sol2) You can use Rx/Tx. In this case a software flow control should exist.
Set your Tx in 0, after a flow off command to signal that the device is sleeping. To wake the device up toggle the Rx. Wait for TX to become high and to receive
a Flow On command before sending actual data, to give time to your device to wakeup.
我们建议使用Sol1。
谢谢MT_dialog
Hi MT_Dialog,
谢谢for your usefully answer! But could you tell me in detail about what I have to do with RTS/CTS signals? Is it use a Wakeup timer and Quadrature decoder driver?
问候,
Chung tran.
Hello,
How do I put 14580 into the extended sleep mode by RTS/CTS?
I have configured device as #define CFG_EXT_SLEEP
然而,目前的抽签约为600A。
Hi chungtran
I 'm sorry but it seems that i misunderstood your question.
Can you please tell me exactly what are you trying to do? What do you mean in your first post " received some discrete data" and what normal data means to you? Are you having issues with the existing reference design or you are trying to do something else ?
谢谢MT_dialog
Hi MT_Dialog,
Oh well , Here is my situation :D
我正在研究DSP参考设计。我已经通过在da14580_config中定义CFG_EXT_SLEEP来测试扩展睡眠模式。我意识到DSP在扩展睡眠模式下工作精细,但我无法接收从我的Android设备发送到DA14580的数据。(我认为这可能是由睡眠模式引起的)。这样,我可以将来自Android设备的数据发送到DA14580,定义扩展睡眠模式吗?我的意思是,当有传入数据(外部唤醒事件)时,芯片会暂时睡眠状态,并且在睡眠模式下醒来
问候,
Chung Tran.
Hi chungtran,
I though that your were trying to modify the reference design. Sorry about the mix-up.
Of course you can send data from your android device, this isn't something extended sleep is responsible for, please check the connections on your dev-kit and see the User Manual UM-B-038. The da sleeps and awakens in every connection interval and not every time there are incoming data.
谢谢MT_dialog
Hi MT_dialog,
Thank you so much for clearly answer! I got it! So if I want to use uart comunication to trigger (wake-up) the DA, is it possible for that? My idea is I will use the Wakeup timer and Quadrature decoder driver to handle uart pin_port. Here is my code which I have added into app_sps_device_project.c and It seems work for me :
void app_uart_data_trans_incoming(void)
{
// Init System Power Domain blocks: GPIO, WD Timer, Sys Timer, etc.
if(getBits16(sys_stat_reg,per_is_down))
// Re-initiate peripheral after exiting from sleep modes
periph_init();
//Trigger when appear incoming data
wkupct_register_callback (app_uart_data_trans_idle); // uart event resister
wkupct_enable_irq(0x20, 0x00, 1, 0); // P0_5 (UART Rx) , polarity high (0 high & 1 low ) 1 event, debouncing time = 0
app_uart_status = 1;
if(ke_state_get(task_app)== app_connectable)
{
//Wakeup BLE here
app_ble_force_wakeup();
app_ble_ext_wakeup_off();
//SetBits32(GP_CONTROL_REG, BLE_WAKEUP_REQ, 1);
ke_msg_send_basic(APP_WAKEUP_MSG, TASK_APP, NULL);
}
}
谢谢
Chung Tran.
Hi chungtran
你想做什么?您想唤醒连接事件之间的DA,以便实现更快的响应?您想从中央断开外围设备,并在永久睡眠中设置DA,直到新数据到达DA的UART然后唤醒?
谢谢MT_dialog
Hi MT Dialog,
Yes, my target is I want to set the DA in permanent sleep until new data arrive in da's uart and then wake-up. Regards,
Chungtran.
Hi chungtran
In your code you are using the Rx pin in order to wake up the the chip (in my undestanding), does your chip wakes up and transmits but you experience corrupted data in the output ? You will have to consider that the chip needs some time in order to wake up from sleep, please advice post #3.
谢谢MT_dialog
Hi MT_dialog,
Yes It does, I mean that DA seems wake-up and transmits data but sometime when I debug my code again then it does not work! Could you tell me in detail about the time that DA needs to wakeup from sleep? Is it possible to set to zero because I want it wakes up right after there are incoming datas.
问候,
Chungtran.
Hi chungtran
芯片在大约3-4ms中完成了唤醒Proccess(但它取决于SDK,如果它的581或580芯片,您可以从智能Snippets计算唤醒时间)没有办法覆盖其中的....那个为什么你必须在传输蓝牙传输任何内容之前切换RX并等待。
谢谢MT_dialog
Hi MT_dialog,
Thank you so much for your help! But could you tell me exactly what I have to do with 2 solutions that you have recommended for me. How I can use CTS/RTS signal to resolve my issue?
问候,
Chungtran
Hi MT_dialog,
In solution 2 which you said " Set your Tx in 0, after a flow off command to signal that the device is sleeping. To wake the device up toggle the Rx. Wait for TX to become high and to receive
在发送实际数据之前的命令流程,为您的设备提供时间唤醒。“我令人困惑!你能给我一个示例代码或任何已经定义的参考设计吗?
Ragards,
Chung Tran.
Hi chungtran,
对不起,上述方案没有实现代码。
谢谢MT_dialog
Hi MT_dialog,
我知道了。谢谢
Chung Tran.