Urgent help with H8/3672 Flash programming routines

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hello everybody!

Has anyone worked with the microprocessor H8/3672 of Hitachi? If so,
could you help me to code the routines for an in-application Flash
programming process?. What I'm trying to do is a backup of several
calibration values in a free segment of Flash memory while the program
is running. The first step I take consist on copying to RAM the
Flash-related functions. Then, when I call them, the program gets
hunged at the point when I set the bit SWE of FLMCR1. Any idea?

I thank your help in advance!

DAVE

Re: Urgent help with H8/3672 Flash programming routines
Be sure that all interrupts are off and that the timing routines are
producing the right times.

Gerard

www.stacktools.com




Quoted text here. Click to load it



Re: Urgent help with H8/3672 Flash programming routines
Thanks Gerard

All checked!.
Interrupts are disabled and no timing is requiered before the setting
of SWE in register FLMCR1, so the origin of the problem is not located
in delay routines. In addition to this, I have made sure that the
Flash functions' pointers point correctlly to RAM positions and that
no accés to Flash is being performed while programming process is
activated.

What seems so extrange to me is that, if I comment the line  
FLMCR1 |= 0x40   //(SWE=1)  
of my programming routine (running from RAM), execution flows normally
till the end of the function and returns to code in Flash. Obviously,
it has no efect on Flash due to the fact that others bits of FLMCR1
are not accesible while SWE=0.

From this observation, I suspect that real problem is related to accés
to the internal I/O register FLMCR1


Any more suggestions?  

DAVE








Quoted text here. Click to load it

Re: Urgent help with H8/3672 Flash programming routines
He David,

Well I'm doing the same with no problems. First I had problems with the
internal flash driver ( I use it for an embedded file system, st_efs, for an
operating system StackTos) because of interrupts ( I thought that everything
was blocked but that was not the case) but after solving this it is working
very fine.

How do you debug this? with the target monitor from Hitachi?

www.stacktools.com



Quoted text here. Click to load it



Re: Urgent help with H8/3672 Flash programming routines
Hi Gerard!,

Interrupts seem to be all disabled (including RTE & address break
interrupt).
The whole number of tools I'm using reduces to HDI of Hitachi and
icch83 compiler from IAR. In order to get rid of problems due to
address break interrupt, what I do is to write Flash with HDI and then
execute with no debuger on th H8/3672.

Just one more question: how do you realised that some interrupts were
not masked, and what was the exact sign of malfunction you got?

Could you explain me the exact process you follow to transfer Flash
functions' code to RAM?. I'd very gratefull if you could describe the
code for internal flash driver (If you consider it's possible, of
course).

Best regards,

DAVE


Quoted text here. Click to load it

Re: Urgent help with H8/3672 Flash programming routines
David,

I send some stuff to snipped-for-privacy@yahoo.es

Good luck!

Quoted text here. Click to load it
for an
everything
working
so,
program



Re: Urgent help with H8/3672 Flash programming routines
Hi!

Thank you very much for your interest. I'm processing the file you
sent me. We'll be in touch.

DAVE






Quoted text here. Click to load it

Site Timeline