You are here

Main flash programming problem | Cypress Semiconductor

Main flash programming problem

Summary: 5 Replies, Latest post by Holger Wech on 28 Sep 2016 12:17 AM PDT
Verified Answers: 3
Last post
Log in to post new comments.
glory_man_1752411's picture
2 posts

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?

BMAH's picture
Cypress Employee
222 posts

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?

bhwj's picture
Cypress Employee
66 posts

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

glory_man_1752411's picture
2 posts

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.

ZHAOYL586_1912146's picture
1 post

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!

howe's picture
Cypress Employee
21 posts

Dear user,

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

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.:

Hopefully this answers your question, otherwise let me know.


Log in to post new comments.