Skip to main content
jampino
Associate III
July 13, 2017
Question

New to BLUENRG-1

  • July 13, 2017
  • 4 replies
  • 919 views
Posted on July 13, 2017 at 12:06

Hello all,

I am new using the bluenrg-1, I would like to create an application to download into the ble module but not really sure from where to start, how to do it.

I have done some test communicating with the ble using uart to send commands and it is working but now as I said I would like to download an app to just blink a led connected to one of the gpio.

Can someone help with this.

Thank you in advance 

    This topic has been closed for replies.

    4 replies

    jampino
    jampinoAuthor
    Associate III
    July 14, 2017
    Posted on July 14, 2017 at 10:50

    I have done different test, I have flashed the DTM_UART_32MHz.hex into the ble and I have seen that it is working, now I have created a small program and flash it but it seem that it is doing anything. I just want to switch on a LED, this is the code just in case I am missing something.

    void main(void)

    {

       SystemInit();

       IO_Config();

       while ( 1 )

       {

          GPIO_ToggleBits ( GPIO_Pin_1 );

           DelayMs(500);

       }

    }

    void IO_Config ( void )

    {

       GPIO_InitType GPIO_InitStructure;

       GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1;

       GPIO_InitStructure.GPIO_Mode = GPIO_Output;

       GPIO_InitStructure.GPIO_HighPwr = FALSE;

       GPIO_InitStructure.GPIO_Pull = FALSE;

       GPIO_Init( &GPIO_InitStructure );

    }

    Thanks

    Antonio Vilei
    ST Employee
    July 14, 2017
    Posted on July 14, 2017 at 10:59

    Hi,

    you can use the

    https://my.st.com/content/my_st_com/en/products/embedded-software/evaluation-tool-software/stsw-bluenrg1-dk.license%3d1500020896716.html

    software package. You will find many BLE-specific examples in the Project\BLE_Examples folder. If you are interested in examples dealing with the BlueNRG-1 peripherals, instead, please refer to the Project\BlueNRG1_Periph_Examples folder. For example, you will find sample code to use the GPIO pins in Project\BlueNRG1_Periph_Examples\GPIO.

    Hope that helps,

    Antonio

    jampino
    jampinoAuthor
    Associate III
    July 14, 2017
    Posted on July 14, 2017 at 11:33

    Hi Antonio,

    I have tried the GPIO example but not having any luck with it. I can't switch on the LED.

    Thanks

    jampino
    jampinoAuthor
    Associate III
    July 14, 2017
    Posted on July 14, 2017 at 12:22

    Could be possible that the cold start configuration from the 

    DTM_UART_32MHz.hex is different from the GPIO example? And for some reason the DTM works and not the GPIO?

    Thanks

    Antonio Vilei
    ST Employee
    July 18, 2017
    Posted on July 18, 2017 at 11:02

    Maybe

    Marchese.Graziella

    ‌ has some additional hints to help you overcome your issue.

    Best regards,

    Antonio

    jampino
    jampinoAuthor
    Associate III
    July 20, 2017
    Posted on July 20, 2017 at 16:50

    Hello,

    It is working finally, I had a problem with the cold configuration, now I have tested the peripherals and they are working correctly. Now I'm going to test the BLE.

    I am not sure, do I need to use the files inside \BlueNRG-1_2 DK 2.5.0\Library\Bluetooth_LE\inc and the library in \BlueNRG-1_2 DK 2.5.0\Library\Bluetooth_LE\library

    Thanks