Re: In need for a Jlink bootloader MK20DX128VFM5 project for the FRDM-K82F board V2

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

Re: In need for a Jlink bootloader MK20DX128VFM5 project for the FRDM-K82F board V2

1,091 Views
javiersoriano
Contributor II

Hello David and Ben,

 

Sorry to undig a solved situation, but is it possible to program the K20 with this file without having the JTAG cable?

 

I can program stuff to the K82 using the Kinetis Flashing Tool, but I believe that it does not change anything on the K20, or does it?

 

Thanks in advance for the help.

Labels (1)
0 Kudos
8 Replies

756 Views
DavidS
NXP Employee
NXP Employee

Hi Javier,

See if this posts helps you: https://mcuoneclipse.com/2016/06/26/how-to-recover-the-opensda-v2-x-bootloader/

Also good blog to sign up for.

Regards,

David

0 Kudos

756 Views
javiersoriano
Contributor II

Hi David,

Thanks for all the pointers. I will have a look at the other site.

Javier

0 Kudos

756 Views
DavidS
NXP Employee
NXP Employee

Hi Javier,

Have you installed KDS and KSDK_v2 for FRDM-K82F on your PC?  If not, it may be that drivers are missing on the PC.

If yes, then not sure what is going on.

Have you reviewed the following Getting Started tab for the FRDM-K82F?

FRDM-K82F|Freedom Development Platform|Kinetis MCUs|NXP

Attached is ZIP with MBED (new), PEMicro OpenSDA, and JLink OpenSDA files to re-try when the FRDM-K82F is in the BOOTLOADER mode.

All 3 are working on my board.

Regards,

David

0 Kudos

756 Views
javiersoriano
Contributor II

Hi David,

I have installed both the KDS and KSDK, and I believe they are working properly, given that I was able to program the bootloader for other three boards using the same setup (PC1). They now show up as JLINK devices.

In contrast, I have two boards that do not show as any kind of device, after I attempted to program JLink openSDA. I cannot conclude what went wrong yet, since they were programmed on a different computer (PC2, see detailed steps below). I did not want to risk losing the debugging capabilities on all of them , so I did not try more combinations on PC2.

Some things that may have been the problem:

- The usb hub

- Trying to program JLink_openSDA_V2_1_2015-10-13.bin directly from CMSIS-DAP

My guess is that the firmware on the K20 is corrupt (it did not fit in memory?), and thus in order to get debugging through the JLink back, I need to somehow restore that firmware. So my question was more on how to recover the K20, if at this time I do not have access to a JTAG debugger?  Is it possible to program the K20 from the K82 for example? Or a combination of buttons that would allow me to see the SDA USB connection again? Pressing the reset button at powerup does not show the device as BOOTLOADER.

I post this information also as context. Perhaps there is not a solution to this problem without a JTAG debugger, but in any case I hope it helps someone that is thinking to upgrade the bootloader on their boards.

Regards,

Javier

----------

Successful configuration

PC 1 (Win7, KDS 3.2.0, mbedWinSerial_16466.exe driver, Board connected to PC directly via USB). I programmed the bootloader in two steps.

Start the board in BOOTLOADER mode.

  • In order to do this, you press and hold the RESET button (SW1) while the USB cable is disconnected.
  • Plug in the USB cable in J5.
  • The device should report itself as a BOOTLOADER device.

Drag the file 04_OpenSDA_FRDM-K82F.bin to the bootloader device

  • md5: 26802f20c7dee2511ed8bbb60e0d3b85

The new bootloader will be installed. The board will reset, and it will report as a FRDM-K82 device.

Restart the board once again in BOOTLOADER mode.

This time, drag the file JLink_OpenSDA_V2_1_2015-10-13.bin to the bootloader device.

  • md5: 249786f3019d9923743618d5cc91a53a

The device will reset once again, and it will report as a JLINK device.

Failed configuration

PC 2 (Win7, KDS 3.2.0, mbedWinSerial_16466.exe driver, Board connected to PC directly via USB hub). I programmed the bootloader in one step.

Start the board in BOOTLOADER mode.

  • In order to do this, you press and hold the RESET button (SW1) while the USB cable is disconnected.
  • Plug in the USB cable in J5.
  • The device should report itself as a BOOTLOADER device.

Drag the file JLink_OpenSDA_V2_1_2015-10-13.bin to the bootloader device.

  • md5: 249786f3019d9923743618d5cc91a53a

The device complained briefly "too little space for firmware" (wording is inaccurate because the message was shown very fast). After this, I cannot see it as any sort of device on windows, when connected via SDA USB.

0 Kudos

756 Views
DavidS
NXP Employee
NXP Employee

Hi Javier,

To reprogram K20 you do need to have JTAG cable.

The K20 is a hardware debugger on the board, and when used to program the K82, the K20 is not changed (or reprogrammed) in anyway.

Regards,

David

0 Kudos

756 Views
javiersoriano
Contributor II

Hi David,

Thanks for the quick reply.

This much is clear, when programming using J11 on the FRDM-K82F, I change the contents of the K82, and the K20 is not even powered as far as I know, or at least modified in any way.

On the other hand, when programming using J5, and more specifically, when loading a file such as JLink_OpenSDA_V2_1_2015-10-13.bin while in BOOTLOADER mode, I actually changed the program that the K20 executes. In other words, by lading this new firmware, I may not change the hardware configuration of the K20 itself, but the program it loads, and therefore change it s behavior. Is this correct?

Is there a way to get it to factory reset? Or failsafe mode, something of sorts?  Something that would allow me the show the device on the device manager and program e.g. the stock bootloader again. Sorry that I seem to ask the same thing several times, but I want to make sure that I am chasing the right problem here. :smileyhappy:

Cheers,

Javier

0 Kudos

756 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Javier,

Does your board can work well now ? Why do you want get it to factory reset ?

In factory setting,  it is a LED demo in generall.

BR

Alice

0 Kudos

756 Views
javiersoriano
Contributor II

Hi Alice,

I does not work fully yet.

0. I am using windows 7.

1. I started the board in "Bootloader"

2. I dragged JLink_OpenSDA_V2_1_2015-10-13.bin to the device. (It said that the size was too big and unmounted the device)

3. The board does not appear anymore when I connect to SDA USB (J5). Not even whe I press and hold SW1(RESET).

Any hints? :smileyhappy:

0 Kudos