Need some basic help with new FRDM-K66 dev board and MCUxpresso IDE

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

Need some basic help with new FRDM-K66 dev board and MCUxpresso IDE

1,168 Views
mrice
Contributor I

I have the Freedom K66 dev board, windows 10, and MCUXpresso.  Do I need additional hardware in order to download and debug the sample applications on this board?  I can not get the IDE to download just the hello_world example (it compiles but when I try to debug there is a momentary blinking of a red led next to the micro USB connector and then "no connection could be made because the target machine actively refused it." 

Any help would be appreciated!

I have checked for any apparent issues under the device manager but it seems that the J-link drivers are installed and accepted by the system.  Beneath Ports I see a "JLink CDC UART Port (COM5)" which I am able to connect to using TeraTerm to see the serial output of the default app which came on the FRDM board (the accelerometer demo output).  Beneath Universal Serial Bus controllers I see an item "J-Link driver" which says it is working properly.  I really have no idea what to do from here.

 

0 Kudos
7 Replies

1,154 Views
mrice
Contributor I

Here's a little more information.  I'm following the step by step guide from 

https://www.nxp.com/document/guide/get-started-with-the-frdm-k66f:NGS-FRDM-K66F

under "3.2 Build, Run and Debug MCUXpresso SDK Examples".  

When I get to step 2 (...click on Debug in the Quickstart Panel.) I get an error and these are the messages that appear in the server console:

 

ERROR: Could not connect to target.
SEGGER J-Link GDB Server V6.98a Command Line Version
JLinkARM.dll V6.98a (DLL compiled Mar 5 2021 17:01:02)
Command line: -nosilent -swoport 2332 -select USB=621000000 -telnetport 2333 -singlerun -endian little -noir -speed auto -port 2331 -vd -device MK66FN2M0xxx18 -if SWD -halt -reportuseraction
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: on
Init regs on start: off
Silent mode: off
Single run mode: on
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: MK66FN2M0xxx18
Target interface: SWD
Target interface speed: auto
Target endian: little
Connecting to J-Link...
$$UserActionStart$$: Terms of use
$$UserActionEnd$$: Terms of use
J-Link is connected.
Device "MK66FN2M0XXX18" selected.
Firmware: J-Link OpenSDA 2 compiled Jun 11 2015 11:14:45
Hardware: V1.00
S/N: 621000000
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...
InitTarget()
Connect Under Reset
Communication error while accessing MDM-AP.
Connect Under Reset
InitTarget()
Connect Under Reset
Communication error while accessing MDM-AP.
Connect Under Reset
ERROR: InitTarget(): PCode returned with error code -1
InitTarget()
Connect Under Reset
Communication error while accessing MDM-AP.
Connect Under Reset
InitTarget()
Connect Under Reset
Communication error while accessing MDM-AP.
Connect Under Reset
ERROR: InitTarget(): PCode returned with error code -1
ERROR: Could not connect to target.

 

0 Kudos

1,137 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi @mrice :

 

I  would suggest you update J-LINK OpenSDA firmware and try it again.

Please refer to below link

https://www.nxp.com/design/software/development-software/sensor-toolbox-sensor-development-ecosystem...

 

danielchen_0-1621585807292.png

Regards

Daniel

 

0 Kudos

1,120 Views
mrice
Contributor I

"It has been reported that OpenSDA v2/2.1 bootloader could be corrupted when the board is plugged into a Windows 10 machine. For details and more information on resolving this issue, please refer to this community post. Arm Mbed DAPLink bootloaders and applications have been developed to address this compatibility issue."

-- I am guessing this is what's happened and now the board is unusable.  If I have a J-Link would the adapter linked below be appropriate to connect it to the board via the J10 header and manually recover the openSDA firmware?

https://www.mouser.com/ProductDetail/Segger-Microcontroller/80602?qs=d0WKAl%252BL4KatzyOfX3w3JA%3D%3...

0 Kudos

1,078 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi @mrice :

Please follow below flow chart to update your boards

danielchen_0-1621954002493.png

Please check below link for details

 https://os.mbed.com/blog/entry/DAPLink-bootloader-update/

If the bootloader is broken, you can use J-link to update the bootloader

https://www.segger.com/products/debug-probes/j-link/

If you don't have the J-Link debug probes, I would suggest you recover the bootloader with anther boards.

danielchen_1-1621954372073.png

 

check below link for more details

https://mcuoneclipse.com/2016/06/26/how-to-recover-the-opensda-v2-x-bootloader/

 

Regards

Daniel

 

 

 

 

0 Kudos

1,130 Views
mrice
Contributor I

I attempted to do this but it seems to have made the situation worse.  I downloaded the OpenSDA firmware (.bin) and then plugged in the FRDM-K66 while holding the reset button to put it in MSD mode.  A file explorer window appeared as expected.  I dragged the .bin onto it but then got an error message from windows.  Now the board does not respond at all when I plug in the micro usb, with the reset button pressed or not.  No leds, no notification from windows, and from MCUXpresso the probe search does not find the board at all ("JLink621000000 not found.")

 

0 Kudos

1,144 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi @mrice :

 

could you please let me know your sdk version and IDE version?

 

Regards

Daniel

0 Kudos

1,132 Views
mrice
Contributor I

MCUXpresso IDE v11.3.1 [Build 5262] [2021-04-02]

SDK Version: 2.9.0 (Epluginsite 415 2021-01-15)

 

Thank you for your help; I will try updating the OpenSDA firmware as suggested next.

 

0 Kudos