通过UART数据传输唤醒。

18个帖子/ 0新
最后一篇
chungtran
离线
最后一次露面:5年3周前
加入:2015-01-21 05:57
通过UART数据传输唤醒。

Hi you all,

I am working on DSPS source code and am dealing with an issue that how to wake up from extendded sleep mode by UART. I have already defined extended sleep mode by adding #define CFG_EXT_SLEEP in da14580_config.h . As the result, I saw that I just receive some discrete data from UART ( it might causes by sleep mode ). My target is how I still could receive normal data from UART even when I have defined " CFG_EXT_SLEEP ". Any reply will be greatly appreciated .

问候,

Chung Tran。

设备:
chungtran
离线
最后一次露面:5年3周前
加入:2015-01-21 05:57
有人可以帮助我

有人可以帮助我这个问题吗?问候!

mt_dialog.
离线
最后一次露面:2个月4周前
职员
加入:2015-06-08 11:34

嗨Chungtran.

如果我正确地理解它,你想设置哟ur peripheral in extended sleep. To our understanding this happens when
a) the device is idle and not connected or
b)与遥控器的通信事件之间连接。
在这两种情况下,您应该将设备从外部处理器唤醒(连接到580 UART的设备)。为此,您需要
实施唤醒机制。您可以实现两个选项:

sol1)您可以使用硬件流量控制和RTS / CTS以从睡眠中唤醒。
sol2)您可以使用rx / tx。在这种情况下,应存在软件流控制。
在流关闭命令后将其设置为0,以发出设备正在睡眠状态。唤醒设备缩短rx。等待TX变高,接收
发送实际数据之前的命令流程,为您的设备提供时间唤醒。
We recommend to use Sol1.

谢谢mt_dialog.

chungtran
离线
最后一次露面:5年3周前
加入:2015-01-21 05:57
嗨mt_dialog,

嗨mt_dialog,

谢谢你的答案!但是,你能告诉我关于我与RTS / CTS信号有关的详细信息吗?它是否使用了唤醒定时器和正交解码器驱动程序?

问候,

Chung Tran。

imalamoud.
离线
最后一次露面:3 months 3 weeks ago
加入:2014-11-16 21:34
你好,

你好,

如何通过RTS / CTS将14580放入扩展睡眠模式?

我已将设备配置为#define cfg_ext_sleep

However current draw is about 600uA regardless.

mt_dialog.
离线
最后一次露面:2个月4周前
职员
加入:2015-06-08 11:34
嗨Chungtran.

嗨Chungtran.

对不起,但似乎我误解了你的问题。

你能告诉我你想做什么吗?您的第一个帖子中的意思是什么“收到一些离散数据”以及正常数据对您意味着什么?您是否遇到了现有的参考设计,或者您正在尝试做其他事情?

谢谢mt_dialog.

chungtran
离线
最后一次露面:5年3周前
加入:2015-01-21 05:57
嗨mt_dialog,

嗨mt_dialog,

哦,这是我的情况:D

I am working on DSPS reference design. I have already tested extended sleep mode by defining CFG_EXT_SLEEP in da14580_config.h. I realized DSPS worked fine in extended sleep mode but I can not recieve data that send from my android device to Da14580.( I am thinking this could be caused by sleep mode ). So that, Could I sent Data from android device to DA14580 with defining extended sleep mode? I mean that the chip will sleep at all time and just wake up from sleep mode when there have incoming data (external wake up events).

问候,

Chung Tran。

mt_dialog.
离线
最后一次露面:2个月4周前
职员
加入:2015-06-08 11:34
嗨Chungtran,

嗨Chungtran,

我虽然你正在尝试修改参考设计。抱歉混淆了。

当然,您可以从Android设备发送数据,这不是一个延长睡眠的东西负责,请检查Dev-kit上的连接,请参阅用户手册UM-B-038。DA在每个连接间隔内睡眠并唤醒,而不是每次有传入数据的间隔。

谢谢mt_dialog.

chungtran
离线
最后一次露面:5年3周前
加入:2015-01-21 05:57
嗨mt_dialog,

嗨mt_dialog,

非常感谢你明确答案!我知道了!所以,如果我想使用UART通信来触发(唤醒)DA,它是否有可能?我的想法是我将使用唤醒定时器和正交解码器驱动程序来处理UART PIN_PORT。这是我已添加到app_sps_device_project.c的代码,似乎为我工作:

void app_uart_data_trans_incoming(void)
{
// init系统电源域块:GPIO,WD计时器,SYS计时器等。
if(GetBits16(SYS_STAT_REG, PER_IS_DOWN))
//从睡眠模式退出后重新启动外围设备
periph_init();

//出现传入数据时触发
wkupct_register_callback(app_uart_data_trans_idle);// UART事件RERIST
wkupct_enable_irq(0x20,0x00,1,0);// P0_5(UART RX),极性高(0高和1低)1事件,脱嘴时间= 0

app_uart_status = 1;

if( ke_state_get(TASK_APP) == APP_CONNECTABLE )
{
//唤醒这里的ble

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);
}
}

Thanks

Chung Tran。

mt_dialog.
离线
最后一次露面:2个月4周前
职员
加入:2015-06-08 11:34
嗨Chungtran.

嗨Chungtran.

What are you trying to do? You want to wake up the da in-between the connection events in order to achieve a quicker response? You want to disconnect the peripheral from the central and set the da in permanent sleep until new data arrive in da's uart and then wake-up?

谢谢mt_dialog.

chungtran
离线
最后一次露面:5年3周前
加入:2015-01-21 05:57
嗨mt对话框,

嗨mt对话框,

是的,我的目标是我想在永久睡眠中设置DA,直到新数据到达DA的UART然后唤醒。问候,

Chungtran。

mt_dialog.
离线
最后一次露面:2个月4周前
职员
加入:2015-06-08 11:34
嗨Chungtran.

嗨Chungtran.

在您的代码中,您正在使用RX引脚才能唤醒芯片(在我的未加工中),您的芯片是否唤醒并传输,但您在输出中遇到损坏的数据?您必须考虑芯片需要一段时间才能从睡眠中醒来,请咨询#3帖子。

谢谢mt_dialog.

chungtran
离线
最后一次露面:5年3周前
加入:2015-01-21 05:57
嗨mt_dialog,

嗨mt_dialog,

是的,我的意思是Da似乎唤醒并传输数据,而是在我再次调试代码时的某个时候,它不起作用!你能告诉我一个Da需要醒来的时间吗?是否可以设置为零,因为我希望它在传入数据后醒来。

问候,

Chungtran。

mt_dialog.
离线
最后一次露面:2个月4周前
职员
加入:2015-06-08 11:34
嗨Chungtran.

嗨Chungtran.

The chip finishes the wake up proccess in about 3-4ms ( but it depends on the SDK and if its 581 or 580 chip, you can count the wake up time from smart sniippets) there is no way to override that....thats why you have to toggle Rx and wait before you transmit anything throught bluetooth.

谢谢mt_dialog.

chungtran
离线
最后一次露面:5年3周前
加入:2015-01-21 05:57
嗨mt_dialog,

嗨mt_dialog,

非常感谢你的帮助!但是你能告诉我我对我推荐的2个解决方案有关的事情。我如何使用CTS / RTS信号来解决我的问题?

问候,

Chungtran.

chungtran
离线
最后一次露面:5年3周前
加入:2015-01-21 05:57
嗨mt_dialog,

嗨mt_dialog,

在Solution 2中,您所说的“将TX设置为0,流关闭命令以发出设备睡眠后的命令。要唤醒设备,请向上切换RX。等待TX变高并接收
发送实际数据之前的命令流程,为您的设备提供时间唤醒。" I am confusing with this ! Could you give me an example code or any reference design that have defined this?

ragards,

Chung Tran。

mt_dialog.
离线
最后一次露面:2个月4周前
职员
加入:2015-06-08 11:34
嗨Chungtran,

嗨Chungtran,

Sorry there is no implementation code for the above scenario.

谢谢mt_dialog.

chungtran
离线
最后一次露面:5年3周前
加入:2015-01-21 05:57
嗨mt_dialog,

嗨mt_dialog,

I got it. Thanks

Chung Tran。

主题锁定