Main flash programming problem

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

cross mob
Anonymous
Not applicable

I have FM4-216-ethernet board and tried to compile and debug example "FM_PDL_2.0.1\example\flash\fm4\type1_6" using keil v5. But when program entered in to MFlash_SectorErase function it stopped. 

   

this line executed ----   FM_FLASH_IF->FASZR = 0x01u;

   

after that (at line u8Dummy = FM_FLASH_IF->FASZR;  ) program jumped to 0xfffffffe addr and freezed.

   

Where problem may be? Where is my mistake?
   

0 Likes
1 Solution
Anonymous
Not applicable

I believe you are testing with "Release" Mode. I changed to "Debug" Mode and could not see the program getting stuck. Can you try with "Debug" Mode?

View solution in original post

0 Likes
5 Replies
Anonymous
Not applicable

I believe you are testing with "Release" Mode. I changed to "Debug" Mode and could not see the program getting stuck. Can you try with "Debug" Mode?

0 Likes
bharadhwajas_91
Employee
Employee
First like received First like given

Can you please try with other IDE's as well .IAR if possible?

0 Likes
Anonymous
Not applicable

I founded a problem. 

   

In FLASH PROGRAMMING MANUAL there is explanation:

   
CPU Programming Mode ..... Because word access is not possible in this mode, programs that are contained in the flash memory cannot be executed.
   

So, flash manipulation functions need to be placed in RAM. I sure in IAR PDL-driver for flash should work successfully (they marked as __ramfunc). But in Keil I marked memory assignment for file which contain mainflash-driver - IRAM. And all works fine.

Anonymous
Not applicable

HELLO,I want to extend a nand_flash for mb9bf106 beacause the code_flash is too small (512k),or I want to

   

choose a cpu is suitable this MB9BF106,Does The cpu CAN USE THIS CODE_FLASH?  can someone give me some advice,thanks very much!

   
 
0 Likes
HolgerW_56
Employee
Employee
25 solutions authored 10 sign-ins 5 sign-ins

Dear user,

   

Cypress offers Cortex-M4 Microcontroller up to 2MByte Flash, e.g.: S6E2C-Series

   

http://www.cypress.com/part/s6e2c2aj0agb10000

   

http://www.cypress.com/products/fm4-s6e2c-series-high-performance-arm-cortex-m4-microcontroller-mcu-...

   

Or, of course, you can connect an external Flash Memory by usage of the external bus.
Depending on the device / device package also NAND-Flash is supported. Please check the related data sheet, e.g. MB9BF106N (100pin) does not support NAND, but MB9BF106R (120pin) does support NAND.

   

Cypress also offer Low-Level drivers for external Flash devices, e.g.: www.cypress.com/documentation/software-and-drivers/low-level-driver-nand-flash

   

Hopefully this answers your question, otherwise let me know.

   

Regards,
#Holger