AnsweredAssumed Answered

KW01Z4128 access to UART0 registers (0x4006A000) results in hardfault

Question asked by Johan Leroy on Jul 9, 2015
Latest reply on Jul 10, 2015 by Johan Leroy

When I try to access the UART0 (and other) registers i am ending up with a hardfault. I am in privileged mode as you can see in the next log from the debugger

Any idea what can be wrong here?

 

Halting target CPU...

...Target halted (PC = 0x000004E8)

Read 2 bytes @ address 0x000016F6 (Data = 0xF000)

Read 2 bytes @ address 0x000016F6 (Data = 0xF000)

Read 2 bytes @ address 0x000016F6 (Data = 0xF000)

R0 = 00000050, R1 = F000300C, R2 = 00000C00, R3 = 00001800

R4 = 1FFFF348, R5 = FFFFFFFF, R6 = 00000000, R7 = 1FFFF161

R8 = 2BFF2EBF, R9 = B745DFDD, R10= 1FFF3000, R11= 00000000

R12= A6F97FFE, R13= 20003000, MSP= 20003000, PSP= EB7FF6E4

R14(LR) = 1FFFF159, R15(PC) = 000004E8

XPSR 01000000, APSR 00000000, EPSR 01000000, IPSR 00000000

CFBP 00000000, CONTROL 00, FAULTMASK 00, BASEPRI 00, PRIMASK 00

Reading all registers

Read 4 bytes @ address 0x000004E8 (Data = 0xF001B672)

Setting breakpoint @ address 0x0000164A, Size = 2, BPHandle = 0x0001

Setting breakpoint @ address 0x000016EC, Size = 2, BPHandle = 0x0002

Setting breakpoint @ address 0x000016F6, Size = 2, BPHandle = 0x0000

WARNING: No more breakpoint resources left

Starting target CPU...

...Breakpoint reached @ address 0x0000164A

Reading all registers

Removing breakpoint @ address 0x0000164A, Size = 2

Removing breakpoint @ address 0x000016EC, Size = 2

Removing breakpoint @ address 0x000016F6, Size = 2

WARNING: Breakpoint @ address 0x000016F6 not found

Read 4 bytes @ address 0x0000164A (Data = 0x22004B22)

Reading 64 bytes @ address 0x20002FC0

Read 4 bytes @ address 0x00001714 (Data = 0x607B2300)

Read 4 bytes @ address 0x1FFFF000 (Data = 0x01312D00)

Reading 8 bytes @ address 0x1FFFF090

WARNING: Failed to read memory @ address 0x4006A000

Reading 384 bytes @ address 0x4006B000

WARNING: Failed to read memory @ address 0x4006B000

Outcomes