# unit-test console output: Drv/UsartDriver ============================================================================== PASSED fprime-samd_Drv_UsartDriver_ut_exe (0.50s) ============================================================================== [STest::Random] Generated seed 825229 from system time [==========] Running 19 tests from 6 test suites. [----------] Global test environment set-up. [----------] 3 tests from Configure [ RUN ] Configure.Nominal *************************************** configure() programs the SERCOM once and announces readiness *************************************** *************************************** (RQ) SAMD21-UART-001: The UsartDriver shall configure SERCOM peripherals for USART operation *************************************** [ OK ] Configure.Nominal (2 ms) [ RUN ] Configure.AllParameters *************************************** configure() forwards every format parameter to the HAL *************************************** *************************************** (RQ) SAMD21-UART-001: The UsartDriver shall configure SERCOM peripherals with configurable baud rates, data formats, parity, stop bits, bit ordering, communication modes, and clock sources *************************************** [ OK ] Configure.AllParameters (0 ms) [ RUN ] Configure.QueuesRxBuffers *************************************** configure() primes both RX buffers into the RX DMA channel *************************************** *************************************** (RQ) SAMD21-UART-002: The UsartDriver shall use DMA for both transmission and reception *************************************** *************************************** (RQ) SAMD21-UART-003: The UsartDriver shall implement double-buffering for continuous RX *************************************** [ OK ] Configure.QueuesRxBuffers (0 ms) [----------] 3 tests from Configure (4 ms total) [----------] 4 tests from Send [ RUN ] Send.Nominal *************************************** send() enqueues a TX DMA transaction with correct descriptors *************************************** *************************************** (RQ) SAMD21-UART-002: The UsartDriver shall use DMA for both transmission and reception *************************************** *************************************** (RQ) SAMD21-UART-005: The UsartDriver shall queue TX requests with asynchronous completion *************************************** [ OK ] Send.Nominal (0 ms) [ RUN ] Send.QueueFull *************************************** send() returns SEND_RETRY once the TX queue is full *************************************** *************************************** (RQ) SAMD21-UART-005: The UsartDriver shall queue TX requests with asynchronous completion (a full queue returns SEND_RETRY) *************************************** [ OK ] Send.QueueFull (0 ms) [ RUN ] Send.Completion *************************************** TX DMA completion returns the buffer OP_OK via activeIn *************************************** *************************************** (RQ) SAMD21-UART-005: The UsartDriver shall queue TX requests with asynchronous completion (the buffer is returned OP_OK from the main context) *************************************** [ OK ] Send.Completion (0 ms) [ RUN ] Send.ChannelError *************************************** TX DMA bus error asserts (invalid buffer pointer handed to DMA) *************************************** *************************************** (RQ) SAMD21-UART-002: The UsartDriver shall use DMA for transmission (an unrecoverable TX DMA bus error asserts) *************************************** [ OK ] Send.ChannelError (238 ms) [----------] 4 tests from Send (240 ms total) [----------] 1 test from SendSync [ RUN ] SendSync.Nominal *************************************** sendSync() transmits synchronously through the HAL with no DMA *************************************** *************************************** (RQ) SAMD21-UART-006: The UsartDriver shall provide synchronous blocking transmission for early boot diagnostics *************************************** [ OK ] SendSync.Nominal (0 ms) [----------] 1 test from SendSync (0 ms total) [----------] 8 tests from Rx [ RUN ] Rx.SchedInNoData *************************************** schedIn with no new bytes forwards nothing downstream *************************************** *************************************** (RQ) SAMD21-UART-004: The UsartDriver shall poll the in-progress RX transfer on each rate group tick (no new bytes yields no signal and no recv) *************************************** [ OK ] Rx.SchedInNoData (0 ms) [ RUN ] Rx.SchedInPartial *************************************** schedIn forwards newly-received bytes and emits RxPartial *************************************** *************************************** (RQ) SAMD21-UART-004: The UsartDriver shall poll the in-progress RX transfer on each rate group tick to extract partial RX frames *************************************** [ OK ] Rx.SchedInPartial (0 ms) [ RUN ] Rx.SchedInRxOverflow *************************************** schedIn detects a SERCOM RX overflow and counts it in telemetry *************************************** *************************************** (RQ) SAMD21-UART-004: The UsartDriver shall detect a SERCOM RX hardware overflow on each rate group tick and count it in the rxOverflows telemetry channel *************************************** [ OK ] Rx.SchedInRxOverflow (0 ms) [ RUN ] Rx.MultiplePartials *************************************** successive partials advance the processed offset *************************************** *************************************** (RQ) SAMD21-UART-004: The UsartDriver shall poll the in-progress RX transfer on each rate group tick (repeated partials advance the buffer offset) *************************************** [ OK ] Rx.MultiplePartials (0 ms) [ RUN ] Rx.BufferDone *************************************** a completed RX buffer forwards the full buffer and emits RxFull *************************************** *************************************** (RQ) SAMD21-UART-003: The UsartDriver shall implement double-buffering for continuous RX (a full buffer drains its remainder) *************************************** [ OK ] Rx.BufferDone (0 ms) [ RUN ] Rx.BufferFlip *************************************** the active RX buffer flips A->B->A on completion *************************************** *************************************** (RQ) SAMD21-UART-003: The UsartDriver shall implement double-buffering for continuous RX (the active buffer flips A->B->A on completion) *************************************** [ OK ] Rx.BufferFlip (0 ms) [ RUN ] Rx.RecvReturnIn *************************************** recvReturnIn is a no-op; buffers remain owned by the DMA *************************************** *************************************** (RQ) SAMD21-UART-003: The UsartDriver shall implement double-buffering for continuous RX (returned buffers stay in the DMA chain) *************************************** [ OK ] Rx.RecvReturnIn (0 ms) [ RUN ] Rx.ChannelError *************************************** RX DMA bus error asserts (invalid buffer pointer handed to DMA) *************************************** *************************************** (RQ) SAMD21-UART-002: The UsartDriver shall use DMA for reception (an unrecoverable RX DMA bus error asserts) *************************************** [ OK ] Rx.ChannelError (212 ms) [----------] 8 tests from Rx (217 ms total) [----------] 2 tests from Unconfigured [ RUN ] Unconfigured.SchedIn *************************************** schedIn before configure() is a safe no-op *************************************** *************************************** (RQ) SAMD21-UART-004: The UsartDriver shall poll the in-progress RX transfer on each rate group tick (a tick before configure() is a no-op) *************************************** [ OK ] Unconfigured.SchedIn (0 ms) [ RUN ] Unconfigured.ActiveIn *************************************** activeIn before configure() is a safe no-op *************************************** *************************************** (RQ) SAMD21-UART-005: The UsartDriver shall queue TX requests with asynchronous completion (an activeIn tick before configure() delivers nothing) *************************************** [ OK ] Unconfigured.ActiveIn (0 ms) [----------] 2 tests from Unconfigured (1 ms total) [----------] 1 test from TriggerSource [ RUN ] TriggerSource.Mapping *************************************** each SERCOM maps to its matching RX DMA trigger source *************************************** *************************************** (RQ) SAMD21-UART-002: The UsartDriver shall use DMA for both transmission and reception (the correct DMA trigger is selected per SERCOM) *************************************** [ OK ] TriggerSource.Mapping (0 ms) [----------] 1 test from TriggerSource (1 ms total) [----------] Global test environment tear-down [==========] 19 tests from 6 test suites ran. (466 ms total) [ PASSED ] 19 tests.