theBrutzler / IndiaNavi_PCB

KiCAD Design files for the India Navi device
10 stars 2 forks source link

Power management GPIOs #30

Open DasBasti opened 1 year ago

DasBasti commented 1 year ago

please see: https://github.com/DasBasti/IndiaNavi_Firmware/issues/10

DasBasti commented 1 year ago

Check which GPIO are used for Power management tracing.

define PM_TRACE

Prompt: Enable debug tracing of PM using GPIOs

If enabled, some GPIOs will be used to signal events such as RTOS ticks, frequency switching, entry/exit from idle state. Refer to pm_trace.c file for the list of GPIOs. This feature is intended to be used when analyzing/debugging behavior of power management implementation, and should be kept disabled in applications.

Use these GPIOs for unimportant signals and have a way to measure them easily.

DasBasti commented 1 year ago
/* GPIOs to use for tracing of esp_pm events.
 * Two entries in the array for each type, one for each CPU.
 * Feel free to change when debugging.
 */
static const int DRAM_ATTR s_trace_io[] = {
#if !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32H2)
        BIT(4),  BIT(5),  // ESP_PM_TRACE_IDLE
        BIT(16), BIT(17), // ESP_PM_TRACE_TICK
        BIT(18), BIT(18), // ESP_PM_TRACE_FREQ_SWITCH
        BIT(19), BIT(19), // ESP_PM_TRACE_CCOMPARE_UPDATE
        BIT(25), BIT(26), // ESP_PM_TRACE_ISR_HOOK
        BIT(27), BIT(27), // ESP_PM_TRACE_SLEEP
#else
        BIT(2),  BIT(3),  // ESP_PM_TRACE_IDLE
        BIT(4),  BIT(5),  // ESP_PM_TRACE_TICK
        BIT(6),  BIT(6),  // ESP_PM_TRACE_FREQ_SWITCH
        BIT(7),  BIT(7),  // ESP_PM_TRACE_CCOMPARE_UPDATE
        BIT(8),  BIT(9),  // ESP_PM_TRACE_ISR_HOOK
        BIT(18), BIT(18), // ESP_PM_TRACE_SLEEP
#endif
};