-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intermittent power up fail on the BC127 #5
Comments
Here is the boot sequence required by the BC127. Note that VReg needs pulled high 5ms after VBat goes high. RST# needs pulled high the entire time. Here is what the existing code does under Tympan.h. I believe this sequence needs updated. I also recommend adding error checking, where the BT127 is reset if there is a problem (BT_nReset = LOW for >20ms). @chipaudette let me know if you want me to start a feature branch to try this out. @biomurph: The device should power on with BT_REGEN = LOW and BT_nRESET = HIGH. Can you change the pull-down/up resistors so it starts this way? Existing boot sequence
As of commit: b927b227a25902c28c43c8ed1745633a7fbc59a0 Recommended boot sequence:
|
I would also recommend putting a scope on the BC127's VCHG during the boot up process. Look for it to dip below 3.1V. This pin is what initiates the boot sequence. This measurement will help set what the filter should be. It should be easy to tack on their recommended RC and take a measurement. This should be tested to see how low the V-Bus can go without causing a dip that restarts the BC127, during bootup and communication. This will help inform whether the buck boost is sufficient and where we should set our brown out point (if that's incorporated into the next design). |
Quick note... Attached is the most recent technical manual for the BC127 Here are the reset conditions we are looking for. Note: you can reset, or power down the BC127 depending on how long you hold it LOW.
|
@eyuan-creare I will try the latest notes on toggling the VREGEN. Good to know that the thing will power down after 2 seconds! That's convenient! I will also watch the VCHG and compare notes. |
I have the reset pin for the BC127 pulled HIGH as per your suggestion. |
@biomurph Did we address this in the design of the Rev-E, or were you considering a change in the firmware? I don't remember what we settled on for a course of action. |
On the Rev E, I have the BT_nRESET (RST#) pulled up with a 10K. Both Rev E and Rev D have pull down resistors on the VREGEN pins. |
Great! I'll take a look at implementing the change in firmware. |
@chipaudette It looks like the boot sequence has been corrected. I think we can close this out. The one caveat is that we are not filtering the power supply input to VCHG. This is the kind of thing that could cause intermitted behavior. --short version of existing firmware booting up the BC127--
|
@chipaudette Perhaps I stumbled on something... VREGEN not only is critical in the boot process, but it is used to put the BC127 in discoverable mode. In the current firmware, VREGEN is pulled high for 10ms to put in indiscoverable mode. However, Melody 7 states that a "short" press is 50ms, whereas we only pull it high for 10ms. Also, we pull the nRESET pin low then high after this short press of VREGEN. So perhaps this timing is preventing the BT module from being placed in discoverable mode? In a previous Tympan commit, VREGEN is brought high for 10ms then brought low.
|
@chipaudette Also note the difference between Melody 7(above) and Melody 5 (below). The duration for a short press changed from <999ms to 50ms (probably to provide debouncing as their dev board uses a momentary switch). Also, note that a long press has a different function. |
@chipaudette: so while the Medody5 boots up as a discoverable device (under default settings)... Melody 7 states that it is not discoverable on bootup.
|
@eyuan-creare thanks for the additional research on the startup process and on the GPIO. Two observations that would be helpful for you to comment on:
[Note: In my recent attempts to make BT Audio function on V7, I have been using BT_STATE to make the unit discoverable for Classic (including Audio) connections. Manipulating BT_STATE does make my phone see the Tympan as a BT headset, which is great. But, when the phone starts sending audio, the Classic connections gets dumped. Every time. Makes me sad. Perhaps, though, my VREGEN is not in the right state and needs to be done better for V7 units? @ijenkins-creare , please note!] |
@eyuan-creare In your comments above, you suggested that we have VREGEN be held low instead of our previous pattern of holding it high. I've now explored this. On RevE with V7.3 HD firmware, I switched the code to keep holding the pin HIGH. There's no obvious difference in behavior either way. I command BT Classic behavior ("connectable" and "discoverable") through direct serial commands, as you suggested. The system seems fine...but, again, it's not obviously better either way. My conclusion: Whenever V7 firmware is specified, I have Tympan.h hold the pin HIGH forever, per your recommendation. On RevD with V5.5 firmware, when I switched the code to keep holding VREGEN high, the module shuts off after ~2 seconds. Obviously, this is bad. My conclusion: Whenever V5 firmware is specified, I have Tympan.h return to the original behavior of staying HIGH for 100 msec and then switching LOW and staying LOW forever. |
Yes that is expected behavior. It is supposed to SET CLASSIC_ROLE=1, SET AUTOCONN=1, then reset. I assume those are non-volatile and when it boots up again it should be held high. We might want to revert a Tympan to default settings if we think a "new" Tympan might act differently. Otherwise I can close this out. The last remaining question is whether there is noise on the VBAT or VCHG supply lines that could cause an issue during startup. |
Every so often at start up the BC127 LEDs don't flash, indicating that it has not booted up correctly. Since this is intermittent, it seems to be a result of the power supply. There is a related issue here. The recommendation from the BC127 datasheet is on page 26 of this document.
There's room on the board to add the RC circuit in the next hardware revision.
The text was updated successfully, but these errors were encountered: