# LA
[PLATFORM]

Embedded Logic Analyzer module. More...

Collaboration diagram for LA:

## Data Structures
struct | la_conf_tag
| Structure containing the configuration data of a logic analyzer. More...
## Defines
#define | LA_CONF_LEN 10
| Length of the configuration data of a logic analyzer.
## Functions
void | la_get_conf (struct la_conf_tag *conf)
| Write the current configuration of the logic analyzer to the structure passed as parameter.
static void | la_dump_trace_timestamp_and_stop (void)
| trace fw trace timestamp and stop LA trace
void | la_dump_trace (struct dbg_debug_dump_tag *dbg_dump)
| Dump all the debug information and trace.
void | la_init (void)
| Initialize the embedded logic analyzer.
void | la_start (void)
| Start the embedded logic analyzer.
void | la_stop (void)
| Stop the embedded logic analyzer.

## Detailed Description

Embedded Logic Analyzer module.

## Function Documentation

void la_dump_trace | ( | struct dbg_debug_dump_tag * | dbg_dump | ) |

Dump all the debug information and trace.

Parameters:

  `[in]` | dbg_dump | Pointer to host memory structure where to upload the trace

static void la_dump_trace_timestamp_and_stop | ( | void |  | ) | `[static]`

trace fw trace timestamp and stop LA trace

This function simply stops the capture if LA version is lower than 5.0. Otherwise this function will first trace the value of MAC HW counter 2 (the one used to timestamp fw trace) and then stop the LA. To do so:

- All LA signals are masked (so that we're sure no hardware signals will interfere)
- Then diags configuration is updated to force software diags on both diag0/1 and diag4/5. We output software diags twice so that we can be sure that LA fully capture the counter value when both value are equal.
- The counter value is then output on software diags
- LA trace is stopped
- LA configuration is reset to its original state.

Definition at line 85 of file la.c.

References hal_machw_time(), and la_stop().

void la_get_conf | ( | struct la_conf_tag * | conf | ) |

Write the current configuration of the logic analyzer to the structure passed as parameter.

Parameters:

  `[out]` | conf | Pointer to LA configuration structure where to write

void la_init | ( | void |  | ) |

Initialize the embedded logic analyzer.

This function also starts the embedded LA.