GPSflashexist fn shows error as Flash ID object doesn'texist

Hi,
I am using dev studio ExtendedAT sample program from the samples given in Dev studio.

I am using SL6087 with XM0110 by i2c communication. While running the dwl file in the module i got the error as following

Flash ID 1 object doesn’t exist, length (252)
Flash object not loaded
Error from varispeed service subscription (-4)

Have anyone see this kind of errors? and also explain me why gpsflasinit() function is need in this file?

I have attached the code which i have used and the output what i received in the Trace?

Can anyone guide me?

From the code snippet in doc, adl_flhWrite() never called.
So, it make sense getting OK in return of adl_flhExist(), causing:

Please refer to doc or sample code for example using adl_flhWrite() and adl_flhExist().

For error during adl_vsSubscribe():

Please read ADL_User_Guide section 3.30:
[attachment=0]varispeed.jpg[/attachment]

Hope it helps.

Hi,

i used the code which gave in the sample code only,
based on your suggestion i tried as follows still i face the same issue
the adl_flhWrite() call inside of gps_flashWrite() see next code for gps_flashWrite()

if ( TRUE == gps_flashInit() )
    {
     lengthRead = gps_flashWrite(GPS_CONTEXT_FLASH_ID, (u8 *) &gpsAtLocalContext, sizeof(gps_atContext_t));
      if(lengthRead == sizeof(gps_atContext_t) )
      {
        if(TRUE == gps_flashExist(GPS_CONTEXT_FLASH_ID, sizeof(gps_atContext_t)))
        {
            lengthRead = gps_flashRead(GPS_CONTEXT_FLASH_ID, (u8 *) &gpsAtLocalContext, sizeof(gps_atContext_t));
            // Is context is valid?
            if ( lengthRead == sizeof(gps_atContext_t) )
            {
                // Saved context found, copy to current context
                wm_memcpy(&gpsAtContext,&gpsAtLocalContext, sizeof(gps_atContext_t));

                // GPS Plug-In library state configuration
                if ( gpsAtContext.eGpsState != GPS_UNINITIALIZED )
                {
                    // Data for Init message
                    l_t_eventMessageData.eAtEventMessageType = GPS_AT_EVENT_MESSAGE_INIT_CMD_SUB;
                    l_t_eventMessageData.eAtEventPort = gpsAtContext.eAtPort;

                    // Case of Automatic Init or Start
                    // Send the message for library initialization
                    retStatus =  adl_msgSend (   g_e_atCtxID, GPS_AT_MESSAGE_ID, sizeof(gps_atEventMessageData_t), (void *)&l_t_eventMessageData);
                    if (retStatus < 0)
                    {
                        // Error during message transmission
                        TRACE(( GPS_AT_MSG_TRACE_LEVEL,"[gps_atCmdSubscribe] Message send failed [%d]", retStatus));
                        snprintf( RspStr, sizeof(RspStr), GPS_AT_ERROR_FORMAT_STRING, GPS_AT_ERROR_STR, GPS_AT_ERR_SCHED_TASK);
                        adl_atSendResponsePort ( ADL_AT_UNS, gpsAtContext.eAtPort, RspStr );
                        return ERROR;
                    }
                }
            } // if( lengthRead == sizeof(gps_atContext_t))
            else
            {
                TRACE(( GPS_AT_MSG_TRACE_LEVEL ,"[gps_atCmdSubscribe] Flash size error [%d]", lengthRead));
                snprintf( RspStr, sizeof(RspStr), GPS_AT_ERROR_FORMAT_STRING, GPS_AT_ERROR_STR, GPS_AT_ERR_FLASH_DATA_ACCESS);
                adl_atSendResponsePort ( ADL_AT_UNS, gpsAtContext.eAtPort, RspStr );
                return ERROR;
            }
        } // (TRUE == gps_flashExist(..
        else
        {
            TRACE(( GPS_AT_MSG_TRACE_LEVEL ,"[gps_atCmdSubscribe] Flash object not loaded"));
        }
      }
        else
          {
            TRACE(( GPS_AT_MSG_TRACE_LEVEL ,"[gps_atCmdSubscribe] Flash object not loaded"));
          }
    }
    else //  if(TRUE == gps_flashInit())
    {
        TRACE(( GPS_AT_MSG_TRACE_LEVEL ,"[gps_atCmdSubscribe] Flash access error"));
        snprintf( RspStr, sizeof(RspStr), GPS_AT_ERROR_FORMAT_STRING, GPS_AT_ERROR_STR, GPS_AT_ERR_FLASH_DATA_ACCESS);
        adl_atSendResponsePort ( ADL_AT_UNS, gpsAtContext.eAtPort, RspStr );
        return ERROR;
    }

the gps_flashWrite()as defined as follows

u32 gps_flashWrite(u16 flashID, u8 *nvData, u32 length)
{

	s32 l_s32_status;

	// Make sure that the data object exists and is the correct size.  Otherwise, do cold start
	/*l_s32_status = adl_flhExist((ascii*)GPSatContext_flashHandle, flashID);
	if ( l_s32_status < 0)
    {
		TRACE((GPS_AT_FLASH_TRACE_LEVEL, "[gps_flashWrite] Flash error (%d): Flash ID %d, length: %d", l_s32_status, flashID, length));
		length = 0;
        return length;
    }
	else if(l_s32_status == OK)
	{
		TRACE((GPS_AT_FLASH_TRACE_LEVEL, "[gps_flashWrite] Flash ID %d Object does not exist, length (%d) ", flashID, length));
	}
	else if(l_s32_status != length)
	{
		TRACE((GPS_AT_FLASH_TRACE_LEVEL, "[gps_flashWrite] Flash Object ID %d: length (%d) not equal to required length (%d)", flashID, l_s32_status, length));
	}*/

	if (adl_flhWrite((ascii*)GPSatContext_flashHandle, (u16)flashID, (u16)length, nvData) == OK)
    {
#ifdef _GPS_AT_FLASH_TRACE_LEVEL_DEBUG_
    	TRACE((GPS_AT_FLASH_TRACE_LEVEL, "[gps_flashWrite]: Run Flash Data (length %d), Remaining: %d",length,adl_flhGetFreeMem()));
#endif // _GPS_AT_FLASH_TRACE_LEVEL_DEBUG_
    }
    else
    {
    	TRACE((GPS_AT_FLASH_TRACE_LEVEL, "[gps_flashWrite] Flash write error: ID %d, length: %d", flashID, length));
    }

	return length;
}

can you explain how solve this flash error

Thanks