Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20707 Discussions

about:MaxII UFM SPI Mode

Altera_Forum
Honored Contributor II
1,707 Views

//****** My first queation ****** 

//****** It has been solved by Joe D in# 2*****  

Hi, 

 

In MaxII Device Handbook, in Chapter 9, about the UFM, it talks about writing to or reading from the UFM. SPI has two modes: Base Mode and Extended Mode. How can i confirm which mode the cpld uses? Is there any data that should be write into the cpld to make sure which mode i use?  

 

Thanks. 

 

:) 

//****** My second question ****** 

 

So, if i choose Extended Mode, can i do like this? 

 

1. Read State Register, if bit0 == 0 , go to step 2 

2. Enable write to UFM (make bit1 <= 1) 

3. Set BP0 and BP1 (<=0) 

4. Sector Erase  

5. Read State Register, if bit0 == 0, go to step6 

6. Read From UFM 

 

My puzzle: 

1. After finishing these 6 steps above, can i get (FFFF)H from the address which i just indicated in Sector Erase Step?  

2. The step sequence is right? Or i miss some stpes? 

3. Can i write data to UFM after finishing first 5 steps? 

 

Thanks:)
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
375 Views

See page 9-47, you select it in the megawizard options for the altufm megafunction that is instantiated in your design. Its not programmable real-time but programmable from the wizard configuration you create. base mode is 8-bit data/address and extended mode is 16-bit data/address.

0 Kudos
Altera_Forum
Honored Contributor II
375 Views

I get it. Thank you very much:)

0 Kudos
Altera_Forum
Honored Contributor II
375 Views

So, if i choose Extended Mode, i can do like this? 

 

1. Read State Register, if bit0 == 0 , go to step 2 

2. Enable write to UFM (make bit1 <= 1) 

3. Set BP0 and BP1 (<=0) 

4. Sector Erase  

5. Read State Register, if bit0 == 0, go to step6 

6. Read From UFM 

 

My puzzle: 

1. After finishing these 6 steps above, can i get (FFFF)H from the address which i just indicated in Sector Erase Step?  

2. The step sequence is right? Or i miss some stpes? 

3. Can i write data to UFM after finishing first 5 steps? 

 

Thanks:)
0 Kudos
Altera_Forum
Honored Contributor II
375 Views

Your steps look fine. Yes, you should get all '1's in the addresses you have erased. You can write data to the flash after step 5.

0 Kudos
Reply