AnsweredAssumed Answered

TWR-K22F120M tower bootloader msd flash issue

Question asked by jimzhang on Sep 16, 2016
Latest reply on Nov 16, 2016 by jimzhang

I flashed tower bootloader into the K22F120M board, K22 appeared as "FSL bootloader" folder on my host pc.  Board info is correct in the file INFO.TXT inside this filder:

Kinetis Bootloader K2.0.0

System device ID: 0x22001e99
Flash size: 524288 bytes
Flash range: 0x00000000-0x0007ffff
Flash sector size: 2048 bytes
Flash blocks: 2
RAM size: 131072 bytes
RAM range: 0x1fff0000-0x2000ffff
Reserved region 0: 0x00000000-0x0000dfff
Reserved region 1: 0x1fff0000-0x1fff25d7
Verify writes: yes
Check reserved regions: yes
Boot config present: no
Peripheral detection timeout: 0 ms
CPU clock: 48000000 Hz

 

The STATUS.TXT file says "Ready"

 

But when I drag the led demo led_demo_tower_20000.bin file into the folder, nothing is happenning. The STATUS.TXT file still says "Ready"

When I used the sb format (led_demo_tower_20000.sb), The STATUS.TXT file still says "Transfe". It looks like the file is transferring, but it hang forever.

 

The board file I used:

sources {
demo = extern(0);
}

section (0) {
erase 0x20000..0x7ffff;

load demo > 0x20000;

// jump to entry point
reset;
}

 

The BCA info is:

.section .bca, "a"

//__bootloaderConfigurationArea ; 0x3c0
// .long 'kcfg' // [00:03] tag - Tag value used to validate the bootloader configuration data. Must be set to 'kcfg'
.long 0x6766636b
.long 0xFFFFFFFF // [04:07] crcStartAddress
.long 0xFFFFFFFF // [08:0b] crcByteCount
.long 0xFFFFFFFF // [0c:0f] crcExpectedValue
.byte 0xFF // [10:10] enabledPeripherals
.byte 0xFF // [11:11] i2cSlaveAddress
.short 5000 // [12:13] peripheralDetectionTimeoutMs - Timeout in milliseconds for peripheral detection before jumping to application code
.short 0x15A2 // [14:15] usbVid
.short 0x0073 // [16:17] usbPid
.long 0xFFFFFFFF // [18:1b] usbStringsPointer
.byte 0xFF // [1c:1c] clockFlags - High Speed and other clock options
.byte 0xFF // [1d:1d] clockDivider - One's complement of clock divider, zero divider is divide by 1
.short 0xFFFF // [1e:1f] reserved
// Fill to align with flash configuration field.
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFFFFFF // Reserved for user TRIM value

 

I am assuming that tower_bootloader will copy my led demo app into flash address 0x20000, and reset the board, then jump to the app. But it was not happenning. I am not sure what step I missed here. Please give me some advise! 

Thanks,

Jim

Attachments

Outcomes