Freescale SemiconductorApplication NoteDocument Number: AN2295Rev. 13, 10/2013Contents© 2013 Freescale Semiconductor, Inc. All rights reserved.1 Proje
Developer’s Serial Bootloader, Rev. 13FC protocol descriptionFreescale Semiconductor10Figure 8. Ident command (FC protocol version 1, M68HC08)2.4.3 FC
FC protocol descriptionDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 112.4.4 Erase commandThe erase command (coded as ‘E’, $45) has on
Developer’s Serial Bootloader, Rev. 13FC protocol, version 1, M68HC908 implementationFreescale Semiconductor12The MCU sends this number of read bytes
FC protocol, version 1, M68HC908 implementationDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 13Figure 14. Simplified example of memory
Developer’s Serial Bootloader, Rev. 13FC protocol, version 1, M68HC908 implementationFreescale Semiconductor14• $FC80 - Address of Bootloader user tab
FC protocol, version 1, M68HC908 implementationDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 15Figure 15. Interrupt vector table reloc
Developer’s Serial Bootloader, Rev. 13FC protocol, version 1, M68HC908 implementationFreescale Semiconductor163.3.1 S19 fileBecause the bootloader ope
FC protocol, version 1, M68HC908 implementationDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 173.5 M68HC08 system limitationsThis sect
Developer’s Serial Bootloader, Rev. 13FC protocol, version 2, HC9S08 implementationFreescale Semiconductor18with an external voltage, VTST, present on
FC protocol, version 2, HC9S08 implementationDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 19Figure 16. Simplified example of memory a
Developer’s Serial Bootloader, Rev. 13Project objectivesFreescale Semiconductor2modifications to be done in-circuit. The serial bootloader offers a ze
Developer’s Serial Bootloader, Rev. 13FC protocol, version 2, HC9S08 implementationFreescale Semiconductor20• $1080 - Start address of reprogrammable
FC protocol, version 2, HC9S08 implementationDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 21Figure 17. Interrupt vector table relocat
Developer’s Serial Bootloader, Rev. 13FC protocol, version 2, HC9S08 implementationFreescale Semiconductor22of the bootloader code. This allows the tr
FC protocol, version 3, large M68HC08 implementationDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 235 FC protocol, version 3, large M6
Developer’s Serial Bootloader, Rev. 13FC protocol, version 4, ColdFire (V1)Freescale Semiconductor24Figure 18. Simplified Example of Memory Allocation
FC protocol, version 4, ColdFire (V1)Developer’s Serial Bootloader, Rev. 13Freescale Semiconductor 25• $00410 - Start address of reprogrammable area #
Developer’s Serial Bootloader, Rev. 13FC protocol, version 4, ColdFire (V1)Freescale Semiconductor26starts instead of the bootloader code. This allows
FC protocol, version 4, ColdFire (V1)Developer’s Serial Bootloader, Rev. 13Freescale Semiconductor 27Figure 20. Simplified example of memory allocatio
Developer’s Serial Bootloader, Rev. 13FC protocol, version 4, ColdFire (V1)Freescale Semiconductor28• $03000 - Address of the relocated interrupt vect
FC protocol, version 4, ColdFire (V1)Developer’s Serial Bootloader, Rev. 13Freescale Semiconductor 29The following figure represents the interrupt vec
FC protocol descriptionDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 3implements all features as simply as possible, excluding checksu
Developer’s Serial Bootloader, Rev. 13FC protocol, version 5, KinetisFreescale Semiconductor307 FC protocol, version 5, KinetisThis section describes
FC protocol, version 5, KinetisDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 31Kinetis K60Example of modification ICF file in IAR6.4//
Developer’s Serial Bootloader, Rev. 13FC protocol, version 5, KinetisFreescale Semiconductor327.2 Interrupt vector table redirectionThe FLASH block pr
FC protocol, version 5, KinetisDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 33• $r14A -System Device Identification Register (SDID) c
Developer’s Serial Bootloader, Rev. 13FC protocol, version 5, KinetisFreescale Semiconductor34Figure 25. Interrupt Vector Table Relocation Explanation
FC protocol, version 5, KinetisDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 35/** USER SETTINGS OF KINETIS MCU *//** Kinetis ARM Cor
Developer’s Serial Bootloader, Rev. 13FC protocol, version 5, KinetisFreescale Semiconductor36Number of UART & GPIO pin for receiver (Rx)#define B
MCU slave softwareDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 37– The MCU with bigger/equal flash than 64 KB (2048 B flash protectio
Developer’s Serial Bootloader, Rev. 13MCU slave softwareFreescale Semiconductor38.Table 2. Target implementation comparisonMCU FamilyFLASH Memory Use(
MCU slave softwareDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 39MC68HC908QBQB4/QB8362/302 QB/QC ICG Yes Yes/No Hardware 64 32MC68HC9
Developer’s Serial Bootloader, Rev. 13FC protocol descriptionFreescale Semiconductor4The following is a simplified state diagram that shows separate s
Developer’s Serial Bootloader, Rev. 13MCU slave softwareFreescale Semiconductor408.1 MC68HC908KXThe M68HC908KX Family has an Internal Clock Generator
MCU slave softwareDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 41The on-chip FLASH programming routines simplify the bootloader and i
Developer’s Serial Bootloader, Rev. 13MCU slave softwareFreescale Semiconductor428.1.1 Internal Clock Generator (ICG) — initializationThe ICG is simpl
MCU slave softwareDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 43 TXA ;FEW CYCLES THAN EXPECTED, SO TRIM B
Developer’s Serial Bootloader, Rev. 13MCU slave softwareFreescale Semiconductor44Figure 27. MC68HC908JK/JL bootloaderRESETSRSR RESETSOURCE TESTMCU CON
MCU slave softwareDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 458.2.1 Software-SCI transmit char routineA detailed description of th
Developer’s Serial Bootloader, Rev. 13MCU slave softwareFreescale Semiconductor46;********************************************************************
MCU slave softwareDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 47Figure 30. Software-SCI receive char routineENTERRXD PIN ISINITIALIZ
Developer’s Serial Bootloader, Rev. 13MCU slave softwareFreescale Semiconductor48;********************************************************************
MCU slave softwareDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 49SKIP1 MACRO DC.B $21 ; BRANCH NEVER (s
FC protocol descriptionDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 5characters can be interpreted differently instead of original 0x
Developer’s Serial Bootloader, Rev. 13MCU slave softwareFreescale Semiconductor508.3 MC68HC908GPOn-chip FLASH programming routines are not available i
MCU slave softwareDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 51Figure 33. MC68HC908GP bootloader flowchart8.3.1 FLASH programming r
Developer’s Serial Bootloader, Rev. 13MCU slave softwareFreescale Semiconductor52• ERASE_ALG — whole FLASH erase routine• WR_ALG — whole WRITE erase r
MCU slave softwareDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 53 LDA #%00001001STA FLCR ; set HVEN, keep PGMD_
Developer’s Serial Bootloader, Rev. 13MCU slave softwareFreescale Semiconductor54MC68HC908GP and MC68HC908GR MCUs are primarily targeted for use with
MCU slave softwareDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 558.7.2 Single-Wire communicationBecause of the small number of pins o
Developer’s Serial Bootloader, Rev. 13MCU slave softwareFreescale Semiconductor568.9 MC68HC908APMC68HC908AP devices are members of the M68HC08 Family
PC bootloader master softwareDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 57required for USB are also inside the JW32 folder of the A
Developer’s Serial Bootloader, Rev. 13PC bootloader master softwareFreescale Semiconductor58The following figure displays the bootloader master flowch
PC bootloader master softwareDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 59— hc08sprg.h— main.c• M68HC(S)08, ColdFire and Kinetis sp
Developer’s Serial Bootloader, Rev. 13FC protocol descriptionFreescale Semiconductor6If the MCU transmits to the PC at an unmatched data rate, the PC
Developer’s Serial Bootloader, Rev. 13PC bootloader master softwareFreescale Semiconductor609.3 UART manipulationsIn seriallinux.c or serialw32.c, dep
PC bootloader master softwareDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 61void CRC_AddByte(unsigned short *pCrc, unsigned char data
Developer’s Serial Bootloader, Rev. 13Master applications user guidesFreescale Semiconductor62int read_blk(unsigned adr, int len, BYTE *dest)int prg_b
Master applications user guidesDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 6310.1 Bootloading operation (command line version)Open a
Developer’s Serial Bootloader, Rev. 13Master applications user guidesFreescale Semiconductor64Figure 39. First stage of bootloadingConfirm by pressing
Master applications user guidesDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 65Figure 40. Bootloading completed10.1.1 Memory boundary
Developer’s Serial Bootloader, Rev. 13Master applications user guidesFreescale Semiconductor66Figure 41. Memory boundary overlap example
Master applications user guidesDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 6710.2 Bootloading operation (windows version)A version o
Developer’s Serial Bootloader, Rev. 13Master applications user guidesFreescale Semiconductor6810.2.1 How to use the Windows version of master applicat
Master applications user guidesDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 69— Short TRIM - check if the target is configured to use
FC protocol descriptionDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 7Figure 4. StartUp communication with calibrationIf the MCU is op
Developer’s Serial Bootloader, Rev. 13Merging bootloader and application imagesFreescale Semiconductor705. Erase - this button invokes erase of whole
ReferencesDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 71Figure 46. The AN2295 S19 Merge tool 12 ReferencesFor additional information
Developer’s Serial Bootloader, Rev. 13ReferencesFreescale Semiconductor72• ZSTARRM: Wireless Sensing Triple Axis Reference design• CFPRM: ColdFire® Fa
Document Number: AN2295Rev. 1310/2013How to Reach Us:Home Page:freescale.comWeb Support:freescale.com/supportInformation in this document is provided
Developer’s Serial Bootloader, Rev. 13ReferencesFreescale Semiconductor74
Developer’s Serial Bootloader, Rev. 13FC protocol descriptionFreescale Semiconductor82.4 Interpreting MCU commandsAfter communication between MCU and
FC protocol descriptionDeveloper’s Serial Bootloader, Rev. 13Freescale Semiconductor 9This command is immediately issued by the PC after communication
Commenti su questo manuale