I'm struggling to wake up the Bq chip after putting it into the Sleep state using GOTO_SLEEP command through CONTROL1.
It falls a sleep Ok (verified as it stops responding after the command), but it doesn't seem to come out of it using the process described for SLEEPtoACTIVE transition by holding the Bq' RX line low for specified time. (And the line is correct as I'm otherwise communicating fine with it).
Essentially, using sample code, or my own, I don't get any replies from it after holding the RX line low for specified time, and , then only way I can wake it up / restore comm is by full wake up using WAKEUP line (which is destructive to the pre-configured settings, which I want to avoid).
I also make sure I write COMM_TO just in case, I tested either completely settings all timeouts to 0 (no timeout), or short time out = 1 min and long to 1 hour before putting it to sleep. Still same result.
The sample code to wake it up ( from the TI's provided sample code ) is essentially this:
void CommSleepToWake(void) { scilinREG->GCR1 &= ~(1U << 7U); // put SCI into reset scilinREG->PIO0 &= ~(1U << 2U); // disable transmit function - now a GPIO scilinREG->PIO3 &= ~(1U << 2U); // set output to low delayus(250); // 250us to 300us, same as wake sciInit(); sciSetBaudrate(scilinREG, BAUDRATE); }
Just to make clear, this is the full wake up method (excluding my custom init params after that ..) which does bring it back online :
void Wake79606() { // toggle wake signal gioSetBit(gioPORTA, 0, 0); // assert wake (active low) delayus(250); //250us to 300us gioToggleBit(gioPORTA, 0); // deassert wake //tSU(WAKE) transition time from shutdown to active - 7ms from wake receive to wake propagate for each device sleepms(8); }
Any hints as to why this doesn't work ? Or what am I missing? I'm testing it's awake by trying few times read a register back (like DEV STAT or CONTROL1) which fails with just sleep to active method.