2017-02-13 11:17 AM
Hello everyone.
I've been working for a long time with SPBTLE-RF modules in our project. I never experienced any problems with these modules.
But now we've redesigned our PCB and are going to use BlueNRG-MS chips directly placed on PCB (QFN case, 16MHz ext. oscillator + 32768 Hz ext. low freq. oscillator, step-down converter active).
And it doesn't work... Interestingly that FW upgrades without any problems (we are embedding fw image into our software and uptate chip softwarte if it's version is lower than 0x723). IFR (generated by me especially for my hardware design) is updated and verified also without any issues (as I understand both of the mentioned actions are done by
BlueNRG-MS
bootloader).But when it comes to configuring chip - it hangs. First of all I'm trying to configure DIV, ER and IR keys. DIV programming passes (
BlueNRG-MS returns 0 status), but all subsequent operations (ER, IR programming, gap/gatt initializing, etc.) fail - I do not receive any interrupts from BlueNRG-MS and no data is pending on its side if I issue the interrupt manually.
Does anybody knows what can be wrong with the chip?
Thanks in advance for any answers or tips.
PS: the same code perfectly runs on older PCBs that have SPBTLE-RF.
#bluenrg-msSolved! Go to Solution.
2017-02-17 02:43 AM
This is not the case. I've performed the test and is showed startup time 390us. So my current setting of 800us is enough for my design.
But I've figured out the reason of hangups. Chip couldn't start a 32K external oscillator properly. When I tried to perform the test related to 32K oscillator - I didn't see any signal on correspondent TEST pin. Interestingly that I could see the oscillation on the SXTAL pins using oscilloscope. But as I figured out later - oscilloscope's probe just helped the XTAL to start . Without the probe it failed to start!
Selecting the right XTAL compensating capacitors for my design solved my problem!2017-02-14 01:34 AM
A little update: I receive a Evt_Blue_Initialized event from BlueNRG-MS chip containing reason_code == 0x05 (reset, caused by watchdog).
What are the reasons for watchdog going off in BlueNRG-MS?2017-02-14 07:50 AM
Update number 2:
1. Device works if I choose internal ring oscillator as clock source.2. Using external oscillator it hangs if selected crystal precision set in IFR is set to 100ppm. If I decrease this value to, for example, 30 ppm - device works well, but after several hours it hanged again (I assume that increased crystal temperature has shifted its base frequency a bit).
3. Using higher value (500ppm in my case) gives no hangups at all.
But hey, what is the relation between these precision settings and internal watchdog?
I thought that if I use lower ppm setting value than my current design (crystal+its circuitry) actually has - I'll get missed connection events (or any kind of master-to-slave timing discrepancies). If I use higher value of ppm setting - the only problem I should get is the increased current consumption (my device will have to wake up a bit earlier and listen a bit longer).
But I don't understand the relation between this setting and reboots caused by watchdog!
2017-02-15 01:06 AM
Update 3:
Chip hangs after I call aci_gap_set_discoverable(ADV_IND, 4800, 4960, RANDOM_ADDR, NO_WHITE_LIST_USE, 0, NULL, 0, NULL, 6,8)
Does anybody have any idea why? Moderators, please help.
2017-02-16 03:36 AM
As discussed
https://community.st.com/0D50X00009XkiCMSAZ
, your problem is probably caused by a wrong valueof the HS_Startup_Time. Please try toperform XTAL_startup_TEST asdescribed in/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fcontent%2Fccc%2Fresource%2Ftechnical%2Fdocument%2Fapplication_note%2F46%2F0a%2F77%2F7b%2F04%2Ff5%2F4c%2Fb7%2FDM001167pdf%2Ffiles%2FDM001167pdf%2Fjcr%3Acontent%2Ftranslations%2Fen.DM001167pdf
. Then you should update your IFR accordingly.Hope that helps,
Antonio
2017-02-17 02:43 AM
This is not the case. I've performed the test and is showed startup time 390us. So my current setting of 800us is enough for my design.
But I've figured out the reason of hangups. Chip couldn't start a 32K external oscillator properly. When I tried to perform the test related to 32K oscillator - I didn't see any signal on correspondent TEST pin. Interestingly that I could see the oscillation on the SXTAL pins using oscilloscope. But as I figured out later - oscilloscope's probe just helped the XTAL to start . Without the probe it failed to start!
Selecting the right XTAL compensating capacitors for my design solved my problem!2019-01-17 09:43 AM
Could you please show how you read the Evt_Blue_Initialized event ?
2022-01-14 09:10 AM
I am really interested in knowing this. There is no documentation at all about a watchdog in the BLE stack and how to feed it.