共享客戶2013online_第1頁
共享客戶2013online_第2頁
共享客戶2013online_第3頁
共享客戶2013online_第4頁
共享客戶2013online_第5頁
已閱讀5頁,還剩33頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

1、TI Bluetooth®low energy OADOver the Air DownloadingYan Zhang1SensorTag OAD demo2SensorTag OAD demo3SensorTag OAD demo4SensorTag OAD demo5SensorTag OAD demo6SensorTag OAD demo7SensorTag OAD demo8SensorTag OAD demo9SensorTag OAD demo10Over the Air DownloadWith Over the Air Download (OAD) feature,

2、 you will NOT need: Extra IOs, like USB or UART Connect to PCto update your final products firmware if you have new firmware released.What you will need is just update your iOS or Android App, let the Appdo the updating job through BLE connection to your products!This will only make your products sm

3、aller and more portable!11Over the Air DownloadBluetooth low energyPeripheral Device SlaveCentral DeviceMaster12Over the Air DownloadOAD Manager(typically iOS devices, Android devices, or PC) runs an OAD application(it is a TI proprietary BLE profile) and has an OAD image (new firmware) to send to O

4、AD target.OAD Target(real BLE products) has BIM(Boot Image Manager), an old image, andprepared area for new image.OAD Manager send new image over-the-air by OAD application.OAD Target stores new image and with BIM, system will jump to new image to execute.Binary image over BLE13OAD ManagerOAD Applic

5、ationOAD ImageOAD TargetBIMOld Image(A)Area for new Image(B)Over the Air DownloadThe following sections will show how to use OAD.With Keyfob sample code and BLE Device Monitor. .It contains 4 parts: Configure BIM Configure image A Configure image BOver-the-Air Downloading14Configure BIM (Boot

6、 Image Manger)The boot code is separately built and debugged or programmed via the IAR IDE. The project is located at: $INSTALL_DIRProjectsbleutilBIMBefore debugging or physically programthe OAD application code produced in thenext section, this OAD boot code must first be programmed into the flash.

7、The .hex file produced by this project build can be programmed directly using a tool like the SmartRF Programmer.15Configure image AFirst of all, it is very important for this example, if “DEFAULT_ENABLE_UPDATE_REQUEST” is set to be “TRUE” in your keyfobdemo.c file, please set it to be “FALSE”. Othe

8、rwise it will effect BLE Device Monitors OAD application.In the real product you do NOT need to do this.16Configure image ASelect ProjectàEdit ConfigurationsàNewand add a new build target as shown17Configure image ASelect PROFILESàAddàAdd Files and add the files for OAD Profile a

9、s show below from the following directory: INSTALL_DIRProjectsbleProfilesOAD18Configure image ASelect TARGETàCC2540EBàDriversàAddàAdd Files and add hal_crc.c as show below from the following directory: INSTALL_DIRComponentshaltargetCC2540EB19Configure image AEnable the OAD Profil

10、e in the Application by adding a call to OADTarget_AddService()function wherever the other BLE Profiles are activated. KeyFobApp_Init().For keyfob project is in20Configure image AAdd an include of the OAD Profile header file in the module accessed in last step. As anexample, this is done at the top

11、of the keyfobdemo.c module as shown below:21Configure image ASelect Project->OptionsàC/C+ CompileràPreprocessoràDefined symbols and add the following 4 new definitions as shown in the figure:FEATURE_OAD, OAD_KEEP_NV_PAGES, FEATURE_OAD_BIM, HAL_IMAGE_AAnd include the path to the OAD

12、 Profile as shown above in the Additional includedirectories:$PROJ_DIR$.ProfilesOAD22Configure image ASelect Project->Options->Build Actions->Post-buildd line and paste the followingline (with no carriage return and exactly one single space between quote marks): "$PROJ_DIR$.commonCC254

13、0cc254x_ubl_pp.bat" "$PROJ_DIR$" "ProdUBL" "$PROJ_DIR$CC2541DK-mini Keyfob Slave OAD-imgAExeKeyFobDemo"Note that the relative path above will contain different names as you work with projects other than the CC2541 Keyfob.23Configure image ASelect Project->Option

14、s->Linker->Config->Linker configuration file and paste the following line: $PROJ_DIR$.commonCC2541cc254x_f256_imgA.xcl24Configure image ASelect Project->Options->Linker->Output->Format->Allow C-SPY-specific extra output as shown below.25Configure image ASelect Project->Opt

15、ions->Linker->Extra Output->FormatSelect the Format->Output format to be intel-extended and check the box for OutputfileOverride default and use the .hex suffix for the output file.26Configure image ASelect Project->Options->Debugger->Texas Instruments->Download.Uncheck the b

16、ox to Erase flash and check the box to Retain unchanged pages so that the BIM is not erased when this application image is downloaded from IAR.27Build image ABuild and download the project on Keyfob.You may receive a post-build error. This is because you have not yet produced the .sim file. You can

17、ignore this error at this point.Relax, dont be scared or panic, nothing is wrong!28Configure image BSimilar steps as above will be followed to create the Image-B build target, using the Image- A build target as the source.29Configure image BThe preprocessor definition needs to be changed from HAL_IM

18、AGE_A to HAL_IMAGE_B.Very easy.30Configure image BThe post-processing build actions path to the EXE must be changed:31Configure image BThe linker control file must be the one for Image-B.32Configure image BNow you have configured the image B, you can compile and program the .hex file into Keyfob.The

19、n the Keyfob will contain BIM, image A and image B.(Note: programimage B into Keyfob is NOT a must step)In order to do OAD, the image file must be a .bin file, the following steps will show how to create it.33Configure image BChange the FormatOutput format to be simple-code and do not check the box

20、forOutput fileOverride default as shown below.34Configure image BOpen the oad_target.c module and change the version field in the Image Header from 0x0000 to 0x0002 as shown in the below figure. This will mimic an updated version of the image when the BIM checks the image header.35Configure image BBuild but do not download the target build. This will produce the output binary file for OAD in the output directory here:INSTALL_DIRProjectsbleKeyFobCC2541DBCC2541DK-mini Keyfob Slave OAD-imgBExeKeyFobDemo.binIf th

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論