ARMmbed / mbed-os

Arm Mbed OS is a platform operating system designed for the internet of things
https://mbed.com
Other
4.67k stars 2.98k forks source link

DISCO_L072CZ_LRWAN1 loses TX bytes #9558

Closed juhhov closed 5 years ago

juhhov commented 5 years ago

Description

Issue request type

[ ] Question
[ ] Enhancement
[x] Bug
0xc0170 commented 5 years ago

cc @ARMmbed/team-st-mcd @ARMmbed/mbed-os-wan

jeromecoutant commented 5 years ago

Hi

What is the SHA of Mbed OS (git log -n1 --oneline)? a8f0c33

Do you know if it was it OK with previous version ?

Thx

cmonr commented 5 years ago

@juhhov Would you mind providing the exact output? Are they always the same missing characters?

juhhov commented 5 years ago

@jeromecoutant I don't know. If you provide other version worth testing I can do it.

@cmonr They are not. Here is some rounds:

/>eho66e745a2494-11e9-ae-5f7b1e89461 
Command 'eho66e745a2494-11e9-ae-5f7b1e89461' not found.
/>eo a66e74a-2494-11e98ee-5f7b1819461 
Command 'eo' not found.
/>echa66e745-2494-11e98ee-5f7b1e19461 
Command 'echa66e745-2494-11e98ee-5f7b1e19461' not found.
/>eho a66e45a-2494-11-a8ee-5f7be819461 
Command 'eho' not found.
/>echa66e74a-2494-11e98ee-5f7b119461 
Command 'echa66e74a-2494-11e98ee-5f7b119461' not found.
/>eho a66e45a-2494-19-a8ee-5f71e819461 
Command 'eho' not found.
/>echa66e745-2494-11e98ee-5f7b1e19461 
Command 'echa66e745-2494-11e98ee-5f7b1e19461' not found.
/>echa66745a-2494-e9-a8ee-5fb1e819461 
Command 'echa66745a-2494-e9-a8ee-5fb1e819461' not found.
/>eco 6645a-249-11e9-a8ee-7b1e81946 
Command 'eco' not found.
/>ech66e745a-2-11e9-a8e5f7b1e8194 
Command 'ech66e745a-2-11e9-a8e5f7b1e8194' not found.
ciarmcom commented 5 years ago

Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-816

kjbracey commented 5 years ago

Which CLI test application are you using, exactly? I know some have been upgraded to use buffered UARTSerial, but I can see some using RawSerial just from a thread, which is going to be flakey.

How fast is the CPU running on this device? (You can print SystemCoreClock).

kjbracey commented 5 years ago

mbed-os-cliapp uses just stdin and stdout, and that should be fine, but platform.stdio-buffered-serial must remain on in its JSON configuration. Turning that off would break input.

kjbracey commented 5 years ago

Possibly related to #9577? Note that this is loss of serial characters on reception, not transmission, despite the title.

This test application is using UARTSerial via platform.stdio-buffered-serial, so an RX interrupt handler. #9577 is using RawSerial with a brute force foreground spin.

c1728p9 commented 5 years ago

Hi @juhhov what baudrate were you using when you saw the dropped bytes? And as @kjbracey-arm asked where you using UARTSerial or RawSerial?

If you were using a high baudrate, such as 115200, then running tickless of the the low power ticker will caused dropped bytes due to a uart overrun. If that is the cause then https://github.com/ARMmbed/mbed-os/pull/9785 should fix it.

juhhov commented 5 years ago

Baudrate was 115200. As @kjbracey-arm mentioned "platform.stdio-buffered-serial": true was in use.

c1728p9 commented 5 years ago

@juhhov #9785 fixes a problems with interrupt latency which causes dropped bytes. There is a good chance this is the cause of your failure. Please try this change to see if it fixes your problem.

juhhov commented 5 years ago

Built the same application against 5c24ffefa4b1c28d8f5aa9ec3e740538beaae436. The issue does not reproduce anymore. Thanks @c1728p9.