Forum breadcrumbs - You are here:ForumGeneral: HelpHelp with UsartModule
You need to log in to create posts and topics.

Help with UsartModule

I need to manage serial communication, partly managed by the sketch and partly randomly. I send data as in esp01 with: Simulator::self()->addEvent( 1, this ); // Send Reply, Reception is automatic, but the amount of data gives me this error: Warning: Simulator::addEvent Repeated event. How should I manage transmissions to avoid warnings?

Regards

When I ran this error feature, I made a circular buffer for events.
If there's an active event, I just put the new event in the buffer without calling addEvent().
At the end of runEvent(), I check if there's a next event.

I attached my code. In this sample code, I use 500ps delay for events and buffer size is 16.

Uploaded files: