cancel
Showing results for 
Search instead for 
Did you mean: 

Rarely, USB does not work properly, and in parallel with USB malfunction, there are problems with data integration on the USART1 channel.

BNowa.1
Associate

The above problems occur only with SOF packages with voltage distortion on USB lines: see oscillations on "USB signal with SOF" vs "USB signal with no SOF" when there is no oscillation and no problems indicated.

USB

Oscillations occur on SOF packages, they are not present on the "normal" transmission to the device.

It's about USB connected to USB H (not USB OTG).

The faster EHCI controller is disabled, the slower OHCI is enabled (due to forced FS transmission).

There were attempts with usb_phy_tuning, (various combinations of parameters) but it did not help.

   usb_phy_tuning: usb-phy-tuning {

      st,hs-dc-level = <2>;

      st,fs-rftime-tuning;

      st,hs-rftime-reduction;

      st,hs-current-trim = <15>;

      st,hs-impedance-trim = <1>;

      st,squelch-level = <3>;

      st,hs-rx-offset = <2>;

      st,no-lsfs-sc;

   };

Fragments of our DTS related to USB are attached ("emar205-stm-usb-dts").

USART1

On USART1 we have Mifare card reader, baud rate 115200, DMA is disabled.

For this UART, the oscilloscope waveforms are good (waveform shape and package contents are OK).

In the application receiving buffer, there are CRC errors in the received packet or no byte in the packet, although the actual packet is correct.

Examples:

"14 00 00 00 01 03 01 a4 7f 00 00 00 00 07 e2 06 01 07 06 1e f0 a2" - CRC error

"14 00 00 01 03 01 a4 7f 00 00 00 00 07 e2 06 01 07 e2 06 1e f0 a2" – frame correct

"14 00 00 00 01 00 e8 1a 60 00 00 00 00 00 00 00 00 00 00 00 50 6f" - CRC error

"14 00 00 01 00 e8 1a 60 00 00 00 00 00 00 00 00 00 00 00 00 50 6f" - frame correct

"14 00 00 00 01 08 42 41 52 59 4c 53 4b 49 46 52 4f 42 54 f8 9a"      - to short frame

"14 00 00 01 08 42 41 52 59 4c 53 4b 49 46 52 4f 42 45 52 54 f8 9a" - frame correct

Questions

1. Can the system (not the application) lose bytes in some way?

2. Is it possible to directly associate USART1 bytes loss with the USB problem as above (there is probably some connection between "clogging" USB and Mifare read errors).

We ask for help.

Attachments

1.    „emar205-stm-usb-dts�?

2.    „USB signal with no SOF�?

3.    „USB signał with SOF�?

0 REPLIES 0