SPS数据传输完整性

20个帖子/ 0新
Last post
roinovi
Offline
Last seen:3 years 9 months ago
加入:2015-11-04 18:11
SPS数据传输完整性

hello
i am using the sps example to transfer data from a serial device via uart to the DA14580 and via ble to another DA14580 (with host_sps) and then via uart to the terminal in the PC
i am having a data integrity issue- this is what i get in the terminal (its just a small part of the stream but the swaps are accuring all along the data stream):
77 00 FB F1 03 00 84 03 B2 07
78 80 17 F2 03 00 84 03 B2 07
79 00 FF F183 00 84 03 B2 07
FA 00 11 F2 03 00 84 03 B2 07
7B 00 EF F1 03 00 84 03 B2 07
7C 00 F1 03 00 84 03 B287

正如你可以看到的那样,我在一些地理位置中得到了一个char掉期
there are swaps that "0" is swapped with "8" (which in binari is just one bit - "0" : 00110000 , "8" : 00111000)
but some of the chars are completely different ("7" and "F" 00110111 , 01000110 )
我甚至试图将转移率降低到100kbit / s,但它仍然在发生
what can be the problem?

tnx

设备:
MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-06-08 11:34
roinovi,

roinovi,

我能想到这一切可能发生的唯一场合是由于晶体未经限制的水晶。晶体修剪值由软件提供,并且是大多数时间适用于所有晶体的通用价值。虽然这应该发生在UART字节传输的结束位。使用DSPS Android或iOS应用程序时,您是否遇到同样的问题?除了我们没有观察到这样的东西。

Thanks MT_dialog

roinovi
Offline
Last seen:3 years 9 months ago
加入:2015-11-04 18:11
hello

hello
我也在DSPS iOS / Android应用程序中有这个问题
此外,还有块的数据根本没有转移(无论我使用的电路板,murata或对话框)
i saw that it has problems with data which is "00".
sometimes it doesnt transfer the value "00" and sometimes it doesnt transfer a data which is between 2 "00"
e.g "13 23 54 67 54 00 ed h5 3e 67 00 8g ad dd"
it will not transfer the "00 ed h5 3e 67 00"
所以它看起来像这个“13 23 54 67 54 8G AD DD”
what can it be?
maybe something in the sending code?
this is really a problem because i cant use this ble module if my data is not transferring correctly
tnx

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-06-08 11:34
roinovi,

roinovi,

We haven't observed any problems of data integrity at least on dialog's kits, the only occasion where something like this will occur is because of a false crystal value. Have you tried any other configurations on the DSPS application like removing sleep or changing the HW to SW flow control. I ve just tested you patern between a pro board and the DSPS application on android with a fresh downloaded fw all the data seem that are transfering ok. The configuration on the DSPS device was with extended sleep on and HW flow control with the appropriate modifications in hardware for the pro kit.

Thanks MT_dialog

roinovi
Offline
Last seen:3 years 9 months ago
加入:2015-11-04 18:11
hello

hello
我试图拆除睡眠,但它是一样的
how do i disable sleep entierly?
现在,我使用默认的sps\u设备并在da14580对话框evkt-b上烧录它(因此水晶值应该是正常的)
我没有做任何改变的代码和现象,我得到的现象是一样的,一些具体的字符正在得到交换
e.g
0A 0D 36 00 F0 55 00 00 90 DC 01 00 30 63 03 00 DC 05 DC 05 DC 05 00 00 00 00 00 00 00 00 00 00 00 FE 00 00 00 FC
0A 0D 37 00 D8 59 00 00 78 E0 01 00 18 67 83 00 DC 05 DC 05 DC 05 00 00 00 00 00 00 00 00 00 00 00 FE 00 00 00 FC
0A 0D 38 00 C0 5D 00 00 60 E4 01 00 00 6B 03 00 DC 05 DC 05 DC 05 00 00 00 00 00 00 00 00 00 00 00 FF 00 01 80 FF
8A0D 39 00 A8 61 00 00 48 E8 01 00 E8 6E 03 00 DC 05 DC 05 DC 05 00 00 00 00 00 00 00 00 00 00 00 FF 00 01 80 FF
0a 0d 3a 00 90 65 00 00 30 EC 01 00 D0 72 03 00 DC 05 DC 05 DC 05 00 00 00 00 00 00 00 00 00 00 00 00 80 FF 00 01 00 FF
0A 0D 3B 00 78 69 00 00 18 F0 01 00 B8 76 03 00 DC 05 DC 05 DC 05 00 00 00 00 00 00 00 00 00 00 00 FF 00 01 00 FF

this 0->8 swapping is occuring once a while

this happens as well (should be all 21's but you can see the "A" instead of the 2)
21“A1 21 21 21 21 21 21 21 21 21 21 21 21“A1 21 21 21 21 21 21 21 21 21 21 21 21 21 21“A1 21."A1 21.

there could be more but i wouldnt know so you see why its a big problem
could it be maybe because i am recieving data via uart and sending via ble at the same time?

roinovi
Offline
Last seen:3 years 9 months ago
加入:2015-11-04 18:11
hello

hello
我在论坛中看到另一个像我一样的帖子,数据没有转移OK:
http://support.dialog-semiconductor.com/dsps-hardware-flow-control-0

你也没有给他一个答案
你能想到一些我可以检查解决这个问题吗?
谢谢你

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-06-08 11:34
roinovi,

roinovi,

The customer in the post you mention was using an external processor to send data through the DSPS, when using an external proccessor things are more complicated and the truncation he was experiencing it might was due to a fault on his own proccessor or program and we can't test that.

除此之外,DSP应该在盒子中工作,而不会在用作演示时修改任何内容。关于您的问题,我无法用iOS和Android或从PC复制它到PC连接,并且我使用了基本和Pro Dev套件,并使用您所示的系列串联发送数据。如果我缺少某些东西(Dev Kits,SW设置,发送数据),请您可以分享测试台的确切设置吗?除此之外,由于您使用的基本套件,并且您使用的是外部FTDI,请在导致您有任何问题的情况下尝试其他FTDI?另请确保在终端中使用相应的设置( - DSP不使用任何特殊设置,而是确保 - HW / SW流量控制,无论您在项目中设置,都在终端选项中设置了,8bit数据 - 无奇偶校验/ 1停止位)。同样在几天内,SDK5上的DSP将被释放,您可以尝试更新版本并检查问题是否仍然存在。

Thanks MT_dialog

roinovi
Offline
Last seen:3 years 9 months ago
加入:2015-11-04 18:11
my set up is this

my set up is this
我的设备(MCU)正在通过UART(引脚4,7)将数据传送到对话框14580 EVKIT,14580正在将该数据传送到连接到PC(终端)的Murata P2ML3656 EVKIT
on the dialog -> sps_device , on the murata -> sps_host
my device is sending serial data in 115k2 continuesly so the moment the buffer in the dialog gets full it send via ble the data
i think that the glitches are happening when the dialog is transfering via ble while recieving the serial data.
我试图将串行数据发送到对话框每秒,然后通过BLE发送到Murata,没有故障,为什么我认为它有问题通过UART接收数据并同时通过BLE发送数据
你知道这么小故障吗?
furthermore, i want to send the data via ble only when i reach a certain string, i tried modifying the

void app_ble_pull (void)
{
静态uint8\u t rounds\u waiting=0;
int read_amount;

if(tx_busy_flag == 0 && ble_flags.txAllowed == TRUE)
{
read_amount = app_item_count(&uarttoble_buffer);

if ((*(uarttoble_buffer.data_ptr + uarttoble_buffer.readIdx)) == 253)
if((*(*(uarttoble_buffer.data_ptr + uarttoble_buffer.readidx + 1))== 170)
{
// if (read_amount >= TX_WAIT_LEVEL || (rounds_waiting++) >= TX_WAIT_ROUNDS) buffer->data_ptr+buffer->readIdx
// {
// rounds_waiting = 0;
app_init_ble_tx();
// }
}

}
}
but it doesnt work , any ideas?
tnx

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-06-08 11:34
roinovi,

roinovi,

Since you are using an external MCU to send the data there might be a drift between the UART clocks between your MCU and the 580 i suppose that you ve allready tried to lower your baud rate and the issue persists. Can you sent us a capture with a logic analyser between your MCU and the 580 with a faulty transaction to have a look. Alsoyou are experiencing the issue when you send from the android and receive the data on your MCU through the 580 or the other way around ? As far as i now we haven't observed any glitches while transfering data on both sides. Also as far as i can understand you ve made some changes to the DSPS application can you share the changes and the data patterns that you send to your devices as well ?

关于你想要做什么我不太明白,所以我想你想收集数据,直到收到特定的角色,请尝试在DSPS应用程序中使用下面的片段,这应该握住你的流,直到你按下你的流直到你按下“r”“例如字符。

void app_ble_pull (void)
{
静态uint8\u t rounds\u waiting=0;
int read_amount;

if(tx_busy_flag == 0 && ble_flags.txAllowed == TRUE)
{
if((read_amount = app_item_count(&uarttoble_buffer)) > 0 && *(uarttoble_buffer.data_ptr + uarttoble_buffer.writeIdx-1) == 'r')
{
if (read_amount >= TX_WAIT_LEVEL || (rounds_waiting++) >= TX_WAIT_ROUNDS)
{
rounds_waiting = 0;
app_init_ble_tx();
}
}
}
}

Thanks MT_dialog

roinovi
Offline
Last seen:3 years 9 months ago
加入:2015-11-04 18:11
hello

hello
1) i wanted to see if the problem is in the uart transmition or the ble so i connected my mcu's tx to pin 4 in the evkit and i saw that my data (from the mcu) is transfering perfectly via uart to the evkit and to the terminal so i dont think the problem is in the uart.
this is one block of data i send periodically every second from my mcu via uart to 580 :

55 00 01 02年03 04 05 06 07年08年09年0 0 0 b c d 0 e 0 f10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD AA

above is a capture from the terminal while connecting my mcu's tx to pin 4 on the 580 and listening in the terminal to the 580 uart com, the data is transfering perfectly.

2) my setup is : my mcu ---- uart>>> dialog 580---ble>>>murata p2ml3656---uart>>>pc(terminal)
i have also saw the glitches when i recieved the data to the dsps app on ios and android (so i dont think its the changes i ve made in the sps_device which were only in the app_ble_pull in the ble transmition initiator if, e.g if((read_amount = app_item_count(&uarttoble_buffer)) > 0 && *(uarttoble_buffer.data_ptr + uarttoble_buffer.writeIdx-1) == 'r'))

i ve also changed the size of the buffer because i need to hold 1536 bytes in the uarttoble_buffer and then send via ble in order to not send while recieving uart

#define rx_buffer_item_count(int)1700
#define RX_BUFFER_ITEM_SIZE (uint8_t) 1 //**do not change item_size**
#define RX_BUFFER_HWM (int) 1190 //70%
#define RX_BUFFER_LWM (int) 510 //30%

this is how i get the data while transfering it via ble (this capture is from terminal) :

55 00 01 02 03 0485 0687 08.89 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B9C 1D9E 1F 20 21 A2 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2FB35 0 31 32 33 34 36 37 38 39 3 3 3 b c 3 d f C0 3 e41 42 43 44 45 46 47 48 C9 4A 4B 4C 4D 4E CF 50 51 52 53 54 55 56 D7 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D EE 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF 00 01 02 03 04 85 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 94 15 16 17 18 19 9A 1B 1C 1D 1E 9F 20 21 22 23 24 A5 26 27 28 29 2A 2B 2C 2D AE 2F 30 31 32 33 34 35 36 B7 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 C9 4A 4B 4C 4D 4E 4F 50 51 52 D3 54 55 56 57 58 59 5A 5B DC 5D 5E 5F 60 61 62 63 64 65 E6 67 68 69 6A 6B 6C ED 6E 6F 70 71 F2 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF 00 01 02 03 84 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D9E 1F 20 21 22 23 24 25 26A7 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 B5 36 B7 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A CB 4C 4D 4E 4F 50 51 52 53 54 D5 56 57 58 59 5A 5B 5C 5D 5E 5F 60 E1 62 63 64 65 66 67 68 E9 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF 00 01 02 03 04 05 86 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 A5 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 B8 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 C6 47 48 49 4A 4B 4C 4D CE 4F 50 51 52 53 54 55 56 57 58 59 DA 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 F1 72 73 74 75 76 77 78 79 7A FB 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 92 13 14 15 16 17 18 19 9A 1B 9C 1D 9E 1F A0 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E BF 40 C1 42 43 44 C5 46 C7 48 C9 4A CB 4C 4D 4E 4F 50 51 52 D3 54 55 56 57 58 59 5A DB 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 F9 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF 00 81 02 03 04 05 06 07 08 09 8A 0B 8C 0D 0E 0F 10 91 12 93 14 95 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 B3 34 35 36 37 38 39 3A 3B 3C BD 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F D0 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D DE 5F 60 61 62 63 64 65 66 67 68 69 6A 6B EC 6D EE 6F 70 71 72 73 74 F5 76 77 78 79 FA 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD AA

the data is supposed to be numbers in ascending order (starting with 55) and as you can see there are glitches
in binary, the glitch is in the first bit e.g: instead of 05 i get 85 which in binary is : 10000101 instead of 00000101
the same about 1C and 9C : 10011100 instead of 00011100 etc

我怀疑这祝福和时发生uart are transmitting simultaneously, can it be?
我试图只在没有UART发送时发送,所以我做到了:

if ( (uart_flags.txAllowed==TRUE )

但还有毛刺,

3)关于通过UART收集数据,直到收到特定的Chareer然后通过UART发送(你是正确的,这就是我想要做的)
i tried what you sugested :
void app_ble_pull (void)
{
静态uint8\u t rounds\u waiting=0;
int read_amount;

if(tx_busy_flag == 0 && ble_flags.txAllowed == TRUE)
{
if((read_amount = app_item_count(&uarttoble_buffer)) > 0 && *(uarttoble_buffer.data_ptr + uarttoble_buffer.writeIdx-1) == 'r')
{
if (read_amount >= TX_WAIT_LEVEL || (rounds_waiting++) >= TX_WAIT_ROUNDS)
{
rounds_waiting = 0;
app_init_ble_tx();
}
}
}
}

it works

tnx

Bendaa
Offline
Last seen:3年3个月前
加入:2014-01-12 15:29
Hi MT,

Hi MT,

I'm contacting you on behalf of Roi as Dialog local disti in Israel.
我们真的需要您的帮助来解决保持挖掘的问题。
Roi is still getting glitches on the data he receives over the BLE interface.

他们将问题隔离到以下场景:
MCU-->(UART)-->DA14580DEVKT-B-->(BLE)-->Murata modue使用对话框
ROI描述了上述通信的故障。

Few points to consider:
MCU - EFM32
Using the internal MCU oscillator.
当通过UART测试HyperTerminal以超级疯狂的通用邮件到BLE并返回UART,不会发生故障。

Please advise if you can think of a solution.

提前致谢
Dan
TRITECH

Attachment:
MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-06-08 11:34
roinovi,Bendaa,

roinovi,Bendaa,

我们正在研究您的问题并尝试解决这个问题。当您说从超级终端到超级终端的测试,您的意思是从PC到PC连接,事件不会发生?对于在BLE期间要更改的数据传输其不太可能并且除了代码中的UART或逻辑错误之外,我不会看到其他任何其他可能。我们希望您提供逻辑分析仪或示波器捕获从580到MCU的数据,并从MCU与0xAA或0x55从MCU转移到580,以检查MCU上UART的时钟我们也想提供捕获错误情况以弄清楚。

Thanks MT_dialog

roinovi
Offline
Last seen:3 years 9 months ago
加入:2015-11-04 18:11
是的,我的意思是从PC到PC

是的,我的意思是从PC到PC,事件并不发生。
此外,正如我之前所说的那样,我想看看问题是否在UART发送中,所以我将MCU的TX连接到EVKIT中的引脚4(也是UART RX),我看到我的数据(来自MCU)是完全通过UART转移到EVKIT和终端。所以它仍然是一个uart问题吗?
can it be something in the sps code? maybe something with managing the data in the buffer?

当您尝试模拟问题时,尝试每秒传输1536字节(这是我的系统)

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-06-08 11:34
roinovi,

roinovi,

We dont think that is a code issue or the changes you ve made in the code, we also dont think that the changed buffers has something to do with it. We suppose that is a clock issue between the MCU you are using and the 580. So, we would like the captures mentioned in the previous post to make sure. Flipping bits sounds more like a timing or an electrical problem and if was something in the code i suppose that it should occur in a pc to pc connection. I ve tried to simulate your problem using the exact settings that you 've mentioned above (changed the definesrx_buffer_item_count,rx_buffer_item_size,rx_buffer_hwm,设备侧的rx_buffer_lwm并发送了粘贴的确切数据) i haven't achieved in reproducing the problem on two pc connection and we dont have the external MCU you are using.

Thanks MT_dialog

roinovi
Offline
Last seen:3 years 9 months ago
加入:2015-11-04 18:11
hello

hello
我试着把我的mcu的uart速率降低到38400,数据传输一路正常(uart)
what can be the reason that in 115200 the flipping bit occures?
is there something that can be done?

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-06-08 11:34
roinovi,

roinovi,

I though that you ve tried to lower the baud rate and the incident still occured, in that case the reason, and thats why i ve wanted to check the data rate of your MCU, is that the 580 uart can't achieve the 115200 rate, the actual baud rate of the 580 is about 111111.111, and cant keep up with your external MCU, so every once and a while the sampling of the data is delayed and you get this flipping bit incident.

Thanks MT_dialog

roinovi
Offline
Last seen:3 years 9 months ago
加入:2015-11-04 18:11
有另一个模ule that

是否有另一个可以实现115K UART的模块?
what is the maximum rate of the 580?

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-06-08 11:34
roinovi,

roinovi,

In all the 58x family this is the baud rate it can be achieved for the 115200 standard. As i mentioned in my previous post the data rate that 580 can achive is about 111.111 rate. Please check the uart_sps.h in order to have a look how to calculate the exact baud rate on the 580.

Thanks MT_dialog

roinovi
Offline
Last seen:3 years 9 months ago
加入:2015-11-04 18:11
hello

hello
如果我将580模块连接到外部水晶32khz,我将能够获得更准确的Baude率吗?
靠近115200的立场?

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
加入:2015-06-08 11:34
roinovi,

roinovi,

不,恐怕这不会改变任何东西,XTAL32仅用于低功耗时钟,而不是用于在UART中生成时钟。

Thanks MT_dialog