I have an Arrow SmartEverything MCS27561-TIGER board with a Kinetis KW41Z512VHT4 which I have been using with MCUXpresso IDE 11.1 and had luck getting it to program the "hello world" example and "bluetooth beacon freertos" example via a J-LINK mini on port J10. I went to program the "bluetooth ble shell freertos example" and the red LED connected to KW41 PTC1 continuously flashes and I can no longer connect to the board with the J-LINK.
J-LINK commander initiates a Connect Under Reset and I notice the RGB LED plash green for a moment then back to flashing red and J-LINK commander error's out with "Error: InitTarget(): PCode returned with error code -1".
Is there a way to wipe the KW41 to a blank slate or for a flash mode?
Thanks,
~Nick
Full J-LINK Commander output below:
SEGGER J-Link Commander V6.54c (Compiled Nov 7 2019 17:01:56)
DLL version V6.54c, compiled Nov 7 2019 17:01:02
Connecting to J-Link via USB...O.K.
Firmware: J-Link EDU Mini V1 compiled Oct 22 2019 16:28:45
Hardware version: V1.00
S/N: 801009322
License(s): FlashBP, GDB
VTref=1.813V
Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: MKW41Z512XXX4
Type '?' for selection dialog
Device>
Please specify target interface:
J) JTAG (Default)
S) SWD
T) cJTAG
TIF>S
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "MKW41Z512XXX4" selected.
Connecting to target via SWD
InitTarget()
Connect Under Reset
Connect Under Reset
InitTarget()
Connect Under Reset
Connect Under Reset
****** Error: InitTarget(): PCode returned with error code -1
InitTarget()
Connect Under Reset
Connect Under Reset
InitTarget()
Connect Under Reset
Connect Under Reset
****** Error: InitTarget(): PCode returned with error code -1
Cannot connect to target.
Hi Nick,
Please be sure that the KW41 is powered. You have VTref=1.813V as your reference.
What is the DCDC set up that you have?
Regards,
Mario
Hi Mario,
J-Link commander is showing a VTREF of 1.810V, the J-LINK Mini I am using does not support a fixed VTREF so I can't explicitly set VTREF to 1.813V. Is the 3mV difference a significant factor? Another board on hand is programming fine but in Commander it is showing a VTREF of 3.298V. The boards seem to be identifying differently to the J-Link Mini.
Power is currently fed from USB to an 3.3V 1A LDO then into the KW41Z.
What makes me think that I am stuck in a reset loop is that I have another identical board here which runs and programs fine but I have not tested the "bluetooth beacon freertos" example out of fear of bricking another board.
Is there a way to force a flash erase on the KW41Z to kick it out of this reset loop?
Thanks,
~Nick
Hi Nick,
What is the DCDC mode that you are working on? I want to be sure why are you getting the VTREF of 1.813V
The reset loop that you are seeing is because the flash memory is empty, so when it tries to fetch the instructions the devices enter to a hard fault, the reset process starts again.
Regards,
Mario