This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Universal Boot Loader for custom C2540 hardware

Other Parts Discussed in Thread: CC2540

Hi,

I have a couple of different custom hardware designs using CC2540, which I would like to be able to update using UBL.

I am able to update using an unmodified UBL from BLE-CC254x-1_3_2 and a software made from the HostTestApp example. To be able to run the UBL at startup I have to pull P1.2 low, but because of the different hardware designs I need to use another pin. 

I have read "Universal Boot Loader for SOC-8051 by USB-MSD Developer’s Guide" and from that I understand that the pin is defined in the *.CFG file - isn't that right? 

My question is how do I change the pin? I cannot read the default *.CFG and to me it seams like a big task to create a new config file from scratch. Do you have a tool that can help me generate the file?

Thanks,

Regards, Christian

  • Please feel free to give your input  :-)

    Is there maybe another way to invoke the bootloader than to pull P1.2 low?

    But then I still need to modify the bootloader as P1.2 is currently connected to an ADC data out that is idle low, and then the bootloader will alway execute at startup...

    BR,

    Christian

  • Hi Christian,

    i'm not sure what your question is? If you only want to know how to change the GPIO which activates the UBL, then have a look at chapter 3.2.9 CFG-DISCS.

    This seems to document how to set the flags in const ublMetaData_t _ublMetaData in ubl_app.c.

    The struct is well documented in the source file and there you will find the bytes 0xFC and 0x0A which select the GPIO and the mode for the bootloader activation.

    HTH

    Andre

  • Hi Andre,

    Thanks a lot! I hadn't seen this struct, and now it is no problem at all..

    I was reading chapter 2.  UBL by USB-MSD Overview:

    The contents of the configuration file must be exactly a meta-data structure as described within this
    document and defined in the ubl_app.h module. The contents of the configuration file cannot be read from the UBL, as even the default configuration could contain protected information like the security key. If no RC-image exists, the current configuration file can simply be overwritten by dragging-and-dropping the new configuration file

    So that is why I was asuming that I had to create a new config file from scratch.

     Thanks!

    BR

    Christian

  • Hi Christian,

    I always prefer the source over the documentation when digging into a problem just because there sometimes seems to be a "slight delay" in updating the documents when the source changes :)

    HTH

    Andre