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
thanks for your help,i tried it ,but it reset all the same
Hi,
Can you attach the project?
Regards,
Daniel
thanks for your help,do you have any example of bootloder under the MDK , thanks!
Hi,
I'm afraid we don't.
Regards,
Daniel
How to use MDK to generate bin,i used MDK generate bin like that:
but it generates a folder
can you tell me how to generate bin under MDK,thanks!
thanks for replay,the problem has been solved!
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.
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!
#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
hi,i have been closed all interrupt,then erase the flash ,and run at full speed,but the s32k144 reset again.
best regards!