cancel
Showing results for 
Search instead for 
Did you mean: 

XFLASH on ST10F276

drosa
Associate II
Posted on February 25, 2004 at 13:14

XFLASH on ST10F276

4 REPLIES 4
drosa
Associate II
Posted on February 23, 2004 at 12:41

Hi all!

I'm working with the ST10F276, and I'm having accessing to XFLASH. What I do to activate it is:

SYSCON.XPEN = 0

XPERCON.XFLASHEN = 1

SYSCON.XPEN = 1

Currently: SYSCON = 0x0617 ;;; XPERCON = 0x002D

This doesn't work, because when I try to access XFLASH, a software trap occurs, and the software stop running.

I've tried to set the XFICR register to 0x0001 (I'm working at 64MHz), but after doing this, the software hangs...

Due to my purpose is to program/erase IFLASH and XFLASH (both internal memories), and I'm not able to access XFLASH, I suppose is not possible to access flash register. In fact, I can't erase any memory sector....

Does anybody knows how can I get to work fine with the XFLASH?. It's needed to initialize BUSCON0 for make work the XFLASH?
charles239955_st
Associate II
Posted on February 25, 2004 at 12:39

Hi,

There was a specification update. For CPU frequencies above 40 MHz you need 2 waitstates to access the XFlash so XFICR = 2.

There is no BUSCON to initialise to access the Flash.
drosa
Associate II
Posted on February 25, 2004 at 12:47

Hi Kenshin.

Looking the ST10F276 DataSheet, page 71, chapter 9.4, I found that if the frequency is higher than 40 Mhz, the WMS value should be 0001b (1 wait state). Could be here the trouble?

Regards,

Daniel.
charles239955_st
Associate II
Posted on February 25, 2004 at 13:14

Exactly.

Now, you need to put WMS = 2 when above 40MHz.