[EXT_EP-11339] FLS Driver instability with read-lengths not multiples of 256 bytes Created: 21/Jul/23  Updated: 17/Nov/23

Status: New
Project: Embedded Software & Tools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Medium
Reporter: TI User Assignee: TI User
Resolution: Unresolved Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Product: MCAL
Internal ID: MCAL-8350
Found In Release: MCUSW_J7_01.03.00
Affected Platform/Device: j721e-evm

 Description   

The customer (Vector) has run into this issue and has added the following description:

 

The issue appeared to me on the read with length and/or address not equal multiples of 256, in the example below at the read of 2 bytes. __ 

The read gave back false data (if I remember correctly the first byte was correct, the 2^nd^ one was ORed with 0x04). __ 

After that, a write access was running endlessly in the Fls module. __ 

My workaround was to always perform 256 byte accesses aligned to 256 byte and read the actually required data out in a wrapper. I’ve attached the code to this mail. __ 

The wrapper expects JobEndNotificationWrapper and JobErrorNotificationWrapper to be called by the Fls module as callbacks and FlsWrapper_Read to be used by upper layer. The FlsWrapper_Cancel is just there as the API is required by Vector FEE module.

 

Attached is the Wrapper code (FlsWrapper.c) mentioned by the customer. Below is the test they are using to replicate the issue:

volatile uint8 dummyArray[0x30];

volatile uint8 buffer1[512];

volatile uint8 buffer2[512];

volatile uint8 buffer3[512];

volatile uint32 counter;

volatile tFblResult result;

volatile MemIf_JobResultType jobResult;

volatile uint8 breaker;

  

void PollFls(void)

{

  do

 

{     Fls_MainFunction();     jobResult = Fls_GetJobResult();   }

while (jobResult == MEMIF_JOB_PENDING);

}

  while(1)

  {

    result = Fls_Erase(0x3FF0000, 0x10000);

    PollFls();

    result = Fls_Write(0x3FFFF00, buffer1, 256);

    PollFls();

    result = Fls_Read(0x3FFFF00, buffer2, 256);

    PollFls();

    result = Fls_Read(0x3FFFF00, buffer3, 2);

    PollFls();

    result = Fls_Write(0x3FFFE00, buffer1, 256);

    PollFls();

   

    while(breaker == 0)

    {}

    breaker = 0;

  }


Generated at Mon Apr 14 08:02:07 CDT 2025 using Jira 9.12.17#9120017-sha1:aba4002bcd633f188b6a4bb5dd8a0e1f20b79ee4.