FRDM-KV10Z Can't program (Stalling); MBED Volume 32k free space

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FRDM-KV10Z Can't program (Stalling); MBED Volume 32k free space

1,766 Views
eljeffo
Contributor III

Is this normal?

Filesystem      Size   Used  Avail Capacity   iused     ifree %iused  Mounted on

/dev/disk4      48Ki   16Ki   32Ki    34%        32         0  100%   /Volumes/MBED

I tried to load hello_world.bin from the SDK but I got some errors:

cp: hello_world.bin: could not copy extended attributes to /Volumes/MBED/hello_world.bin: Device not configured

I then tried PyOCD but then I got this:

$ pyocd-flashtool -u
INFO:root:DAP SWD MODE initialised
WARNING:root:KV10Z7 in secure state: will try to unlock via mass erase

When that failed, I tried upgrade OpenSDA but now there's not enough free space to upload anything at all (even in bootloader mode).  The Segger OpenSDA bin files are well over 32k.

Trying to copy a smaller item results in a never finishing copy:

$ cp k20dx128_bootloader_0x8000.bin /Volumes/MBED #stalls "forever"

And now trying to replace the demo app (in non-bootloader)

$ cp ecompass.bin  /Volumes/MBED/ # stalls forever

Perhaps there's something I'm missing?

Did my KV10Z somehow get locked and that's why I can't write a new program?

Is my bootloader working properly?  Is it showing up as the MBED volume proof enough that my bootloader isn't bricked?  If bootloader is okay, why does updating the bootloader (in bootload update mode; reset pin down on power-up) stall on copy?

Labels (1)
0 Kudos
5 Replies

1,006 Views
eljeffo
Contributor III

Tried in windows as well but no luck

3E6C658B-9EB0-4445-93E4-0B6EA94B5E72.png

F15A11BC-3E9F-4CD5-B135-E1F04DCA1F62.png

0 Kudos

1,006 Views
eljeffo
Contributor III

So I'm trying with a Segger Jlink.  I cut J8 and J12 to isolate the KV10Z and here's where I am so far.

1) You'll see a reset attempt fail with just the SWD_DIO/CLK attached

2) You'll see that even pulling reset low for the KV10Z does not seem to help the situation

Initial SWD Unlock Failure

Device "MKV10Z32XXX7" selected.

Found SWD-DP with ID 0x0BC11477
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Device will be unsecured now.
Found SWD-DP with ID 0x0BC11477
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Device will be unsecured now.

****** Error: Kinetis (connect): Timeout while unsecuring device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.

Found SWD-DP with ID 0x0BC11477
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Device will be unsecured now.
Found SWD-DP with ID 0x0BC11477
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Device will be unsecured now.

****** Error: Kinetis (connect): Timeout while unsecuring device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.

Cannot connect to target.


Pull RST_TGTMCU_B Low
SEGGER J-Link Commander V6.14 (Compiled Feb 23 2017 17:31:49)
DLL version V6.14, compiled Feb 23 2017 17:31:36

Connecting to J-Link via USB...O.K.
Firmware: J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04
Hardware version: V7.00
S/N: 20090928
License(s): RDI,FlashDL,FlashBP,JFlash,GDBFull
VTref = 3.300V


Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: MKV10Z32XXX7
Type '?' for selection dialog
Device>
Please specify target interface:
  J) JTAG (Default)
  S) SWD
TIF>S
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "MKV10Z32XXX7" selected.


Found SWD-DP with ID 0x0BC11477
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Device will be unsecured now.
Found SWD-DP with ID 0x0BC11477
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Device will be unsecured now.

****** Error: Kinetis (connect): Timeout while unsecuring device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.

Found SWD-DP with ID 0x0BC11477
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Device will be unsecured now.
Found SWD-DP with ID 0x0BC11477
Protection bytes in flash at addr. 0x400 - 0x40F indicate that readout protection is set.
For debugger connection the device needs to be unsecured.
Note: Unsecuring will trigger a mass erase of the internal flash.
Device will be unsecured now.

****** Error: Kinetis (connect): Timeout while unsecuring device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.

Cannot connect to target.
J-Link>
0 Kudos

1,006 Views
eljeffo
Contributor III

Okay moved the Jumper and reflashed OpenSDA2 onto the KV10Z board.

However... still the same copying problem.  

Is there some chance I got a locked Kinetis from the factory?

How long does this mass-erase to unlock take?

WARNING:root:KV10Z7 in secure state: will try to unlock via mass erase

0 Kudos

1,006 Views
eljeffo
Contributor III

Tried to check if holding down the reset button during boot would give me a BOOTLOADER volume but it doesn't.  I get an MBED labeled volume whether or not the reset button is down.  

Is this correct?  Do I have a broken reset button?

0 Kudos

1,006 Views
eljeffo
Contributor III

Just to verify it wasn't a mac problem I tried uploading a .bin file via Windows 7.  Same issue, board completely stalls:

FRDM-KV10Z_-_Windows_7_Upload.png

0 Kudos