storing data in code block 3 of internal flash memory

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

storing data in code block 3 of internal flash memory

ソリューションへジャンプ
305件の閲覧回数
Fergani
Contributor II

Hi,

we want to store data inside the chip's flash. We have almost 800kB data to store and we want to use code block 3 of the internal flash. We tried to reserve some memory in ld script and successfully write with __attribute__((section(".myData"))) uint8_t ProgramFlashDataSave[]={0x1,0x2,0x3..}. However we want to save actual data in application level. when we save data in runtime in application if gives the below error;

MemManage: The processor attempted a load or store at a location that does not permit the operation.
Possible MemManage fault location: 0x00700000.
HardFault: A fault has been escalated to a hard fault.

 

The ld script additions;

MEMORY
{

int_datasave : ORIGIN = 0x00700000, LENGTH = 0x00000500

}

 

SECTIONS
{
    .my_data :
    {
       *(.myData)

    } > int_datasave

}

Can you help us for this? is it safe to write the code block 3 of the flash memory? ıs there any example?

 

We use RTD. 

タグ(1)
0 件の賞賛
1 解決策
253件の閲覧回数
Fergani
Contributor II

Hi @danielmartynek , 

thank you for your quick response.

We discovered we need to use one of them and use C40_IP example app with a wrapper around it to write whatever we want and we do it with success.

Actually we want to save around 800kB data and it took almost 2.5 sec. However, it is very suprizing it took that much.

Do we have a way to decrease the time to save data to flash memory? Actually we want to make it in order of ms(millisecond)

 

Best Regards

元の投稿で解決策を見る

0 件の賞賛
5 返答(返信)
245件の閲覧回数
Fergani
Contributor II

Hi @danielmartynek ,

It seems so.

Is there a way that you can offer so that we can handle that much data in that much time. We looked at some external flashes written by QSPI but they handle to save 800kByte arount 2.5sec as well?

Best regards

 

0 件の賞賛
234件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Fergani,

It depends of the flash.

For example, on the S32K344 EVBs, there is MX25L6433F

danielmartynek_0-1711113806528.png

If you have any questions about QuadSPI, please create a new thread.

 

Thank you,

BR, Daniel

0 件の賞賛
254件の閲覧回数
Fergani
Contributor II

Hi @danielmartynek , 

thank you for your quick response.

We discovered we need to use one of them and use C40_IP example app with a wrapper around it to write whatever we want and we do it with success.

Actually we want to save around 800kB data and it took almost 2.5 sec. However, it is very suprizing it took that much.

Do we have a way to decrease the time to save data to flash memory? Actually we want to make it in order of ms(millisecond)

 

Best Regards

0 件の賞賛
251件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Fergani,

This is within the specs of the flash, it can't get faster than that, unfortunately.

Please refer to the S32K3 datasheet, rev.8.1

Table 29. Flash memory program and erase specifications.

 

Regards,

Daniel

0 件の賞賛
272件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @Fergani,

How do you store the data to the block?

Based on the log, it seems you use a SRT instruction to store the data, as if it was SRAM not Flash.

The data must be programmed using either the low-level C40_Ip driver or the MCAL FLS / FEE drivers.

 

Regards,

Daniel

0 件の賞賛