Skip to main content
jampino
Associate III
October 10, 2017
Question

Firmware update

  • October 10, 2017
  • 3 replies
  • 2278 views
Posted on October 10, 2017 at 15:58

Hello all,

I would like to udpate the firmware on the BLE, I am using an external processor and BLUENRG-1, both of them are connected by SPI and UART but I will be using SPI. 

I would like to update the firmware, I have got the fw image on the processor. Can anyone advise me how to do it?

Thank you. 

    This topic has been closed for replies.

    3 replies

    jampino
    jampinoAuthor
    Associate III
    October 12, 2017
    Posted on October 12, 2017 at 10:00

    Hello,

    Using first time, the BLUENRG-1 with an external processor using SPI, is it necessarily to download into the BLE any fw or I can just send commands from the external processor to the BLE?

    I have been using it with no external processor and works fine but not sure how to make it work with external processor.

    Thanks 

    Antonio Vilei
    ST Employee
    October 12, 2017
    Posted on October 12, 2017 at 18:02

    Hi,

     if you want to use your BlueNRG-1 chip via SPI with an external microcontroller, you need to load the DTM_SPI.hex firmware image on your BlueNRG-1 chip.

    Assuming that you have the STEVAL-IDB007V1 board, and that you have already downloaded the latest version (2.5.0 as of now) of the BlueNRG-1/2 Development Kit (

    http://www.st.com/content/st_com/en/products/embedded-software/evaluation-tool-software/stsw-bluenrg1-dk.html

    ), you can refer to the procedure described in the 'STM32_SPI_protocol_example.html' file in the documentation folder of this package(Docs\STM32_SPI_protocol_example_html\STM32_SPI_protocol_example.html).

    You can find the DTM_SPI.hex file for BlueNRG-1 in the BlueNRG-1/2 Development Kit installation directory (Firmware\BLE_Examples\BlueNRG-1\DTM\DTM_SPI.hex).

    More details about the SPI protocol used by BlueNRG-1/2 are available in the 'SPI_protocol_specification.html' file (BlueNRG-1_2 DK 2.5.0\Docs\SPI_protocol_specification\SPI_protocol_specification.html).

    Best regards,

    Antonio

    jampino
    jampinoAuthor
    Associate III
    October 13, 2017
    Posted on October 13, 2017 at 09:49

    Hello Antonio,

    Thank you for your response, I am using a custom board with an stm32F7, I have the DTM_SPI image on the processor fw, so the only way I can download the image into the bluenrg-1, I suppose is going into boot mode and then download the image using the uart, is it right?

    I am not really sure the steps I have to follow to download the image into the bluenrg-1, I have not found any docs.

    Any help about this?

    Thank you

    jampino
    jampinoAuthor
    Associate III
    October 19, 2017
    Posted on October 19, 2017 at 13:03

    Hello, 

    I would like to change the pins on the DTM_SPI firmware as we are using different pins for MOSI/MISO/IRQ in our hardware.

    Should I change the firmware on the 

    directory (Project

    \BLE_Examples\BlueNRG-1\DTM\inc\hw_config.h

    ) and changed for our current pins. Is this the source code use to generate the DTM_SPI.hex on 

    (

    Firmware\BLE_Examples\BlueNRG-1\DTM\DTM_SPI.hex

    )

    Thank you

    Antonio Vilei
    ST Employee
    October 19, 2017
    Posted on October 19, 2017 at 16:39

    Yes, I confirm that the DTM_SPI.hex file has been generated by the project that you mentioned and that you can use that .h file to reconfigure the pins (please refer to the BlueNRG-1 datasheet to check which alternate pins you can use).

    As for the MISO and MOSI pins, the documentation usually refers to them assuming that BlueNRG-1 is the SPI master. In your case, as you'll be using the SPI peripheral as slave, please pay attention that you don't accidentally swap them.

    When rebuilding, make sure that you're using the right configuration for your crystal by setting the correct value for HS_SPEED_XTAL in the preprocessor definitions for your project.

    Best regards,

    Antonio

    jampino
    jampinoAuthor
    Associate III
    October 20, 2017
    Posted on October 20, 2017 at 16:33

    Hello Antonio,

    Thanks for your response. I have done the changes but I am always getting 0xFF response from the ble.

    I have removed from the project the DTM_Updater_SPI.c like it is indicated on the DTM_main.c.

    In my hardware the connections and the change I have made on the DTM_SPI firmware are:

             HW              BLUENRG-1

       SPI1_SCK ----- SPI CLK (IO0)

       SPI_MISO ----- SPI OUT PIN (IO10)

       SPI_MOSI ----- SPI IN PIN (IO9)

    I have set the HS_SPEED_XTAL as well. I am just trying to send the command aci_hal_write_config_data but always getting 0xFF

    Thank you

    jampino
    jampinoAuthor
    Associate III
    October 24, 2017
    Posted on October 24, 2017 at 16:36

    Hello Antonio,

    It is working now but there is something I am facing.

    The first command I send always received a 0xFF as a response, it does not matter which command is, after that all the other commands I send are working fine.

    Thanks

    Antonio Vilei
    ST Employee
    October 24, 2017
    Posted on October 24, 2017 at 17:41

    Hi Jamp,

    I'm glad that you have it working now, even if you get 0XFF for the first command.

    After you reset the chip, it should send the following event via SPI: 0x04,0xFF,0x03,0x01,0x00,0x01.

    Can you confirm that this is the case?

    Also, to interact properly with BlueNRG-1 configured as a network coprocessor, you can follow the same steps used in one of the projects included in the 'Project\STM32L' folder. Those examples are configured for use with an STM32L1 working as the host, while in your case you would be using an STM32F7. The logic to interact with the BlueNRG-1 chip via SPI, however, is the same.

    jampino
    jampinoAuthor
    Associate III
    October 25, 2017
    Posted on October 25, 2017 at 16:35

    Hello Antonio,

    I have checked and yes I received that event via SPI but not really sure why it is not working the first command I send to the ble.

    Thank you