... | ... | @@ -85,4 +85,39 @@ The ISR will use k_thread_priority_set to take back the control thread priority |
|
|
En pratique le timing du temps passé dans l'interruption est observé par un GPIO tandis que le temps passé dans le contexte switch est visualisé par un second gpio (voir capture d'écran ci-dessous).
|
|
|
|
|
|
\
|
|
|
![image](uploads/f35c81119fcbec7a82ebf8e4dfec612d/image.png) |
|
|
\ No newline at end of file |
|
|
![image](uploads/f35c81119fcbec7a82ebf8e4dfec612d/image.png)
|
|
|
|
|
|
_Channel 1 is the overhead of the ISR, and channel 2 is the time taken to switch from ctrl thread to app1._
|
|
|
|
|
|
<table>
|
|
|
<tr>
|
|
|
<th>Worst case timing observed</th>
|
|
|
<th>Time spent in ISR</th>
|
|
|
<th>Time spent switching from Ctrl threaad to app1 thread</th>
|
|
|
<th>Total overhead</th>
|
|
|
<th>Total overhead in % (Ctrl thread @20kHz)</th>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>No optimizations</td>
|
|
|
<td>11 us</td>
|
|
|
<td>14 us</td>
|
|
|
<td>25 us</td>
|
|
|
<td>50 %</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<span dir="">CONFIG_SPEED_OPTIMIZATIONS</span>=y
|
|
|
|
|
|
</div>
|
|
|
</div></td>
|
|
|
<td>11 us</td>
|
|
|
<td>12 us</td>
|
|
|
<td>23 us</td>
|
|
|
<td>46 %</td>
|
|
|
</tr>
|
|
|
</table> |