Question
How do I get the Systick values from register in real-time ?
Posted on July 09, 2014 at 07:51
For now, I need to do a simple benchmark of memcpy. Here, it's pseudocode.
#define SYSTICKS_REG 0xE000E018uint32_t *get_systicks (void){ return (uint32_t *) SYSTICKS_REG;}measure_start = *get_systicks ();for (int j = len; j <= i * len; j += len) { memcpy (test_dest + j, test_src, len);} measure_end = *get_systicks (); Sometimes, (measure_end - measure_start) will be zero or a big number.How can I debug it ?