aboutsummaryrefslogtreecommitdiff
path: root/libraries/libprof/profil.c
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libprof/profil.c')
-rw-r--r--libraries/libprof/profil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/libprof/profil.c b/libraries/libprof/profil.c
index 07761dd..004af77 100644
--- a/libraries/libprof/profil.c
+++ b/libraries/libprof/profil.c
@@ -30,7 +30,7 @@ extern void set_SysTick_hook(void (*hook)(void));
/* sample the current program counter */
static void SysTick_hook(void) {
- size_t pc = (size_t)((uint32_t *)__get_MSP())[5];
+ size_t pc = (size_t)((uint32_t *)__get_MSP())[7];
if (pc >= prof.lowpc && pc < prof.highpc) {
size_t idx = PROFIDX (pc, prof.lowpc, prof.scale);
prof.counter[idx]++;