Hi.
I try to use the project DSPS version 5.150.2 on DA14580
In my project:
1)休眠被禁用(Arch_sleep_off)。
2) Flow control are disabled too:
a)#undef cfg_uart_hw_flow_ctrl
b)#undef cfg_uart_sw_flow_ctrl
The BLE Device (peripheral) side connected to UART interface of some external processor. The external processor starts to send information to BLE UART immediately after initialization. Immediately, after initialization, BLE doesn't have established connection.
I get ASSERT_WARNING in function:
"user_periph_push"
on line:
"if (user_buffer_write_check(&periph_to_ble_buffer, wrdata, RX_CALLBACK_SIZE) != RX_CALLBACK_SIZE)"
How can i solve this trouble?
(缓冲区中的数据没有任何重要性,并且数据部分可能会丢失)
谢谢。
Keywords:
设备:
Hi Vadym,
流量控制不仅需要睡眠,如果删除此,则无法保证您的系统中没有任何数据级组。您可以尝试删除ASSET_WARNING并检查写入缓冲区,但DSP未测试此类用法(无流量控制)。最多可能的旧数据将被新数据覆盖,并且您将失去字节。
Thanks MT_dialog
I removed the ASSERT_WARNING.
I come to "HardFault_HandlerC" from "uart_sps_rcv_data_avail_isr".
现在我试图禁用development_debug,但我没有重置wdt。
我如何在我尚未处于连接状态时禁用UART接收数据?
Hi Vadym,
As as i ve allready mention the DSPS isn't tested for this kind of usage, another thing that you can try is to remove the user_sceduler_init() from the user_on_init() function and also remove the uart_sps_init() from the periph_init() and invoke both of the removed functions in the user_on_connection() function, the new user_on_connection() function should be something like this:
void user_on_connection(uint8_t connection_idx,struct gapc_connection_req_ind const * param)
{
default_app_on_connection(connection_idx, param);
user_gattc_exc_mtu_cmd(connection_idx);
app_easy_gap_param_update_start(connection_idx);
ARCH_PRINTF(“设备连接\ r \ n”);
UART_SPS_INIT(UART_SPS_BAUDRATE,3);
user_scheduler_init();
}
当然,您应该分别设置和重置UART分别在连接和断开连接中,因为如果没有任何睡眠,并且中断将保持配置。
Thanks MT_dialog
Hi.
谢谢你回答。它有助于但只有部分地。
When central moves away from peripheral and connection becomes weak i still to get the buffer overflow.
p.s.
For me, don't need to insert "uart_sps_init" into "user_on_connection". The function is inside of "user_scheduler_init".
Hi Vadym,
如果您没有流量控制,我认为这是预期的。
Thanks MT_dialog
Hi, all.
I interested in same issue and solved with following method.
1. condition:
1) No flow control and only use RX, TX signal
2) Always wake up
2. Change code at "user_sps_device.c"
枚举Arch_Main_Loop_callback_ret user_on_system_powered(void)
{
user_sps_sleep_restore();
user_ble_pull(true,null);
返回keep_powered;// <------------------返回goto_sleep;
}
谢谢。
I am working on the same lines where I only need Tx/RX. Did you do all the changes from the rest of the post plus the edit you made. Could you tell me more.
谢谢,
This is for naracontrol , I am working along the same line are you are. Could you post a little more information. Did you do all the steps from above and then the edit you mentioned.
谢谢,
这个问题已经解决了吗?我也很担心这个。请与解决它的人分享您的信息。
Hi Romeo,
你能澄清你的问题吗?如果我能够正确理解,您希望在没有流量控制的情况下使用DSP?如果您的意思是,在没有流量控制时,您将无法使用睡眠操作DSP。如果您愿意没有流量控制,则应在活动模式配置中运行DSP。否则,如果您只有Rx / TX引脚和睡眠模式配置,则会有数据丢失。请注意,DSPS项目旨在默认操作软件和硬件流控制。如果禁用睡眠模式并从项目中删除软件流控制功能,我不是100%确定没有缺少数据。
谢谢,PM_Dialog
Hi,PM_dialog
As Vadym said, I am in the same situation.
1)休眠被禁用(Arch_sleep_off)。
2) Flow control are disabled too:
a)#undef cfg_uart_hw_flow_ctrl
b)#undef cfg_uart_sw_flow_ctrl
与BLE连接后,RX数据溢出漏光。
如果我丢失数据,我不在乎,但我不希望从中下降。
我在这里尝试过,但它不起作用。我不想要睡眠模式。
Please tell me specifically how to throw RX overflow data away.
I don't know where to throw it away.
Please give me a specific code.
请帮助我不要吹下来。
谢谢,
嗨罗密欧,
你能试试这个让我知道吗?
1) No flow control and only use RX, TX signal
2) Always wake up
2. Change code at "user_sps_device.c"
枚举Arch_Main_Loop_callback_ret user_on_system_powered(void)
{
user_sps_sleep_restore();
user_ble_pull(true,null);
返回keep_powered;// <------------------返回goto_sleep;
}
Also, the past forum thread below might be helpful.
https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/read-buffer-overflow
谢谢,PM_DIalog
Dear PM_DIalog,
The result is the same.
始终醒来的是arch_sleep_off吗?
const static sleep_state_t app_default_sleep_mode = ARCH_SLEEP_OFF;
这就是我所做的。
我们使用了各种方法,但他们没有得到解决。
baud rate from 115200 to 19200,
虽然它在时间BLE溢出时阻止了RX,但不再接收连接并必须重新连接连接。
这不是我们想要的。
有许多传感器仅使用TX,RX。它必须解决。
请提出解决方案。
谢谢,
嗨罗密欧,
If you don’t have a flow control scheme then you won’t be able to control the incoming data and you are going to lose data, so the DSPS isn't designed to operate without flow control. When sending data with BLE interrupts, the 580 isn't able to cope with the BLE and the UART interaction, so you need flow control in order to stop data transition on the other side when needed. In case of sw flow control (CFG_UART_SW_FLOW_CTRL), the sleep does not work as your UART needs to use 16MHz XTAL clock as a source to communicate. In case of hw flow control( CFG_UART_HW_FLOW_CTRL) enabled then the device will go to sleep only if there is 0 byte of data in the data buffer even a single byte of data will keep the device awake. Therefore with hw flow control the device goes to sleep when there is 0 byte of data in the buffer and RTS will toggle when the device will wake up. This is the reason why flow control is so important on DSPS, even with no sleep mode S/W flow control is advised if you don’t want to use the additional CTS / RTS signals. If you would like to remove the sleep mode and set you device into sleep mode, yes, you should modify the app_default_sleep_mode as ARCH_SLEEP_OFF. For getting more information, I would highly suggest you to have a look at the DSPS user manual.
谢谢,PM_Dialog