Cannot connect to K28 via FRDM-K28F using blhost

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

Cannot connect to K28 via FRDM-K28F using blhost

Jump to solution
1,555 Views
edw8
Contributor III

My understanding is that the built in ROM contains an image of KBOOT on the FRDM-K28F. I have the dev board setup with DAPLink and loaded a number of projects successfully with MCUXpresso IDE in debug mode. 

My overall goal is to configure the K28 on the FRDM-K28F to boot and run from the quad spi flash on the dev board. I am following and adapting the steps listed in KBLQSPIUG (Kinetis Bootloader QuadSPI User's Guide) to the K28 however all attempts to have the K28 communicate with either blhost or the KinetisFlashTool are unsuccessful.

My procedure is as follows:

1. FRDM-K28F is powered thru the SDA USB port (next to SW1) and running an LED color cycling app from internal flash). FOPT is configured via the FlashConfigBlock to:

0x00000400 FFFFFFFF FFFFFFFF FFFFFFFF FFFFBDFE 

2. Press and hold SW2 (NMI), then press SW1 (Reset)

3. Release SW1, then release SW2

4. Attempt to connect to the board via blhost.exe. I downloaded the version included with NXP Kinetis Bootloader 2.0.0

syntax:

blhost.exe -p com19 -- get-property 1

All attempts to run this command with both default and specified baud rates error out:

Error: Initial ping failure: No response received for ping command.

Similarly, connect attempts from the KinetisFlashTool for the same com port result in 

Error: Connect device failed(Error: Initial ping failure: No response received for ping command.).

Any suggestions on what else I can try to connect, or perhaps an explanation as to what I'm missing from my setup would be greatly appreciated.

0 Kudos
1 Solution
1,149 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Please check attached <readme.txt> file, which indicate that:

On the FRDM-K28 board, the user can use the USB port to download the demo program through blhost.

I checked the FRDM-K28F board user guide, the default USB port is USB HS:

pastedImage_2.png

The ROM bootloader is using USB FS, please short the J53 jumper.

pastedImage_1.png

After that, I could use blhost with below command to download the bd file:

blhost.exe -u -- receive-sb-file hello_world_qspi.sb

pastedImage_5.png

After that, I could get [hello_world_qspi] demo run.

pastedImage_6.png

I also attached my test using [hello_world_qspi] demo image and related files for your reference.

Wish it helps.


Have a great day,
Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
4 Replies
1,149 Views
edw8
Contributor III

Hi Ma,

Thank you for your detailed setup notes and picture of your FRDM-K28F. On my board, J53 was open and J14 was shorted, otherwise, all jumpers matched yours. I was also attempting to communicate thru the OpenSDA port. I switched to the MCU USB port as you showed above and set my jumpers to match your board. 

At first, I ran into the same issues with the board:

blhost.exe -u -- get-property 1
Error: UsbHidPeripheral() cannot open USB HID device (vid=0x15a2, pid=0x0073, sn=).

I tried another FRDM-K28F board with the same jumper settings and that board worked:

blhost.exe -u -- get-property 1
Inject command 'get-property'
Response status = 0 (0x0) Success.
Response word 1 = 1258422272 (0x4b020000)
Current Version = K2.0.0

I went back to my original board, reloaded a demo project to the board from the SDK (qspi polling demo) and power cycled it with the SW2 press/release sequence and at this point I got a response with blhost. I'm guessing my FRDM-K28F got placed in a bad state when I experimented with the flash config block and the bootloader config area. 

Thanks for your help.

-Ed.

0 Kudos
1,149 Views
edw8
Contributor III

Hi Ma,

Thanks for the instructions above, however they do not seem to make a difference for getting a desirable response from the FRDM-K28F using blhost.

I tried:

1. While pressing SW2, connect the board to the host PC via USB using the OpenSDAv2.2 microUSB port, then releasing SW2 a second or two after the USB cable is attached.

2. On the host PC (Win10) I opened a cmd shell, changed dir to the <NXP-kboot-2.0>/bin/Tools/blhost/win path and running:

         blhost.exe -p com16 -- get-property 1

com16 represents the most recent virtual USB (mbed) connection to my FRDM-K28 board. This came after some experimenting with the FRDM-K28F /K20 config for various debug probes. I tried J-Link that got me to com20, then I went back to mbed/open-sda and that put me on com16.

In response to the query, I get back the following error:

Error: Initial ping failure: No response received for ping command.

I tried modifying the baud rate:

         blhost.exe -p com16,115200 -- get-property 1

and I have the same error.

I tried using the -u option:

         blhost.exe -u -- get-property 1

and got a different error:

Error: UsbHidPeripheral() cannot open USB HID device (vid=0x15a2, pid=0x0073, sn=).

My guess is that I need to get past this roadblock in order to transfer contents from my host PC to configure the boot loader.

Please let me know if you can spot a flaw in the process or perhaps a missing step?

Thanks.

-Ed.

0 Kudos
1,150 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Please check attached <readme.txt> file, which indicate that:

On the FRDM-K28 board, the user can use the USB port to download the demo program through blhost.

I checked the FRDM-K28F board user guide, the default USB port is USB HS:

pastedImage_2.png

The ROM bootloader is using USB FS, please short the J53 jumper.

pastedImage_1.png

After that, I could use blhost with below command to download the bd file:

blhost.exe -u -- receive-sb-file hello_world_qspi.sb

pastedImage_5.png

After that, I could get [hello_world_qspi] demo run.

pastedImage_6.png

I also attached my test using [hello_world_qspi] demo image and related files for your reference.

Wish it helps.


Have a great day,
Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
1,149 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

The new MCUXpresso SDK V2.3 for FRDM-K28F will provide the [hello_world_qspi] demo soon.

You could find the similar demo at MCUXpresso SDK V2.2 software package for FRDM-K82F board.

..\SDK_2.2_FRDM-K82F\boards\frdmk82f\demo_apps\hello_world_qspi

The [hello_world_qspi] demo  Overview and how to run:

pastedImage_1.png

pastedImage_2.png

pastedImage_3.png

Wish it helps.


Have a great day,
Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos