Hello Team,
This is a follow up to the question asked in this forum:
we are using fls driver from MCAL_AM263x_09.00.01.00 package.
we are trying to configure NVM Block Length with more than 128 , but Fls read and write is not successful for this block
we are trying to write and read a block of size 287bytes.
we have configured around 20 blocks. In that one of the block is 287 bytes.When we are trying to read and write all those blocks, the blocks with size more than 120 bytes are causing the issue.
The offset of Fls sector we have configured is 0, The generated files are attached here for reference.
Please revert if you need more details.
we have an created an single sector with sector size as 4096 and number of sectors as 32.Fls_Cfg.h1106.Fee_Cfg.h
/** * \file * * \brief AUTOSAR Fee * * This file contains the implementation of the AUTOSAR * module Fee. * * \version 6.14.23 * * \author Elektrobit Automotive GmbH, 91058 Erlangen, Germany * * Copyright 2005 - 2023 Elektrobit Automotive GmbH * All rights exclusively reserved for Elektrobit Automotive GmbH, * unless expressly agreed to otherwise. */ /*==================[inclusions]=============================================*/ /* !LINKSTO Fee.SWS_Fee_00084,2 */ #include <Std_Types.h> /* Autosar standard type definitions */ #include <Fee_Internal.h> /* Fee internal header file */ /*==================[macros]================================================*/ /*==================[type definitions]======================================*/ /*==================[external function declarations]========================*/ /*==================[internal function declarations]========================*/ /*==================[external constants]====================================*/ /*==================[internal constants]====================================*/ #define FEE_START_SEC_CONFIG_DATA_UNSPECIFIED #include <Fee_MemMap.h> /* !LINKSTO Fee.Sections,1 */ /* !LINKSTO Fee.SWS_Fee_00071,1, Fee.SWS_Fee_00103,1 */ /* !LINKSTO Fee.Sections.Generation,1 */ /* Sections configuration array */ CONST(Fee_SectionConfiguration_t, FEE_CONST) Fee_SectionCfg[FEE_NUMBER_OF_SECTIONS] = { { 0U, 8192U }, { 8192U, 8192U } }; /* Blocks configuration array */ CONST(Fee_BlockConfiguration_t, FEE_CONST)Fee_BlockCfg[FEE_NO_OF_CONFIGURED_BLOCKS] = { { 4U, 4U, 16U, FALSE }, { 4U, 4U, 17U, FALSE }, { 1U, 4U, 32U, FALSE }, { 8U, 8U, 48U, FALSE }, { 48U, 48U, 64U, FALSE }, { 6U, 8U, 80U, FALSE }, { 287U, 288U, 96U, FALSE }, { 4U, 4U, 112U, FALSE }, { 78U, 80U, 128U, FALSE }, { 31U, 32U, 144U, FALSE }, { 17U, 20U, 160U, FALSE }, { 4U, 4U, 176U, FALSE }, { 153U, 156U, 192U, FALSE }, { 1U, 4U, 208U, FALSE }, { 8U, 8U, 224U, FALSE }, { 2U, 4U, 240U, FALSE }, { 3U, 4U, 256U, FALSE }, { 4U, 4U, 272U, FALSE }, { 1U, 4U, 288U, FALSE } }; #define FEE_STOP_SEC_CONFIG_DATA_UNSPECIFIED #include <Fee_MemMap.h> #if (FEE_ALIGNMENT_VALUE == 1) #define FEE_START_SEC_CONFIG_DATA_8 #include <Fee_MemMap.h> #elif (FEE_ALIGNMENT_VALUE == 2) #define FEE_START_SEC_CONFIG_DATA_16 #include <Fee_MemMap.h> #elif (FEE_ALIGNMENT_VALUE == 4) #define FEE_START_SEC_CONFIG_DATA_32 #include <Fee_MemMap.h> #else #define FEE_START_SEC_CONFIG_DATA_64 #include <Fee_MemMap.h> #endif /** \brief Array containing consistency pattern value */ CONST(uint8, FEE_CONST) Fee_WrittenMarkerPattern[FEE_WRITTEN_MARKER_SIZE] = { FEE_WRITTEN_MARKER_PATTERN, FEE_WRITTEN_MARKER_PATTERN, FEE_WRITTEN_MARKER_PATTERN, FEE_WRITTEN_MARKER_PATTERN, }; #if (FEE_ALIGNMENT_VALUE == 1) #define FEE_STOP_SEC_CONFIG_DATA_8 #include <Fee_MemMap.h> #elif (FEE_ALIGNMENT_VALUE == 2) #define FEE_STOP_SEC_CONFIG_DATA_16 #include <Fee_MemMap.h> #elif (FEE_ALIGNMENT_VALUE == 4) #define FEE_STOP_SEC_CONFIG_DATA_32 #include <Fee_MemMap.h> #else #define FEE_STOP_SEC_CONFIG_DATA_64 #include <Fee_MemMap.h> #endif /*==================[external data]=========================================*/ /*==================[internal data]=========================================*/ /*==================[external function definitions]=========================*/ /*==================[internal function definitions]=========================*/ /*===========================================================================*/ /*==================[end of file Fee_Cfg.c]===========================================*/
/* * * Copyright (c) 2023 Texas Instruments Incorporated * * All rights reserved not granted herein. * * Limited License. * * Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive * license under copyrights and patents it now or hereafter owns or controls to make, * have made, use, import, offer to sell and sell ("Utilize") this software subject to the * terms herein. With respect to the foregoing patent license, such license is granted * solely to the extent that any such patent is necessary to Utilize the software alone. * The patent license shall not apply to any combinations which include this software, * other than combinations with devices manufactured by or for TI ("TI Devices"). * No hardware patent is licensed hereunder. * * Redistributions must preserve existing copyright notices and reproduce this license * (including the above copyright notice and the disclaimer and (if applicable) source * code license limitations below) in the documentation and/or other materials provided * with the distribution * * Redistribution and use in binary form, without modification, are permitted provided * that the following conditions are met: * * No reverse engineering, decompilation, or disassembly of this software is * permitted with respect to any software provided in binary form. * * any redistribution and use are licensed by TI for use only with TI Devices. * * Nothing shall obligate TI to provide you with source code for the software * licensed and provided to you in object code. * * If software source code is provided to you, modification and redistribution of the * source code are permitted provided that the following conditions are met: * * any redistribution and use of the source code, including any resulting derivative * works, are licensed by TI for use only with TI Devices. * * any redistribution and use of any object code compiled from the source code * and any resulting derivative works, are licensed by TI for use only with TI Devices. * * Neither the name of Texas Instruments Incorporated nor the names of its suppliers * * may be used to endorse or promote products derived from this software without * specific prior written permission. * * DISCLAIMER. * * THIS SOFTWARE IS PROVIDED BY TI AND TI'S LICENSORS "AS IS" AND ANY EXPRESS * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL TI AND TI'S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * */ /** * \file Fls_Cfg.c * * \brief This file contains generated pre compile configuration file * for FLS MCAL driver */ /***************************************************************************** Project: Mem_StartupTime Date : 2024-03-08 12:30:24 This file is generated by EB Tresos Do not modify this file, otherwise the software may behave in unexpected way ******************************************************************************/ /******************************************************************************* * INCLUDES ******************************************************************************/ #include "Fls.h" #include "Fls_Cbk.h" /******************************************************************************* * VERSION CHECK ******************************************************************************/ #if ((FLS_SW_MAJOR_VERSION != (9U)) || (FLS_SW_MINOR_VERSION != (0U))) #error "Version numbers of Fls_Cfg.c and Fls.h are inconsistent!" #endif #if ((FLS_CFG_MAJOR_VERSION != (9U)) || (FLS_CFG_MINOR_VERSION != (0U))) #error "Version numbers of Fls_Cfg.c and Fls_Cfg.h are inconsistent!" #endif /******************************************************************************* * LOCAL CONSTANT MACROS ******************************************************************************/ /******************************************************************************* * LOCAL FUNCTION MACROS ******************************************************************************/ /******************************************************************************* * LOCAL DATA TYPES AND STRUCTURES ******************************************************************************/ /******************************************************************************* * LOCAL DATA PROTOTYPES ******************************************************************************/ /******************************************************************************* * GLOBAL DATA ******************************************************************************/ #define FLS_START_SEC_CONFIG_DATA #include "Fls_MemMap.h" /* generation of runtime configuration */ #ifdef __cplusplus extern "C" { #endif extern void Fee_JobEndNotification(void); extern void Fee_JobErrorNotification(void); CONST(struct Fls_ConfigType_s, FLS_CONFIG_DATA) FlsConfigSet = { .Fls_JobEndNotification = Fee_JobEndNotification, .Fls_JobErrorNotification = Fee_JobErrorNotification, .maxReadNormalMode = 768U, .maxWriteNormalMode = 768U, .sectorList = { [0] = { .numberOfSectors = 1U, .sectorPageSize = 256U, .sectorSize = 4096U, .sectorStartaddress = 1610612736U, }, [1] = { .numberOfSectors = 1U, .sectorPageSize = 256U, .sectorSize = 4096U, .sectorStartaddress = 1610616832U, }, [2] = { .numberOfSectors = 1U, .sectorPageSize = 256U, .sectorSize = 4096U, .sectorStartaddress = 1610620928U, }, [3] = { .numberOfSectors = 1U, .sectorPageSize = 256U, .sectorSize = 4096U, .sectorStartaddress = 1610625024U, }, }, .flsBaudRateDiv = 0U }; #ifdef __cplusplus } #endif #define FLS_STOP_SEC_CONFIG_DATA #include "Fls_MemMap.h" /******************************************************************************* * END OF FILE: Fls_Cfg.c ******************************************************************************/
/******************************************************************************* * The last generated configuration variant is not POST-BUILD variant. * Please refer Fls_Cfg.c. ******************************************************************************/
Regarding the last question in the ticket:
Have you tried Fls full chip erase before writing?What is the content of Fls read for more than 128 bytes? Is it 0xFF?
WE are not doing full chip erase. We call the API to erase Fls and trigger a write .. Both read and write opeartions are failing for this usecase.