Kinetis Bootloader for K22FX

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

Kinetis Bootloader for K22FX

832 Views
cipriananton
Contributor II

Hi Freescale Community,

I'm trying to make the kinetis bootloader work on MK22FX512VLL12 using the USB HID interface.

The reference target that I used is MK22F51212 from the kinetis bootloader project. I have tested the reference project on FRDM-K22 (has MK22FN512VLH12  MCU)  and it works.

In order to make the project work on my MCU (MK22FX512VLL12) first thing I did was configuring the system clock to work on external reference clock (This MCU don't have internal IRC48). The clock configuration is PEE (PLL Engaged External) working with an 8 MHz crystal. The MCG is set to give 48 MHz (I saw that the USB module needs this freq). MCGPLLCLK is also enabled.

I also changed the header file (MK22F51212.h) to add support for the FTFE flash controller (the default is FTFA flash controller).

The problem I have is that USB communication is not working and I can't figure why. The windows tells that there is an Unknown Device. The product id and vendor id are also unknown.

I've put some breakpoints in the USB IRQ (_usb_dev_khci_isr) and the following intrerrupts are issued:

-INTR_USBRST;

-INTR_SOFTOK;

Any help would be appreciated,

Thanks.

3 Replies

472 Views
cipriananton
Contributor II

The problem was solved by porting the MK64F12 bootloader instead of MK22F51212. Usb works ok, the application program is flashed. One problem remained, the bootloader can't jump to application section.

0 Kudos

472 Views
ernestolopez
Contributor I

Hi Ciprian Anton,

what kind of changes did you have to do to port the bootloader from the MK64F12 to the K22FX, could you gave me some guidance please?

According to the Reference Manual there are some header files of the K22FX that I should use, but I don't find them.

Thanks

0 Kudos

472 Views
cipriananton
Contributor II

Problem with the jump to application solved, the code didn't reach the jump_to_application function. This thread can be closed.