Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel3
minLevel2
indent20px

...

For proper operation, the core layer needs an OS task that will manage the core events. For more information on the purpose of this task or on what a core event is, refer to the Task Model page. The core events must be queued in a data structure and be processed by the core. This allows the core to process the events in a task context instead of in an ISR context, as most of the events will be raised by the device driver’s ISR. The core task also needs to be informed when a new event is queued.  describes Figure - Core events management within RTOS port describes the core events management within the RTOS port.

Anchor
Figure - Core events management within RTOS port
Figure - Core events management within RTOS port

Panel
borderWidth0
titleFigure - Core events management within RTOS port

Core events management within RTOS portImage Added


Panel
bgColor#f0f0f0

(1) A core event is added to the queue.

(2) The core task of the core layer pends on the queue. Whenever an event is added, the core task is resumed to process it.


Debug Events Management

The core layer of μC/USB-Device offers an optional feature to do tracing and debugging. For more information on this feature, see the Debug and Trace page. This feature requires an OS task. For more information on the purpose of this task or on debug events, refer to the Task Model page. The behavior of this task is similar to the core task described in the Core Events Management section. The difference is that the RTOS port does not need to manage the queue, as it is handled within the core layer. The RTOS port only needs to provide a signal that will inform of a debug event insertion.

...

The core layer needs a way to signal the application about the synchronous transfer completion. The core will need one signal per endpoint. The RTOS resources usually used for this signal is a semaphore.  describes a synchronous transfer completion notificationFigure - Synchronous transfer completion notification describes a synchronous transfer completion notification.

Anchor
Figure - Synchronous transfer completion notification
Figure - Synchronous transfer completion notification

Panel
borderWidth0
titleFigure - Synchronous transfer completion notification

Synchronous transfer completion notificationImage Added


Panel
bgColor#f0f0f0

(1) Application task calls a synchronous transfer function.

(2) While the transfer is in progress, the application task pends on the transfer completion signal.

(3) Once the transfer is completed, the core will post the transfer completion signal which will resume the application task.