Use Flash File System with S29JL032 Flash memory

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Cesar_Q
Level 1
Level 1
5 sign-ins First reply posted First question asked
Dear Sir,
 
We are working with flash memory S29JL032 version and some issues are raised us. Could you please help us with these questions?
 
- We want to implement Flash File System (FFS) in our Flash memory. Could S29JL032 memory support FFS implementation? In case we could implement FFS in S29JL032 memory, which considerations we should take into account? (Is it possible the use of lld files without making previous changes?)
 
- Is possible the configuration of a determined part (Not all memory, only a determined sectors) of memory with FFS format?
 
Please, I hope  you can help me with these questions. 
 
Thank you
 
0 Likes
1 Solution
Apurva_S
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi @Cesar_Q 

Could S29JL032 memory support FFS implementation? Yes, FFS can be implemented on S29JL032J device.

In case we could implement FFS in S29JL032 memory, which considerations we should take into account? You should make all the appropriate changes (as per the memory device you are using) in the Format.h file. You can also go through the available documentation inside the FFS package (Programmer's Reference Guide, Porting Guide etc.)

(Is it possible the use of lld files without making previous changes?) Your question is not clear to me. Can you please explain what you mean by "previous change" ?

Is possible the configuration of a determined part (Not all memory, only a determined sectors) of memory with FFS format? There is a parameter called "NUMBER_OF_ERASE_BLOCKS" in the Format.h file. You can specify the number of sectors that you want to configure with FFS format there.

 

Regards.

View solution in original post

0 Likes
9 Replies
Apurva_S
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi @Cesar_Q 

Could S29JL032 memory support FFS implementation? Yes, FFS can be implemented on S29JL032J device.

In case we could implement FFS in S29JL032 memory, which considerations we should take into account? You should make all the appropriate changes (as per the memory device you are using) in the Format.h file. You can also go through the available documentation inside the FFS package (Programmer's Reference Guide, Porting Guide etc.)

(Is it possible the use of lld files without making previous changes?) Your question is not clear to me. Can you please explain what you mean by "previous change" ?

Is possible the configuration of a determined part (Not all memory, only a determined sectors) of memory with FFS format? There is a parameter called "NUMBER_OF_ERASE_BLOCKS" in the Format.h file. You can specify the number of sectors that you want to configure with FFS format there.

 

Regards.

0 Likes
Cesar_Q
Level 1
Level 1
5 sign-ins First reply posted First question asked

Dear Sir,

Thank you for your last response. It is very useful for us. I will try to clarify your question. 

I mean, we use nor external flash memory (S29JL032) and enable the use of lld file (low level driver to manage read/write flash memory actions). Some errors appear  due to some tags related to memcpy and writebufferProgm among others are not enabled by target_specific.h file.

We have followed the steps described in "Spansion BD porting guide" and "SpansionFs Porting guide" but there are not associated files with nor flash. (there are not defined files in CCT\SpansionFFS\FileSystem\pim\nor folder. Should we create these files?).

Are we misunderstanding the porting of FFS in our memory? Could you please detail us the steps to be followed to port Flash File System in S29JL032 memory?

Sorry for the inconveniences, we will appreciate your support with this issue, It is very important solve it.

Many thanks in advance. 

Regards 

0 Likes
Apurva_S
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi,

Can you Please send us a screenshot of the error?

Regards.

0 Likes
lock attach
Attachments are accessible only for community members.
Cesar_Q
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hi Sir,

Attached you can see ftl_flash error raised up in my project. This error is related to defined lld functions and external flash memory used (In lld_target_specific.h file is included "S29JLxxxJ.h" and in this one there are some tags that allows us some functions of lld.c).  We are using fat files sent us by Cypress in our aplication.

Could you please help us with this issue?

Regards

0 Likes
Apurva_S
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi,

The ‘LLD_MEMCPY_OP’ macro is missing in S29JLxxxJ.h. Simply adding following to that file should fix the error.

#define LLD_MEMCPY_OP

Can you try and let us know the results?

Regards.

0 Likes
Cesar_Q
Level 1
Level 1
5 sign-ins First reply posted First question asked

Hi Sir, 

other needed tags are not defined in S29JLxxxJ.h, should we add all of them? What impact do they have adding other tags in our project? Why haven't they all been added in S29JLxxxJ.h?

According to tags defined in S29JLxxxJ.h file some lld functions are not allowed to use, such as lld_WriteBufferProgramOp, lld_memcpy amog others...

After tags have been added in our project others errors are raised up. Could you please detail us the steps to be followed to implement FFS in our project?

Thanks in advance

Regards

 

 

0 Likes
Apurva_S
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi @Cesar_Q 

 

Sorry… I missed the lld_memcpy() is a wrapper for Write Buffer Programming and the S29JL-L does not support WBP.

In this case, I think you need to implement your own lld_memcpy() that uses Single Word Programming.

It should be simple and something like this:

 

DEVSTATUS lld_memcpy

(

FLASHDATA * base_addr,    /* device base address is system */

ADDRESS offset,           /* address offset from base address */

WORDCOUNT word_cnt,       /* number of words to program */

FLASHDATA *data_buf       /* buffer containing data to program */

)

{

  DEVSTATUS status;

  WORDCOUNT i;

 

  for (i = 0; i < word_cnt; i++)

  {

         status = lld_ProgramOp(base_addr, offset + i, data_buf[i]);

         if (status != DEV_NOT_BUSY)

         {

               break;

         }

  }

  return status;

}

 

Regards.

0 Likes

Hi @Apurva_S ,

Afther we have implemented your solution and many others, FFS does not work in our memory. We don't understand the malfunction reason. Are you sure that S29JL032 is compatible with FFS? Have you performed any test with FFS and this memory?

After some configurations and test, it has been impossible to implement FFS in S29JL032. We have followed FFS guidelines but it hasn't been helpful.

Could you please indicate us the steps to be followed to implement FFS in our project?

Thanks

0 Likes
Apurva_S
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi @Cesar_Q 

The FFS should work with all the NOR Flash memories because it just performs basic Flash operations (i.e., read/program/erase). But you may need some integration effort depending on the Flash part’s features like Write Buffer Programming.

Please provide more details of the failure. Are you facing issue while building the project again or is FFS already implemented but showing wrong output on the flash? 

I would like to point out that the S29JL032J has top/bottom boot sectors which are smaller in size compared to the other sectors. The FFS expects uniform sectors. Hope you have considered this point while modifying the Format.h file. Could you please provide your Format.h file and any other files which you have modified?

Regards.

0 Likes