S32 Flash Demo Code not working!

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

S32 Flash Demo Code not working!

ソリューションへジャンプ
4,483件の閲覧回数
kalidassb
Contributor II

Hi,

   i'm using S32 Flash demo code for flash test when i try to erase flash memory i am getting reset mode always,it not executing further,any idea what I can try?

 

 

 

Regards,

kalidass

ラベル(1)
1 解決策
3,568件の閲覧回数
alexandrehochar
Contributor III

Hi,
I found my problem, I have interruptions during the flash commands.
So i need to disable all interrupts during flash commands.

Thanks for your help Jiri.

元の投稿で解決策を見る

13 返答(返信)
3,568件の閲覧回数
jiri_kral
NXP Employee
NXP Employee

Hi Kalidass, 

which example do you mean? I'm not able locate " FTFE->FSTAT = FTFE_FSTAT_CCIF_MASK; " row in any of S32DS examples. Can you share the project? 

Jiri

0 件の賞賛
返信
3,568件の閲覧回数
alexandrehochar
Contributor III

Hi Jiri,

You can find this instruction in the project shared by Lukas Zadrapa in this thread :

PROGRAMMING THE S32K FLASH 

Regards,

0 件の賞賛
返信
3,568件の閲覧回数
jiri_kral
NXP Employee
NXP Employee

Hi, 

I tried the example with S32DS v1.3 and S32DS v2.0 - and it is normally working. I can see modified Flash memory. 

I'm using Windows 7 and S32K144 EVB-Q100 with Open SDA debugger. So -I'm not able reproduce the issue. 

pastedImage_1.png

Jiri

0 件の賞賛
返信
3,568件の閲覧回数
alexandrehochar
Contributor III

Hi,

Indeed, the example code works but when i try to execute this code in my project in run mode, the code crash. But if i execute flash instruction one by one with breakpoints between each instruction, it works fine.
I place the code in .code_ram section ( Section define by default in a 32DS ).
I try to create a new section with memcpy of section, and i have the same result.

I don't know what i miss.

The startup code can be accused ?

Regards,

0 件の賞賛
返信
3,568件の閲覧回数
jiri_kral
NXP Employee
NXP Employee

Hi, 

I'm not able reproduce the issue - can you please share  your project? I can attach to running machine and the Flash memory is successfully modified and there is no exception or other error. 

Jiri

0 件の賞賛
返信
3,569件の閲覧回数
alexandrehochar
Contributor III

Hi,
I found my problem, I have interruptions during the flash commands.
So i need to disable all interrupts during flash commands.

Thanks for your help Jiri.

3,568件の閲覧回数
chenfengfang
Contributor I

hello

    I have the same problem, how to disable all interrupts?

    thanks!

0 件の賞賛
返信
3,568件の閲覧回数
jiri_kral
NXP Employee
NXP Employee

Hello, 

you can use SDK functions INT_SYS_DisableIRQGlobal(); and INT_SYS_EnableIRQGlobal();

Jiri

0 件の賞賛
返信
3,568件の閲覧回数
zhengyuchina
Contributor I

I also have the problem,@Kalidass B,when run to the FTFE->FSTAT = FTFE_FSTAT_CCIF_MASK;the mcu will reset,how can you solve the problem.

Regards,

0 件の賞賛
返信
3,568件の閲覧回数
alexandrehochar
Contributor III

Hi,

I have the same problem have you solves this ?

0 件の賞賛
返信
3,568件の閲覧回数
stanish
NXP Employee
NXP Employee

Hi kalidass,

Thanks for your report.

Could you please specify which demo code you mean?

Do you use s32 SDK  + S32K144 ?

Stan

0 件の賞賛
返信
3,569件の閲覧回数
kalidassb
Contributor II

Dear Mr.Stan,

         Sorry for the delay in response,i have copied generated file from S32 SDK design studio to IAR IDE,

when i compile and test the demo code ram linker file it is working but  selecting Flash.Icf file not working MCU getting Reset at FlashCommandSequence execution.

           any changes is required in the Flash linker file for flash test?

Regards,

Kalidass B

3,569件の閲覧回数
kalidassb
Contributor II

Dear Mr.Stan,

S32 SDK design studio flash demo code for S32K144 MCU.

Regards,

Kalidass B

On Wed, Sep 14, 2016 at 9:39 PM, stanish <admin@community.freescale.com>

0 件の賞賛
返信