Skip to main content

DSPS without flow control

DA14530 and DA14531

1 year ago

Posted by wplatzer 25 points 7 replies
0 upvotes

Hello,

I am transferring packets over DSPS service (USART to BLE transmission; DSPS_6.150.4.50). If packet size <= 256 everything works fine; bigger packet size are not transferred correctly.

Problem is that I cannot use Flow control (no pins left).

Is there a way to extend USART RX buffer to 1000 bytes?

Can I disable USART flow control?

Thanks,

WP

1 year ago

PM_Dialog

Hi wplatzer,

Thanks for your question online. The DSPS is configured in extended sleep mode by default and it is using UART HW Flow Control (RTS/CTS). So, it is supported with extended sleep mode and HW Flow Control. The Flow control is required to wake-up the device trough the CTS pin. Keep in mind that when the device is configured in extended sleep mode, then it will sleep between the advertising or connection intervals. During sleep, all the peripheral domains (including UART) are powered-down, so you will not able to have UART activity and you should wake-up the chip somehow. Except from waking up the DA14531, the Flow Control is also required for handling the incoming data over  UART. If the DSPS didn’t have the flow control and the heaps are overfilled, them the application will not be unable to receive any other upcoming data, but the peer device will not aware of this in order to stop transmitting data over UART.  This means that you will have data loss.

Instead of DSPS, you can use the CodeLess reference application design.

https://www.dialog-semiconductor.com/products/smartbond-codeless-commands

For “datapumping” applications, you could use the “Binary Mode” – please find more details in the user manual:

http://lpccs-docs.dialog-semiconductor.com/UM-140-DA145x-CodeLess/binarymode.html

Binary mode is used for the purpose of data pumps wherein the Bluetooth CodeLess device transfers data without examining it contents, which is the prefered method for end to end raw data transfer. By default, the HW Flow control is disabled, so the RTS/CTS are not required.

You can do a quick test to check this :   you can send the AT+FLOWCONTROL in the “CodeLess Host” application and you will see that the value (0 , 0 , 0) is returned which means that the flow control is disabled.

Thanks, PM_Dialog

1 year ago

wplatzer 25 points

Hello,

I already use DA14580 DSPS with RX buffer size 1000 and this works fine for my application.

Now I want to upgrade to DA14531 and have to use DSPS for backward compatibility. Extended sleep mode is not required, because the DA14531 is only powered if data transfer is needed.

Is there a way to get this working on DSPS?

Thanks,

WP

1 year ago

PM_Dialog

Hi wplatzer,

As mentioned in my previous reply, the DSPS is officially delivered and supported with HW Flow control and Ext sleep mode.

If you would like to use it without HW Flow control, a possible solution might be the following. It is not tested / verified – it is just a possible workaround. It is NOT recommended and we cannot provide any further support on this too.

The extended sleep mode should be disabled :

const static sleep_state_t app_default_sleep_mode = ARCH_SLEEP_OFF;

The DSPS does not include a macro definition for enabling/disabling the HW Flow control. So, you could put the CTS pin to the ground.

Without the Flow Control, the is a critical problem is the heaps are over-filled. In that case, the DA14531 will do flow OFF because it is unable to receive any other upcoming data, but the peer device will not aware of this in order to stop the data transmission via UART.  As mentioned before you will probably have data loss if :

i)   The external MCU is sending data over UART at a very high rate

ii)  The BLE Link is not good enough, and so some data should be retransmitted

Thanks, PM_Dialog

1 year ago

wplatzer 25 points

Hi,

thank you for your answer. Unfortunately this does not work. 

onst static sleep_state_t app_default_sleep_mode = ARCH_SLEEP_OFF;

If I disable sleep mode the project does not compile anymore. 

linking...
.\Release\Obj\DA14531.axf: Warning: L6969W: Changing AT Section .data type from RW to RO in ER_IROM3.
.\Release\Obj\DA14531.axf: Warning: L6969W: Changing AT Section .data type from RW to RO in ER_IROM3.
.\Release\Obj\DA14531.axf: Internal fault: [0xfea234:5060960]
.\Release\Obj\DA14531.axf: Please contact your supplier.
Not enough information to produce a SYMDEFs file.
Finished: 1 information, 2 warning and 0 error messages.
".\Release\Obj\DA14531.axf" - 2 Error(s), 2 Warning(s).

Thanks, WP

1 year ago

PM_Dialog

Hi wplatzer,

This is very weird – you should be able to build the project. Could you please try it in a clean DSPS project?  I am able to compile the DSPS v6.150.4.50 when the extended sleep is off.

Thanks, PM_Dialog

1 year ago

wplatzer 25 points

Hi,

compiling works. This was an error in my configuration.

Conclusion: DSPS is not working without flow control - there are always some bytes lost if too much bytes sent at once.

Thanks, WP

1 year ago

PM_Dialog

Hi wplatzer,

Yes, the DSPS should be used with HW flow control and as provided by Dialog. 

This was just a possible work-around to use it without flow control, so it is expected some bytes are lost.

Thanks, PM_Dialog