-deleted-
9 years, 8 months ago.

How to use USB0 instead of UART0?

How would I change the bootloader code to use USB0 (USB0_DM, USB0_DP, pins 11 & 10), which is the left side micro USB port that is connected directly to the K64F MCU chip? The left side USB port is when looking at the K64 board with the Ethernet RJ45 port at the 12 O'clock position.

bootloader

    //Wait until data is sent
    while(!(UART0->S1 & UART_S1_RDRF_MASK));

.

I will use the following chip with UART0 instead because the code to support USB0 would be complex? http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT230X.pdf

Question relating to:

Example of a Serial bootloader for the K64F platform bootloader, FreescaleIAP, K64F

1 Answer

9 years, 8 months ago.

That is probably the best solution if you want to use something like that indeed. Otherwise you need to move the entire USBdevice library to the bootloader area in your flash. Possible yes, but not easy. Since it needs the complete USB stack just using only a serial connection is alot easier.

Accepted Answer

I agree.

Instead of the FTDI chip I could have user program use USBserial to save to intermediate flash region (above user program and below the bootloader functions). The bootloader then copies from intermediate flash region to the boot region. The first program for a new K64 chip on a custom PCB needs to be flashed through JTAG.

posted by -deleted- 03 Apr 2015