Hi,
We've built a secondary board using this MCU (MK24FN1M0VDC12) and we're seeing weird errors when trying to flash this new board. We've tried both the LPC Link2 and a JLink Edu that we had around.
failed read ProgramPage message readyness - rc Em(12). Target rejected debug access at location 0x20002770
NXP: MK24FN1M0xxx12
DAP stride is 4096 bytes (1024 words)
Inspected v.2 On chip Kinetis Flash memory module FTFE_4K.cfx
Image 'Kinetis SemiGeneric May 22 2019 12:27:52'
Opening flash driver FTFE_4K.cfx
Sending VECTRESET to run flash driver
Flash variant 'K 22 FTFE Generic 4K' detected (1MB = 256*4K at 0x0)
Closing flash driver FTFE_4K.cfx
( 65) Chip Setup Complete
Connected: was_reset=true. was_stopped=true
( 70) License Check Complete
Loading 'Test.elf' ELF 0x00000000 len 0x3E49A
Opening flash driver FTFE_4K.cfx (already resident)
Sending VECTRESET to run flash driver
Flash variant 'K 22 FTFE Generic 4K' detected (1MB = 256*4K at 0x0)
Writing 255132 bytes to address 0x00000000 in Flash
1 of 1 ( 0) Writing pages 0-62 at 0x00000000 with 255132 bytes
( 0) at 00000000: 0 bytes - 0/255132
failed read ProgramPage message readyness - rc Em(12). Target rejected debug access at location 0x20002770
Closing flash driver FTFE_4K.cfx
state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
failed to send op Terminate message - rc Em(12). Target rejected debug access at location 0x20002760
(100) Writing Flash ended with an error.
File 'Test.elf' load failure: Em(12). Target rejected debug access at location 0x20002760
Loading 'Test.elf' ELF 0x0003E49C len 0x21EAC
Writing 138924 bytes to address 0x0003E49C in Flash
1 of 1 ( 0) Writing pages 62-96 at 0x0003E49C with 138924 bytes
( 0) at 0003E000: 0 bytes - 0/140104
Flash part-sector read at 0003E000[0x49C] failed - rc Em(12). Target rejected debug access at location 0x0003E000
Closing flash driver FTFE_4K.cfx
We believe it to be a problem with the board, but this is quite an odd behaviour. To sum it up:
Can you check that there are not any solder problem with the board?
can you please check the SWD signals?