I am trying to repair my project but I am getting the following error.
Flash Driver V.2 startup failed - rc Ef(34): Timed-out initializing flash.
chip initialization failed - Ef(34): Timed-out initializing flash.
failed to initialize flash driver FTFA_1K.cfx
Complete Debug Message
MCUXpresso IDE RedlinkMulti Driver v11.1 (Jul 7 2020 10:48:32 - crt_emu_cm_redlink build 5)
Found part description in XML file MKL46Z4_internal.xml
Reconnected to existing LinkServer process.
============= SCRIPT: kinetisconnect.scp =============
Kinetis Connect Script
Connecting to Probe Index = 1
This probe = 1
This TAP = 0
This core = 0
DpID = 0BC11477
Assert NRESET
Reset pin state: 00
Power up Debug
MDM-AP APID: 0x001C0020
MDM-AP System Reset/Hold Reset/Debug Request
MDM-AP Control: 0x0000001C
MDM-AP Status (Flash Ready) : 0x00000032
Part is not secured
MDM-AP Control: 0x00000014
Release NRESET
Reset pin state: 01
MDM-AP Control (Debug Request): 0x00000004
MDM-AP Status: 0x0001003A
MDM-AP Core Halted
============= END SCRIPT =============================
Probe Firmware: DAPLink CMSIS-DAP (ARM)
Serial Number: 0220000024914e45001f3005434d0028a771000097969900
VID:PID: 0D28:0204
USB Path: \\?\hid#vid_0d28&pid_0204&mi_03#8&11132f53&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
Using memory from core 0 after searching for a good core
debug interface type = Cortex-M0+ (DAP DP ID 0BC11477) over SWD TAP 0
processor type = Cortex-M0+ (CPU ID 00000C60) on DAP AP 0
number of h/w breakpoints = 2
number of flash patches = 0
number of h/w watchpoints = 2
Probe(0): Connected&Reset. DpID: 0BC11477. CpuID: 00000C60. Info: <None>
Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Content of CoreSight Debug ROM(s):
RBASE F0002000: CID B105100D PID 000008E000 ROM (type 0x1)
ROM 1 F0000000: CID B105900D PID 04000BB932 CSt ARM MTB type 0x31 Trace Sink - Basic trace router
ROM 1 F0001000: CID B105900D PID 000008E000 CSt MTBDWT type 0x4 Debug Control - Other
ROM 1 E00FF000: CID B105100D PID 04000BB4C0 ROM (type 0x1)
ROM 4 E000E000: CID B105E00D PID 04000BB008 Gen SCS (type 0x0)
ROM 4 E0001000: CID B105E00D PID 04000BB00A Gen DWT (type 0x0)
ROM 4 E0002000: CID B105E00D PID 04000BB00B Gen FPB (type 0x0)
NXP: MKL46Z256xxx4
DAP stride is 1024 bytes (256 words)
Inspected v.2 On chip Kinetis Flash memory module FTFA_1K.cfx
Image 'Kinetis SemiGeneric Jul 7 2020 10:53:12'
Opening flash driver FTFA_1K.cfx
Sending VECTRESET to run flash driver
AFTER driver startup timeout (302 5ms retries)
Driver Addresses
Start: 20000000
Entry: 2000009D
End: 200006DC
Stack: 200007E0
Mailbox:20000BE0
Driver Register State
R0: 20000BE0
R1: 00000000
R2: 00000000
R3: 00000000
R4: 00000000
R5: 00000000
R6: 00000000
R7: 00000000
R8: 00000000
R9: 00000000
R10: 00000000
R11: 00000000
R12: 00000000
SP: 20005FE0
LR: FFFFFFF9 (exception from main thread)
PC: 00000142
xPSR: F1000002
MSP: 20005FE0
PSP: 200007E0
CFBP: 00000000 (CONTROL=0x0, PRIMASK=0x0)
Stacked Exception information at MSP
20005FFC: xPSR: F1000000
20005FF8: VECTPC: 000000D4
20005FF4: LR: FFFFFFF9
20005FF0: R12: 00000000
20005FEC: R3: 00000000
20005FE8: R2: 00000000
20005FE4: R1: 00000000
20005FE0: R0: 20000BE0
Exception registers
E000ED04: ICSR: 00000002 (VECTPEND=0(none), VECTACTIVE=2(NMI))
E000ED08: VTOR: 00000000 TBLBASE=0(INCODE), TBLOFF=0x0
E000ED28: MMFSR: 00
E000ED29: BFSR: 00
E000ED2A: UFSR: 0000
E000ED2C: HFSR: 00000000
E000ED30: DFSR: 00000001 (HALTED)
E000ED3C: AFSR: 00000000
E000ED24: SHCSR: 00000000
E000ED34: MMAR: 00000000
E000ED38: BFAR: 00000000
E000EDFC: DEMCR: 01000000 (TRCENA)
VECTPC instructions near F1000000
F0FFFFFC: (can't read - Nn(05). Wire ACK Fault in DAP access)
F0FFFFFE: (can't read)
Flash Driver V.2 startup failed - rc Ef(34): Timed-out initializing flash.
chip initialization failed - Ef(34): Timed-out initializing flash.
failed to initialize flash driver FTFA_1K.cfx
Hi Damian, I hope you're doing well!
From the attached log, I can see that the xPSR register indicates that there's an NMI exception in the chip:
xPSR: F1000002
The 2 indicates an NMI exception.
Could you please confirm the connection of the NMI_b pin in the KL46 to ensure that the interrupt is not being called?
For more information, could you please take a look at the KL46Z's Datasheet?
Please let me know if you continue to have issues.
Best regards,
Sebastian