6 years, 8 months ago.

MK64 I2C_Enable Method Error

Now I'm Using Hexiwear I need to disable unused driver for power save. So I tried to disable i2c2 code below.

include the mbed library with this snippet

#include "mbed.h"
#include "fsl_i2c.h"

void main(){

//I2C2-> C1 &= ~I2C_C1_IICEN_MASK;
I2C_Enable(I2C2,false);

    while(true){
    }
}

Error Reports

Quote:

++ MbedOS Fault Handler ++

FaultType: HardFault

Context: R0 : 400E6000 R1 : 00000000 R2 : 00000000 R3 : 00000000 R4 : 00000000 R5 : 00000000 R6 : 00000000 R7 : 00000000 R8 : 00000000 R9 : 00000000 R10 : 00000000 R11 : 00000000 R12 : FFFFFFFF SP : 20001ED0 LR : 00007E4D PC : 000062C6 xPSR : 61000000 PSP : 20001E68 MSP : 2002FFD8 CPUID: 410FC241 HFSR : 40000000 MMFSR: 00000000 BFSR : 00000082 UFSR : 00000000 DFSR : 00000008 AFSR : 00000000 SHCSR: 00000000 BFAR : 400E6002 Mode : Thread Priv : Privileged Stack: PSP

Thread Info: Current: State: 00000002 EntryFn: 00008149 Stack Size: 00001000 Mem: 20000ED0 SP: 20001E90 Next: State: 00000002 EntryFn: 00008149 Stack Size: 00001000 Mem: 20000ED0 SP: 20001E90 Wait Threads: State: 00000083 EntryFn: 00007D71 Stack Size: 00000300 Mem: 20000548 SP: 200007D8 Delay Threads: Idle Thread: State: 00000001 EntryFn: 000072B1 Stack Size: 00000200 Mem: 20000348 SP: 20000508

MbedOS Fault Handler

Be the first to answer this question.