view src/cs/drivers/drv_app/lcc/lcc_cfg_i.h @ 303:f76436d19a7a default tip

!GPRS config: fix long-standing AT+COPS chance hanging bug There has been a long-standing bug in FreeCalypso going back years: sometimes in the AT command bring-up sequence of an ACI-only MS, the AT+COPS command would produce only a power scan followed by cessation of protocol stack activity (only L1 ADC traces), instead of the expected network search sequence. This behaviour was seen in different FC firmware versions going back to Citrine, and seemed to follow some law of chance, not reliably repeatable. This bug has been tracked down and found to be specific to !GPRS configuration, stemming from our TCS2/TCS3 hybrid and reconstruction of !GPRS support that was bitrotten in TCS3.2/LoCosto version. ACI module psa_mms.c, needed only for !GPRS, was missing in the TCS3 version and had to be pulled from TCS2 - but as it turns out, there is a new field in the MMR_REG_REQ primitive that needs to be set correctly, and that psa_mms.c module is the place where this initialization needed to be added.
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 08 Jun 2023 08:23:37 +0000
parents 4e78acac3d88
children
line wrap: on
line source

/******************************************************************************
 * Power Task (pwr)
 * Design and coding by Svend Kristian Lindholm, skl@ti.com
 *
 * PWR Configuration Variables NOT in FFS
 *
 * $Id: pwr_cfg_i.h 1.2 Wed, 20 Aug 2003 12:54:50 +0200 skl $
 *
 ******************************************************************************/

#ifndef _LCC_CFG_I_H_
#define _LCC_CFG_I_H_


// The charging current used in SW precharge state
#define ICHG_PRECHG  500

// The SW precharge start threshold - discriminator that decides between entering INI or PRE states
#define VBAT_PRECHG_START 3200

// The SW precharge stop threshold - PRE->INI state & FFS configuration files will be read
#define VBAT_PRECHG_STOP  3600

// Define how many consecutive charger unplugs we must detect in order to have a 'real' unplug
#define CONSECUTIVE_CHG_UNPLUGS 5

// Define the size of the exponential avg window when in PRE state (i.e. no FFS configuration is read)
#define PRECHG_AVG_WINDOW_SIZE  5

// Define the battery slip number before we read the battery id
#define BATTERY_TYPE_SLIP 4

// Define the charger slip number before we read the charger id
#define CHARGER_TYPE_SLIP 2

// Define the lower charger id out-of-bound value (mV)
#define CHARGER_TYPE_OUT_OF_BOUND_LOW 4000

// Define the 'typical' charger id that will be used if the charger id reading has failed
// Make sure it's in the charger voltage interval
#define CHARGER_TYPE_TYPICAL          4201

// The Q402 Vchg thresholds that decides a charger unplug when charging has been initiated
#define VCHG_Q402_THR  1000
#define ICHG_Q402_THR  20


#endif