Hi guys, I'm having an issue sending/receiving texts from a PC through a USB communication to an EEPROM memory connected to my ST board.
I'm currently working on the STM32L0538-DISCO development board and the EEPROM I'm using is a DS2431. The communication between the EEPROM and the board is made using OneWire protocol. On my PC I'm using Realterm as a terminal to send/receive ASCII characters from/to the board.
On my code I made a loop that has the following behaviour : when I send something to be written on the memory and the action is finished then it automatically reads what was written at the same address on the memory and keep looping until the content stored is identical to the one sent from the PC.
When I write/read the content of the memory it works but it takes different amounts of loops for the action to be completely successful. For example, sometimes it can be done directly or sometimes take 5 loops with the same strings being sent. It is not problematic at all for a user because either way the communication will still last less than a second so it'll actually be transparent for him, but as a developer I would like it to be 100% functional.
Besides, if I try using a UART communication instead of the USB between my PC and the board then it works directly every time. Also, if I try sending some strings to the board via USB without going through the memory but just display it on the ePaper present on this board then it is displayed perfectly on it directly. So I seem to be missing the point here.
The thing is, for this project I absolutely need to use a USB connection.
So I would like to know how could I get the same efficiency that I'm getting with UART but with the USB and more importantly what causes these issue ?