Commit 2c7f5594 authored by Tristan Gingold's avatar Tristan Gingold

spll debug: can also log raw tags

But disabled by default
parent 8dc8edb9
......@@ -266,6 +266,11 @@ void spll_irq_entry(void)
tag_source = SPLL_TRR_R0_CHAN_ID_R(trr);
tag_value = SPLL_TRR_R0_VALUE_R(trr);
if (0) {
spll_debug(SPLL_DBG_SRC_RAW, SPLL_DBG_SIGNAL_SRC, tag_source, 0);
spll_debug(SPLL_DBG_SRC_RAW, SPLL_DBG_SIGNAL_TAG, tag_value, 1);
}
sequencing_fsm(s, tag_value, tag_source);
update_loops(s, tag_value, tag_source);
}
......
......@@ -31,6 +31,7 @@ integral/proportional gains on the response of the system.
#define SPLL_DBG_SIGNAL_TIME_MS 7
#define SPLL_DBG_SIGNAL_PHASE_CURRENT 8
#define SPLL_DBG_SIGNAL_PHASE_TARGET 9
#define SPLL_DBG_SIGNAL_SRC 10
#define SPLL_DBG_MAX_SOURCES 8 // maximum number of "source" PLLs
......@@ -38,6 +39,7 @@ integral/proportional gains on the response of the system.
#define SPLL_DBG_SRC_MAIN 1
#define SPLL_DBG_SRC_EXT 2
#define SPLL_DBG_SRC_AUX(n) (3 + ((n)&0x3)) /* ... : Main PLL aux clock N */
#define SPLL_DBG_SRC_RAW 7
#define SPLL_DBG_LAST_FLAG 0x80
......
......@@ -1438,6 +1438,8 @@ static const char *dbg_source_to_string(int src)
return "aux3";
case SPLL_DBG_SRC_EXT:
return "ext";
case SPLL_DBG_SRC_RAW:
return "raw";
default:
return "<unknown?>";
}
......@@ -1465,6 +1467,8 @@ static const char *dbg_signal_to_string(int src)
return "phase_current";
case SPLL_DBG_SIGNAL_PHASE_TARGET:
return "phase_target";
case SPLL_DBG_SIGNAL_SRC:
return "source";
default:
return "<unknown?>";
}
......@@ -1533,7 +1537,7 @@ void spll_dump_debug_data(const uint32_t *buf, size_t size)
if (sig == SPLL_DBG_SIGNAL_EVENT)
{
printf(" event=%s", dbg_event_to_string(value));
printf("event=%s ", dbg_event_to_string(value));
}
printf("%s=%d ", dbg_signal_to_string(sig),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment