Skip to main content
Ricardo Hassan
Associate III
May 2, 2018
Question

Issue using BlueNRG with CubeMX

  • May 2, 2018
  • 6 replies
  • 841 views
Posted on May 02, 2018 at 23:19

Hi,

    I am using a BlueNRG-MS connected to an STM32L4 MCU over an SPI bus.  I was able to make it work using code from the BlueNRG development kit, but I could not make it work if I generated code using CubeMX.  After a lot of trial and error, I realized that the CubeMX code was configuring all 4 SPI pins as alternate function (AF5_SPI2), but the BlueNRG example was configuring the slave select pin as an output push pull, which was working.  My question is, which is supposed to be correct?  As it is, when I enable the SPI2 peripheral in CubeMX, it automatically configures all 4 SPI pins as alternate function, with no other options.  I don't know if this is a bug in CubeMX, or if I have some other conflicting configuration that is breaking my setup.  

Ricardo

    This topic has been closed for replies.

    6 replies

    Amel NASRI
    ST Technical Moderator
    May 8, 2018
    Posted on May 08, 2018 at 12:02

    Hi

    Hassan.Ricardo

    ‌,

    Please precise the CubeMX version you are using.

    To more understand your request: is your aim touse BlueNRG staring from a project you generate by your self with CubeMX?

    -Amel

    To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
    Ricardo Hassan
    Associate III
    May 8, 2018
    Posted on May 08, 2018 at 18:07

    Hi Amel,

    I’m using STM32CubeMX 4.25.0, with STM32L4 firmware package 1.11.0. Yes, I’m generating my project using CubeMx for a system with a BlueNRG chip.

    Regards,

    Ricardo

    Nawres GHARBI
    ST Technical Moderator
    May 10, 2018
    Posted on May 10, 2018 at 10:52

    Hi

    Hassan.Ricardo

    Could you please give me a link to the dev kit you are using