Skip to content

Commit

Permalink
Adapted to FLEX encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
rokath committed Feb 28, 2021
1 parent 84dd3e2 commit a973424
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Tiny & fast trace code for embedded device real-time PC logging (trace ID visual

## `TRICE` macros for C & C++ code

- Real fast (**under 40 CPU clocks per trace possible!!!**)
- Real fast (**12 CPU clocks per trice possible!!!**)
- TRICE in your code **reduces the needed FLASH memory** because the instrumentation code is very small (can be less 150 bytes FLASH and about 100 bytes RAM) and no printf library code nor log strings are inside the embedded device anymore.

## Possible Use Cases
Expand All @@ -69,13 +69,14 @@ Tiny & fast trace code for embedded device real-time PC logging (trace ID visual
- Using trice with an **RTOS** gives the option for detailed **task timing analysis**. Because of the very short execution time of a trice you could add

```c
TRICE8( "sig:task %d -> %d: ", previousTaskID, nexTaskID );
TRICE32( "tim:tick=%d\n", clock );
Trice8_2i( "sig:task %d -> %d: ", previousTaskID, nexTaskID );
Trice16_1i( "tim:tick=%d\n", clock );
```
to the scheduler and vizualize the output on PC. The same is possible for **interrupt timing analysis**.
- `TRICE16( "tim: myFunc %d\n", sysTick );` before and after a function call lets you easy measure the function execution time.
- Mixed case trice macros are short trices and the letter i at the end says **i**nside critical section. (FLEX encoding)
- `Trice16_1s( "tim: myFunc %d\n", sysTick );` before and after a function call lets you easy measure the function execution time.
- As graphical vizualisation you could use a tool similar to https://github.com/sqshq/sampler.
- TRICE has intentionally no target timestamps for performance reasons. On the PC you can display the *reception timestampts*. But you can add own **timestamps as parameters** for exact embedded time measurements. Having several devices with trice timestamps, **network timing measurement** is possible.
Expand Down

0 comments on commit a973424

Please sign in to comment.