cancel
Showing results for 
Search instead for 
Did you mean: 

Troubleshooting a BLUENRG-LP 345 that can be programmed but code doesn't seem to run.

CM32
Associate II

We've just gotten some custom made boards using the BLUENRG-LP 345 and I'm a bit at a loss here:

I can program the chip, and read back what I have programmed (and the data is accurate) but I cannot get any IO control of any kind.

I believe that the chip may be stuck in bootloader mode, but I have no idea how to troubleshoot this.

We've checked everything we know in hardware and we seem to be ok there, so the ball is on the software field.

I've used the J-link/J-flash to program, but I have also used an evalkit as programmer. No change in outcome.

The code runs fine in the evalkit, but does not work in the LP345.

I have changed the macros in code to all match the CONFIG_DEVICE_BLUENRG_345 .

Any clues.

help!

7 REPLIES 7
AndyR1
Senior

Hello,

Is this the same IC than the eval board ?

I sometimes had the same issue, the boot pin was to 1 or a capacitor was missing close to the vdd, check that you have cap close to all power pins or try to add one

FNiel.1
Associate

The Eval kit has the BlueNRG-355 and the implementation has the BlueNRG-345, same QFN48 package. Flasher is not complaining about wrong target.

This ticket is regarding the same as  

https://community.st.com/s/case/5003W00000FU4EqQAL/no-operation-after-programming

We can see that when importing the eval kit code WISE studio has 355 as the target, but cannot find where to change the target on already made project. We know how to make a new 245 project. Can you advice how to change target on already made project. We are assuming that the only difference of he two versions is the memory size. Flasher does not complain.

CM32
Associate II

tl;dr linker flags missing.

The docs say:

How to move a demo application project from BlueNRG-355xy to BlueNRG-345xy

  • STSW-BNRGLP-DK, BlueNRG-LP Development Kit (DK) SW package demonstrations applications target the BlueNRG-355xy device (Flash: 256 Kb; RAM: 64 Kb).
  • User can simply migrate a demo application from BlueNRG-355xy to BlueNRG-345xy (Flash: 256 Kb; RAM: 32 Kb) by adding the CONFIG_DEVICE_BLUENRG_345 as compiler and linker preprocessor options.
  • IAR toolchain:
    • On Projects, Options, General Options, Target select ST BlueNRG-345
    • On Projects, Options, C/C++ Compiler Preprocessor, Defined Symbols, add: CONFIG_DEVICE_BLUENRG_345
    • On Projects, Linker, Config, Configuration File symbols definition, add: CONFIG_DEVICE_BLUENRG_345
  • KEIL toolchain:
    • On Projects, Options for Target '...', Device, ST BlueNRG-LP Series, ST BlueNRG-LP select ST BlueNRG-345
    • On Projects, Options for Target '...', C/C++, Preprocessor Symbols, Define, add: CONFIG_DEVICE_BLUENRG_345
    • On Projects, Options for Target '...', Linker, Misc Control add: –predefine="-DCONFIG_DEVICE_BLUENRG_345=1"
  • WiSE-Studio toolchain:
    • Open the WiSE-Studio .cproject file and replace BlueNRG-355 with BlueNRG-345
    • On Projects, Properties, C/C++ Build, Settings, Tool Settings, GCC C Compiler, Preprocessor, Defined Symbols, add: CONFIG_DEVICE_BLUENRG_345
    • On Projects, Properties, C/C++ Build, Settings, Tool Settings, GCC Linker, Miscellaneous, Other linker flags, add: CONFIG_DEVICE_BLUENRG_345

however, in wise studio it is not possible to do the 3rd task of the linker flags. I tried a few approaches and I would always end up with a compiler error:

arm-none-eabi-gcc: error: CONFIG_DEVICE_BLUENRG_345=1: No such file or directory

or

../ld.exe unrecognized option '-CONFIG_DEVICE_BLUENRG_345'

Work around was to modify the linker file BlueNRG_LP.ld and set the _MEMORY_RAM_SIZE_ and _MEMORY_RAM_END_ to the specific value needed by the BlueNRG-345.

In BlueNRG-345 hangs at startup they had a similar issue. @Sebastien DENOUAL​  can you double check the Wise-Studio documentation please? Such that it properly reflects how to select the linker options.

Also, the documentation in Docs/BlueNRG-LP_key_resources/_section_4.html (from the demo toolkit) differs from the user manual um2735 (um2735-bluenrglp-development-kits-stmicroelectronics.pdf)

Sebastien DENOUAL
ST Employee

Hi @CM32​ ,

First let me confirm all you wrote. I did similar test by myself and can confirm issue you noticed .

I was able to contact internally the team in charge of this package and associated doc. This issue will be fixed in next SDK as well as the misalignment you noticed between html doc and UM2735 ( thanks for your vigilance)

One alternative could be usage of KEIL ( don't know if possible on your side). Be aware a free license is available for KEIL while using BlueNRG-LP as target.

See https://www2.keil.com/stmicroelectronics-stm32/mdk for more details.

I tested procedure for 345 with Keil and it is OK.

Also, waiting for final solution in next SDK for Wise, you can modify linker file for BlueNRg-345 (RAM/ROM size to be modified)

Thanks for your understanding.

Regards,

Sebastien.

Hi @FNiel.1​ ,

yes, I confirm main difference between 355 and 345 is the flash size.

To change target for Wise, it is possible to edit .cproject file replacing 355 by 345 in text editor.

The whole procedure for Wise is described in SDK documentation. Anyway, as mentioned by @CM32​ , step 3 (linker flags) leads to a link error.

  • WiSE-Studio toolchain:
    • Open the WiSE-Studio .cproject file and replace BlueNRG-355 with BlueNRG-345
    • On Projects, Properties, C/C++ Build, Settings, Tool Settings, GCC C Compiler, Preprocessor, Defined Symbols, add: CONFIG_DEVICE_BLUENRG_345
    • On Projects, Properties, C/C++ Build, Settings, Tool Settings, GCC Linker, Miscellaneous, Other linker flags, add: CONFIG_DEVICE_BLUENRG_345

As I wrote in 1st answer below, workaround are :

Regards,

Sebastien.

Since I already have a working project and workaround for the issue in WiSE-Studio I won't be trying KEIL.

Thank you for the information and letting the appropriate teams know about the doc issues :)

Sebastien DENOUAL
ST Employee

Hi @CM32​ ,

Let me share with you proper change to switch a project to BlueNRG-345 with Wise :

  • open the WiSE-Studio .cproject file and replace BlueNRG-355 with BlueNRG-345
  • in [Projects][Properties][C/C++ Build][Settings][Tool Settings][GCC C Compiler][Preprocessor] [Defined Symbols], add CONFIG_DEVICE_BLUENRG_345
  • in [Projects][Properties][C/C++ Build][Settings][Tool Settings][GCC Linker][Miscellaneous][Other linker flags], add -Wl,--defsym=CONFIG_DEVICE_BLUENRG_345=1

0693W00000JOR6oQAH.pngI did a test and it is OK.

Regards,

Sebastien.