error of s32k144's flash read and write

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

error of s32k144's flash read and write

3,343 Views
shenlanzeng
Contributor I
Hi,i'm debugging flash read an write,when i used "EraseAndProgram",single step is ok,but run at full speed ,it reset,would you help to find what the promble ,thanks! ps:  I  used external 5V to supply .
 6FE9DF85@53F51040.2BF5B059.jpg_recompress.jpg
Labels (1)
0 Kudos
Reply
11 Replies

2,649 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

How did you define the .MyRamCode section?

Please try the default ram section using:

__attribute__ ((section(".code_ram")))   // place the function below into .code_ram section
void EraseAndProgram(void);

Regards,

Daniel

0 Kudos
Reply

2,649 Views
shenlanzeng
Contributor I

thanks for your help,i tried it ,but it reset all the same

0 Kudos
Reply

2,649 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

Can you attach the project?

Regards,

Daniel

0 Kudos
Reply

2,649 Views
shenlanzeng
Contributor I

thanks for your help,do you have any example of bootloder under the MDK , thanks!

0 Kudos
Reply

2,649 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

I'm afraid we don't.

Regards,

Daniel

0 Kudos
Reply

2,649 Views
shenlanzeng
Contributor I

How to use MDK to generate bin,i used MDK generate bin like that:

pastedImage_1.png

but it generates a folder

pastedImage_2.png

can you tell me how to generate bin under MDK,thanks!

0 Kudos
Reply

2,649 Views
shenlanzeng
Contributor I

thanks for replay,the problem has been solved!

0 Kudos
Reply

2,649 Views
jinshuaixu
Contributor V

Hi, friend

      Maybe you are not close interrupt before operate flash.you can try that close interrupt before erase flash section ,and open interrupt in the end.

0 Kudos
Reply

2,649 Views
shenlanzeng
Contributor I

Hi,

Thanks for your relplay,how do i use the register operation to close all the interrypts,and open the interrupts,i didn‘t find the relevant information!

thanks for your help!

0 Kudos
Reply

2,649 Views
jinshuaixu
Contributor V

#if defined (__GNUC__)
#define ENABLE_INTERRUPTS() __asm volatile ("cpsie i" : : : "memory");
#else
#define ENABLE_INTERRUPTS() __asm("cpsie i")
#endif


/** \brief Disable interrupts
*/
#if defined (__GNUC__)
#define DISABLE_INTERRUPTS() __asm volatile ("cpsid i" : : : "memory");
#else
#define DISABLE_INTERRUPTS() __asm("cpsid i")
#endif

0 Kudos
Reply

2,649 Views
shenlanzeng
Contributor I

hi,i have been closed all interrupt,then erase the flash ,and run at full speed,but the s32k144 reset again.

best regards!

0 Kudos
Reply