Freescale Semiconductor 802.15.4 manual HWInit.h, HWInit.c, Main.c

Page 48

#define SET_OUTPUT LED1ON // Defined in Target.h

#endif defined TARGET_DIG528_2 defined TARGET_DIG536_2

6.4.4 HW_Init.h

This file contains prototypes of all the init functions and defines.

6.4.5 HW_Init.c

This file contains some hardware init functions which depend on the PCB layout.

void HWResetAbel(void)

Reset of MC13192 RF chip (do not change)

void Safe_Boot_Mode_Indicator(void) Users can change this function so it matches the functions available for a particular PCB. The function can also be left empty. Default is a GPIO pin set low to light an LED.

void HW_Init()

The init main function.

NOTE

User can add more functions if required for a particular PCB.

Do not change the calling sequence.

6.4.6 main.c

This file contains the Embedded Bootloader main function and the Embedded version number.

void main(void)

It calls the hardware init function and then the

 

Embedded Bootloader state machine. The state

 

machine never returns.

NOTE

Dummy references are made to the version number strings for the Embedded_Bootloader_Functionality_Lib and HCS08_Flash_Lib to place the numbers in the executable image. If the version numbers are not required, they can be removed by removing the reference to the version number which frees up more code memory for user code.

6-6

Embedded Bootloader Reference Manual, Rev 0.0

Freescale Semiconductor

Image 48
Contents 802.15.4/Zigbee Embedded Bootloader How to Reach Us USA/Europe/Locations Not Listed Contents Embedded Bootloader Programming Embedded Bootloader Public Function Description Audience Conventions References Chapter Embedded Bootloader Description TargetPorted Targets Axiom AXM-0308Features Potential IssuesBenefits Optional Firmware Upload Settings Chapter Using the Embedded Bootloader Upload FirmwareUse Case One Safe Mode Boot Use Case TwoAn Example of How to Change the MAC Address Updating Non-volatile Memory NVMSystem Bus Frequency Uart Baud RateChapter Test Tool Zigbee Flash Tool Using the Tools Menu Option Graphical User Interface GUI VersionUsing the View Menu Option View Menu OptionSelecting the Firmware File to Upload Firmware UploadAfter a Successful Firmware Upload Using the Help Menu Changing the NVM Data in Flash or FileSystem Configuration Window Command Line Version CMD Command Line Version Parameter ListNormal Use Example Default Flash Erase Disabled ExampleEmbedded Bootloader Reference Manual, Rev Chapter Embedded Bootloader Programming Programming To An Empty Erased BoardConnection Assistant Window Load Executable Window Status Window Upgrading The Embedded Bootloader Connection Assistant Window Programmer Expert Window S19 File Window Status Window Embedded Bootloader Reference Manual, Rev Embedded Bootloader Image Chapter Application Integration Reference GuideProduct Deliverables Application Support FilesUnreferenced Symbols ApplicationApplication Linker File Compiler DefinesSystem Clock Setup Application Support FilesDigiType.h 2 Gb60io.h3 Crt0.c and Crt.h EmbeddedBootloader.h and EmbeddedBootloader.c NVData.c and NVData.hISRVectors.c DummyIsr.c Embedded Bootloader Build Environment Chapter Port Integration Reference Guide1 HCS08 Compiler 2 HCS08 LinkerEmbeddedBootloader.mcp EmbeddedBootloaderFunctionalityLib.Lib2 HCS08FlashLib.Lib Source FilesPorting to a Specific Target Code and Data SegmentsStandard Libraries Compiler #definesSource Files Target.hResetVector.c EmbeddedBootloaderTarget.hHWInit.h HWInit.cMain.c Chapter Embedded Bootloader Public Function Description 802.15.4/Zigbee Application Accessible FunctionsEnableDownloadFirmware Embedded Bootloader boot flag HardReset UpdateNVRAMNVFlashSetup FLICGSetupUARTPortSelect Output NoneEmbedded Bootloader Reference Manual, Rev Chapter Embedded Bootloader Memory Map 128 Direct Port Registers1BFF 4BFF 4DFF 4FFF 8BFF 8DFF 8FFF Embedded Bootloader Reference Manual, Rev FFB0 Ffbf Cursive = fixed register and vectors in flash Embedded Bootloader Reference Manual, Rev Appendix a Release Folder and File Structure Folder StructureFile Structure EmbeddedBootloaderFunctionalityLib.Lib Functionality library Embedded Bootloader Reference Manual, Rev