cancel
Showing results for 
Search instead for 
Did you mean: 

BlueNRG-345 hangs at startup

khorght
Associate II

Hi.

Chip: ST BlueNRG-345AC

PCB: Custom board with VLXSD pin left floating and VFBSD pin ->3.3V, NX2520SA 32MHz, schematic mimics STEVAL-IDB011V1, just bare chip without MEMS or CMSIS_DAP debugger, just MCU, decoupling capacitors, chip-antenna with matching circuit, pulled-up reset pin? pulled-down Bootloader pin and external oscillators 32MHz and 32KHz.

Debugger: St-Link V2

Issue: tryed to compile and burn IOToggle example from BlueNRG-LP DK 1.1.0 but both in IAR and in Keil MCU hangs after startup at 0x100004C6, and i can't figure out cause of it, because no highlighted line in sourcecode shows, breakpointing and singlestepping shows that it happens right after __low_level_init execution, called from RESET_HANDLER. I've tryed to add context_switch.s to project because low_level_init checks cause of reset and may try to switch/restore context, with no luck, same hang, tryed to comment out all lines in it and even comment all lines in reset_handler leaving there just a call to main() . Already tryed osc with 22pF and without theam as on EvalBoard schematics, tryed to resolder all elements. All Vcc pins are 3.3v, all of them decoupled with 100nF, core pin is 1.2v decoupled with 220nF, SNPM decoupled with 4.7uF and 100nF, all looks correct and should at least start with internal 64MHz until i start to init external osc or do other things, but MCU fails right at the start.

Will be very appreciate with any help or point where to dig, thanx.

2 REPLIES 2
Sebastien DENOUAL
ST Employee

Hi @Community member​ ,

I noticed you are using BlueNRG-345 (256Kb/32Kb). By default, code example from BleuNRg-LP SDK are for BlueNRG-355 (256Kb/64Kb)

One hypothesis here , is that you are facing RAM memory issue linking to hardfault.

Here is an extract from SDK1.1 documentation detailing how to migrate BlueNRG-355 projetc to BlueNRG-345 (accessible via index.html in documentation folder) :

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"

Hope it helps, let me know of not right hypothesis.

Regards,

Sebastien.

Hi, Sebastien. Thanx, you've saved me. I've changed Device in Options, and left all other as it was and as usually if nothing works first point is to start checking pcb and then dig into datasheets. Now it's time to start reading carefully all docs in SDK too. Thank you, one more time. Topic may be closed.