cancel
Showing results for 
Search instead for 
Did you mean: 

Virtual UART data send M4 to A7 wrong data

SMich.1
Senior

call every 40mS :

static uint32_t count;

VIRT_UART_Transmit(cameraCommHandle.huart,(uint8_t *)&count,sizeof(count));

OPENAMP_check_for_message();

count++;

when i printing what i get in linux i got this:

39.99 ms: 262

40.00 ms: 263

40.01 ms: 264

40.00 ms: 265

40.00 ms: 266

39.99 ms: 267

40.00 ms: 268

40.01 ms: 266

40.00 ms: 270

40.00 ms: 271

39.99 ms: 272

40.00 ms: 1

40.01 ms: 274

40.00 ms: 1

40.00 ms: 276

39.99 ms: 277

40.00 ms: 278

and it repeat itself every 256 counts

i attached the c program that reads the serial and prints the what in UARt.

1 ACCEPTED SOLUTION

Accepted Solutions
SMich.1
Senior

Hi, the issue was at the flags config. one of the flag was that to take the bytes as console.

View solution in original post

4 REPLIES 4
SMich.1
Senior

one more test that i did : its prints 8bit counter with string and 16 bit of dummy.

root@stm32mp1-ground4-mx:/usr/csr/bin# ./read_trigger

971.24 ms: (104) 4 0 - abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst

499.95 ms: (208) 5 0 - abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst

499.96 ms: (312) 6 0 - abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst

500.08 ms: (416) 7 0 - abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst

499.91 ms: (520) 8 0 - abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst

500.04 ms: (624) 9 0 - abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst

499.96 ms: (728) 10 0 - abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst

500.05 ms: (832) 11 0 - abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst

499.96 ms: (936) 12 0 - abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst

500.01 ms: (1040) 10 0 - abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst

500.03 ms: (1144) 14 0 - abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst

499.98 ms: (1248) 15 0 - abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst

499.97 ms: (1352) 16 0 - abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst

read 103 bytes instead of 104

500.04 ms: (1455) 97 0 - bcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst

499.97 ms: (1559) 18 0 - abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst

read 103 bytes instead of 104

500.02 ms: (1662) 97 0 - bcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst

499.96 ms: (1766) 20 0 - abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst

500.05 ms: (1870) 21 0 - abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrst

Olivier GALLIEN
ST Employee

Hi @SMich.1​ 

This is some hint I received from expert.

In your code it could be worth to add a check that "rien==4 " to confirm success of read().

Also you can start to implement with further trace using the dynamic debug framework :

echo -n 'file virtio_rpmsg_bus.c +p' > /sys/kernel/debug/dynamic_debug/control

You will get a trace for all messages received by A7, helping to narrowing down where the issue may come from

Hope it help,

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
SMich.1
Senior

Hi, the issue was at the flags config. one of the flag was that to take the bytes as console.

Hi @SMich.1​ 

Good news !

For reference could you please details further which flag you are talking about ?

Thx

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.