<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16277">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">debug code to use the DWT unit<br><br>Change-Id: Ide6e34425e77425b260139ac1b4c528953a994f4<br>---<br>M sysmoOCTSIM/main.c<br>1 file changed, 23 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c</span><br><span>index 959e7eb..a1b84b7 100644</span><br><span>--- a/sysmoOCTSIM/main.c</span><br><span>+++ b/sysmoOCTSIM/main.c</span><br><span>@@ -442,6 +442,29 @@</span><br><span>     char sernr_buf[16*2+1];</span><br><span>      char rstcause_buf[RSTCAUSE_STR_SIZE];</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#if 0</span><br><span style="color: hsl(120, 100%, 40%);">+CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk ; //| /* tracing*/</span><br><span style="color: hsl(120, 100%, 40%);">+////CoreDebug_DEMCR_MON_EN_Msk; /* mon interupt catcher */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+DWT->COMP0 = 0x40003028; /* sercom 0 data */</span><br><span style="color: hsl(120, 100%, 40%);">+//DWT->COMP0 = 0x40003428; /* sercom 1 data */</span><br><span style="color: hsl(120, 100%, 40%);">+DWT->MASK0 = 0; /* 0 */</span><br><span style="color: hsl(120, 100%, 40%);">+DWT->FUNCTION0 = 0; /* has to be 0 for linked address */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+DWT->COMP1 = 0xa5;     /* value */</span><br><span style="color: hsl(120, 100%, 40%);">+DWT->MASK1 = 0;     /* match all bits */</span><br><span style="color: hsl(120, 100%, 40%);">+DWT->FUNCTION1 =    (0b10 << DWT_FUNCTION_DATAVSIZE_Pos) |  /* DATAVSIZE 10 - dword */</span><br><span style="color: hsl(120, 100%, 40%);">+#if 1</span><br><span style="color: hsl(120, 100%, 40%);">+(0 << DWT_FUNCTION_DATAVADDR0_Pos) | /* Data Match linked addr pointer in COMP0 */</span><br><span style="color: hsl(120, 100%, 40%);">+#else</span><br><span style="color: hsl(120, 100%, 40%);">+(1 << DWT_FUNCTION_DATAVADDR0_Pos) | /* Data Match on any addr -> own number */</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span style="color: hsl(120, 100%, 40%);">+(1 << DWT_FUNCTION_DATAVMATCH_Pos) | /* DATAVMATCH Enable data comparation */</span><br><span style="color: hsl(120, 100%, 40%);">+(0b0111 << DWT_FUNCTION_FUNCTION_Pos);  /* generate a watchpoint event on rw */</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>         atmel_start_init();</span><br><span>  get_chip_unique_serial_str(sernr_buf, sizeof(sernr_buf));</span><br><span>    get_rstcause_str(rstcause_buf);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16277">change 16277</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/16277"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ccid-firmware </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ide6e34425e77425b260139ac1b4c528953a994f4 </div>
<div style="display:none"> Gerrit-Change-Number: 16277 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: Hoernchen <ewild@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>