cancel
Showing results for 
Search instead for 
Did you mean: 

BlueNRG-345 custom board repeatedly resets due to Hardware_Code = 0x01

RGord
Associate II

I am working on a custom board with a BlueNRG-345 microcontroller, with the BlueNRG-LP Development kit 1.2.0 and using WiSE Studio as the development environment. I have taken the BLE Beacon project for the STEVAL-IDB011V1 and converted it to run on the BlueNRG-345 as described in section 6.2 of the Development Kit User Manual. The custom board is based on the reference design but it does not have an LSE so I have replaced the CONFIG_HW_LS_XTAL defined symbol with CONFIG_HS_LS_RO. I have commented out the call to HAL_PWR_MNGR_Request() so that I can run it under the debugger.

The project runs happily on an STEVAL-IDB011V1 but when I run it on the custom board it goes into a tight reset loop. The reason it is resetting is that the user code function hci_hardware_error_event() is being called with Hardware_Code = 0x01 and hence it calls NVIC_SystemReset(). If I change the code so that it only resets when Hardware_Code == 0x03, then the beacon functionality does work, at least for a while.

I have a separate project with the target application code and pins properly configured to match the custom hardware. This still suffers from the above problem but otherwise works fine. In this project I have avoided getting Hardware_Code = 0x01 by commenting out the calls to HAL_VTIMER_Tick() and BLE_STACK_Tick(). This appears not to stop the BLE Beacon function from working, which is fine so far as that is the only BLE function I need but it would be a problem if other BLE functions were needed in the future.

The bluenrg_lp_events.h files says that "Hardware_Code Error code 0x01 and 0x02 are errors generally caused by hardware issue on the PCB; another possible cause is a slow crystal startup." What hardware issues might be causing this or what might I have done wrong in the software?

6 REPLIES 6
Laurent LOUAZON
ST Employee

Hello,

This could be related to Xtal selected for example.

Feel free to share with me your schematics (at least BlueNRg part) and Xtal full reference.

Quick tests could be

  • Use LSI

If you are using a 32kHz xtal and problem is related to this, you can quickly built your application with CONFIG_HW_LS_RO pre processing option for using LSI

If this solves the problem, it means problem is related to 32kHz LSE

  • Increase HSE start up time

If problem is related to HSE start up tie you can do a test pushing this value to maximum.

#define HS_STARTUP_TIME 320 // 780 us is the default setup and you can try chnage from 320 to 778 (1900 us). It will just impact a bit power consumption.

.If this solve the problem, it means problem is related to 32MHz HSE

Regards

Laurent

Regards

Laurent

RGord
Associate II

Hi Laurent

Thanks for responding.

  • Use LSI

The board does not have an LSE so I am already using LSI by building with CONFIG_HW_LS_RO. (There is a typo in my original post.)

  • Increase HSE start up time

I think I tried this before but I have tried it again anyway and it made no difference. I am still seeing hci_hardware_error_event() being called with Hardware_Code = 0x01 causing a reset loop.

This is the BlueNRG-345 part of the schematic. Hopefully this is clear enough for you to read.

0693W00000bhZQ8QAM.pngThe HSE, Y2, is an ECS-320-8-37CKM-TR.

Regards

Rob

Laurent LOUAZON
ST Employee

Hi Rob,

I see some problem here.

C24 should not be a cap but a 10uH coil.

Also recommended value for C32 is 220nF.

Regards

Laurent

Hi Laurent

Thanks for speedy response. I've passed this information on to our hardware engineer and hopefully this will solve our problem.

Kind regards

Rob

Hi Laurent

It turns out that our hardware guys had spotted the C24 cap/coil error already as without this change the board would not work at all. They have now changed cap C32 to 220nF and this cures the problem I was having with the firmware going into a reset loop.

Thanks very much for your help with this issue.

Kind regards

Rob

Grzegorz.Bednarski
Associate

I assume mute option is ok when i solved problem?