gdb shows the following output: 0x00401480 in BBBIO_sys_pinmux_check (port=1, pin=16, Cflag=7) at ./BBBio_lib/BBBiolib.c:628 In function BBBIO_sys_pinmux_check, dereferencing this pointer causes the crash: (lines 627 and 628) reg =(void *)CM_ptr + ExpHeader_MODE0[port][pin] ; reg_value = *reg ; Any ideas?