AnsweredAssumed Answered

Missing Byte VCP example

Question asked by Blubimo on Jul 7, 2015
Latest reply on Jul 20, 2015 by Blubimo
Hello everyone,

I'm facing a problem in which I'm clueless how to solve. Maybe someone can help me out or give me some hints.

To the setup:
I'm running two STM32, one STM32F0 to communicate via USB with a PC and a STM32F1 for the application. The STM32F0 is used to enable a firmwareupdate of the STM32F1 via USB. An update function of the STM32F0 sould also be possible (is working).

This looks like this:
USB -----> STM32F0 (UART2) ------> (UART1) STM32F1
                        (UART1) ------> RS232

The UART1 is for internal use only, it can not be used by the user.

On the STM32F0 I'm running the VCP example with some few additions.
The communication between the USB and the STM32F1 (through the STM32F0) works.

I'm setting the STM32F1 into boot mode. Open up the Flash Loader Demonstrator and programm the STM32F1 throught the STM32F0 virtual com port. After the flash process is done, the verify always fails. The fail is always at 14% (address 0x8003000). Therefore I believe that a byte gets lost.

To get a clue if this is the case, I use the UART1 to send everything the STM32F0 is receiving via the USB back to a COM port of my PC. Now everything which is transmitted via UART2 to the STM32F1 gets send directly back to my PC.
The STM32F1 is sending all bytes received from the STM32F0 back as well.
With this I'm having the bytes the STM32F1 gets on the USB and the bytes the STM32F0 should sends on a COM Port.
These always should be the same, however sometimes I'm missing a byte on the USB.
Therefore the STM32F1 is receiving one byte less than the STM32F0 sends.
But the mirrored date on UART1 is complete.

Now I have no idea where the one byte gets lost. Does anybody has a clue?

The problem is pretty rough to explain. I hope it's clear what I tried to explain.