HF Interface Wrapper 0.1.0-dev
Embedded C++ hardware abstraction layer
Loading...
Searching...
No Matches
TimerComprehensiveTest.cpp File Reference

ESP32-C6 Periodic Timer Comprehensive Test Suite v2.0. More...

Include dependency graph for TimerComprehensiveTest.cpp:

Classes

struct  CallbackTestData
 

Functions

static void precision_timer_callback (void *user_data)
 
static void simple_timer_callback (void *user_data)
 
bool test_timer_initialization () noexcept
 
bool test_timer_start_stop () noexcept
 
bool test_timer_period_validation () noexcept
 
bool test_timer_callbacks () noexcept
 
bool test_timer_statistics () noexcept
 
bool test_timer_error_conditions () noexcept
 
bool test_timer_stress () noexcept
 
bool test_timer_information () noexcept
 
bool test_timer_resource_management () noexcept
 
void app_main (void)
 

Variables

static const char * TAG = "TIMER_Test"
 
static TestResults g_test_results
 
static CallbackTestData g_callback_data
 
static constexpr bool ENABLE_CORE_TESTS = true
 
static constexpr bool ENABLE_CALLBACK_TESTS = true
 
static constexpr bool ENABLE_DIAGNOSTIC_TESTS = true
 
static constexpr bool ENABLE_STRESS_TESTS = true
 

Detailed Description

ESP32-C6 Periodic Timer Comprehensive Test Suite v2.0.

This comprehensive test suite provides extensive testing of the EspPeriodicTimer class, which implements high-precision periodic timing functionality for ESP32-C6 systems. The test suite validates all aspects of timer functionality including initialization, callback management, precision timing, error handling, and performance characteristics.

Test Coverage Includes: ✓ Core timer functionality and initialization ✓ Start/stop operations and state management ✓ Period validation and precision timing ✓ Callback functionality and user data handling ✓ Statistics collection and diagnostic information ✓ Error conditions and edge case handling ✓ Stress testing and resource management ✓ Performance benchmarking and timing validation

Performance Metrics:

  • Timer precision: < 1 μs accuracy on ESP32-C6
  • Callback latency: < 10 μs typical, < 50 μs maximum
  • Start/stop operations: < 5 μs per operation
  • Memory usage: Minimal overhead with efficient resource management

Test Configuration:

  • GPIO14: Test progress indicator (HIGH/LOW toggles after each test)
  • Section indicators: 5 blinks at section start/end
  • Comprehensive error reporting and performance analysis
  • Real-time callback validation and timing measurement
Author
HardFOC Interface Wrapper Team
Version
2.0
Date
2024

Function Documentation

◆ app_main()

void app_main ( void )

◆ precision_timer_callback()

static void precision_timer_callback ( void * user_data)
static

◆ simple_timer_callback()

static void simple_timer_callback ( void * user_data)
static

◆ test_timer_callbacks()

bool test_timer_callbacks ( )
noexcept

◆ test_timer_error_conditions()

bool test_timer_error_conditions ( )
noexcept

◆ test_timer_information()

bool test_timer_information ( )
noexcept

◆ test_timer_initialization()

bool test_timer_initialization ( )
noexcept

◆ test_timer_period_validation()

bool test_timer_period_validation ( )
noexcept

◆ test_timer_resource_management()

bool test_timer_resource_management ( )
noexcept

◆ test_timer_start_stop()

bool test_timer_start_stop ( )
noexcept

◆ test_timer_statistics()

bool test_timer_statistics ( )
noexcept

◆ test_timer_stress()

bool test_timer_stress ( )
noexcept

Variable Documentation

◆ ENABLE_CALLBACK_TESTS

constexpr bool ENABLE_CALLBACK_TESTS = true
staticconstexpr

◆ ENABLE_CORE_TESTS

constexpr bool ENABLE_CORE_TESTS = true
staticconstexpr

◆ ENABLE_DIAGNOSTIC_TESTS

constexpr bool ENABLE_DIAGNOSTIC_TESTS = true
staticconstexpr

◆ ENABLE_STRESS_TESTS

constexpr bool ENABLE_STRESS_TESTS = true
staticconstexpr

◆ g_callback_data

CallbackTestData g_callback_data
static

◆ g_test_results

TestResults g_test_results
static

◆ TAG

const char* TAG = "TIMER_Test"
static