I was just wondering if anyone has been able to compile a SimpleBLEPeripheral.bin and load it to the CC2540 USB Dongle via SBDemoTool and have it startup succesfully? I have loaded the Boot.hex from ZStack-CC2530-2.5.1a onto the USB Dongle and then successfully loaded the SimpleBLEPeripheral.bin via SBDemoTool but it doesn't start.
Anyone get this to work?
The SimpleBLEPeripheral application is not configured to run on the CC2540USB dongle, but rather is made to run on either a keyfob or CC2540EM board (along with a SmartRF board). To make SimpleBLEPeripheral work with a USB dongle you would have to modify the pre-processor defines (e.g. POWER_SAVING cannot be used with the USB dongle) and change the hal_board_cfg.h file. Other changes might be required as well.
As a first step, you might want try to get SimpleBLEPeripheral working on a USB dongle by programming with a CC debugger. Once you have verified functionality there, then you could try to get it working with the bootloader.
Thank you for the response. I have programmed it into the USB and it works. I can even download it with the bootloader utility installed on the dongle. It won't jump to the application after it is downloaded. I'm trying to find out how the image gets verified and the bootloader jumps to the application. I don't have power save enabled. Also, what do you have to change in hal_board_config.h?
Thanks again Willis,
Have you tried loading any other .hex file from the BLE folder? You may want to try a .bin file not a .hex.
Changes to the hal_board_config.h would be to #define CC2540_USB so that all the USB parameters are loaded,
You can also check out this thread on a similar issue. http://e2e.ti.com/support/low_power_rf/f/538/t/128884.aspx
Hello all. I hope this helps.
The following steps allow you to load a file using the SBL. We will use SimpleBLEPeripheral as an example. It will be loaded serially onto a SmartRF05 board with a CC2540 EM. Basically you need to configure the IAR project for use with the SBL and then run the .bat that is provided with the stack to produce a suitable .bin file.
1. Create a new project config: Project->Edit Configurations: New. Call it CC2540SBL and base it on the CC2540 configuration.
2. In the compiler preprocessor options, add the following defined symbols; - MAKE_CRC_SHDW - FEATURE_SBL - OAD_KEEP_NV_PAGES
3. Under Build Actions, add the post-processor .bat file: - "$PROJ_DIR$\..\..\common\cc2540\cc254x_ubl_pp.bat" "$PROJ_DIR$" "ProdUBL" "$PROJ_DIR$\CC2540SBL\Exe\SimpleBLEPeripheralCC2540SBL"
4.Change the following linking options under the config tab: - change the linker config file to: cc254x_f256_sbl.xcl - add to the search path: $PROJ_DIR$\..\..\common\cc2540
5. Change the following linking options under the extra output tab: - change the output file to: SimpleBLEPeripheralCC2540SBL.sim - change the output format to: simple-code
6. Rebuild all. This will produce a .bin file in #PROJ_DIR$\CC2540SBL\Exe.
7.Load the SBL project onto the SmartRF/EM and run it.
8. Open the SBDemo and choose the .bin file from step 6. Choose your COM port and click load image.
I got your suggestion working about three months ago and it worked as advertised. What I have working at this point and is what is needed for this project, is using CC Debugger to load Bootloader.hex to the CC2540. The CC2540 is attached to an internal mini usb hub that allows a connection to the PC. The USB port on the CC2540 then shows up as a virtual Com port. I can then use SBDemo to load SimpleBLEPeripheral.bin to the CC2540 flash. The problem is getting SimpleBLEPeripheral to start. I performed the same operation on the USB Dongle with the same results. I asked on the forum if anyone has gotten it to work. I keep getting answers from Willis1 that it is not configured to work on the USB Dongle. My question is, how do you configure it to work with the USB Dongle? If this works, It will work with our unit. Another issue is that our CC2540 is a 128k part built into a BlueGigga Module which as been FCC certified and cannot be changed without a cost. Willis1 tells me they don't support the 128k part with their software examples only the 256k part. Why is that? The perfect solution would be to use the UBL which makes the CC2540 Flash look like a Mass Storage Device. They only provide a hex file for this with no source code and when I asked for source code Willis1 tells me it is for internal use only and is only built for 256k parts. I talked to Austin Miller about getting source code and offered to pay for it but Austin was told they would not supply source code even for money. So the first solution will work for us if we can get the Bootloader configured for a 128k part and can get it to start our binary image of the application. Thanks for your help, Reif Heck Embla
I'm very close to getting the bootloader working on our device using the usb port as a virtual com port. I can do the following:
· Program Bootloader.hex in flash on the CC2540
· Get the USB to look like a virtual com port
· Use SBDemo Tool to load the binary image to CC2540 Flash
The only thing I cannot do is get the bootloader to jump to and start the application whose binary I just loaded. I think we want to go with this method if we can get info on how to get the bootloader to start the application.
If we can just concentrate on this method, it will work for us.
I spoke with the bootloader development guy, and the app should startup after bootloading. The USB will stop and start again, and perhaps this is happening too fast for PC. If you close the old port on the PC side and start again, does it work?
I tried that and it does not work. I have built the binary of the HostTestApp (CC2540EM-SBL) and downloaded that to the USB Dongle and it does start up as advertised. Also, if I load SimpleBLEPeripheral hex, It starts up transmiting. I have a snifer that shows this. Is it possible that I am creating the binary of SimpleBLEPeripheral incorrectly?
Have you found the root cause of not starting up as advertised after loading image into flash successfully via USB (virtual com port)? I am facing the same problem now. Please kindly help if you already got the answer. Thank you!
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.