2021-06-14 01:27 AM
I am using a STM32F4 on a custom board that is connected to PC software through USB (configured as custom HID device). I have this problem: when the PC send data to the board, the data has to be written in the eeprom memory (one byte at each transmission), but it seems that the writing operation is too slow and the communication stop. What could be the solution? I tried to make slower request of writing from the PC software but nothing changes. Thank you
2021-06-14 01:56 AM
> What could be the solution?
Multitasking, in any of its form, starting from state-machine-based cooperative multitasking (a.k.a. polling), through interrupts-based approach, all the way to using any of the RTOSes.
JW
2021-06-14 07:34 AM
Do the operation within the main loop instead of the interrupt. Transfer it to a buffer and set a flag such that the main loop knows to start writing.
2021-06-14 07:40 AM
I managed in that way, with a small buffer, but the problem is that a great number of data is written each time and the quantity is not fixed, so I would prefer to write the bytes one at a time. I am trying to do that by slowing the commands of writing, but I have still some problem.
2021-06-14 08:52 AM
2021-06-21 04:46 AM
I solved in that way at the end. Thanks