0
\$\begingroup\$

I want to know that if I want to enable the MAM Function in lpc 2468 should i specify both the MAMTIM AND MAMCR registers or only MAMCR.

Is it necessary to specify MAMTIM along with MAMCR for enabling the working of MAM

MAM means MEMORY ACCELERATOR MODULE which is used to enhance the performance of ARM processor.

MAMTIM means MAM TIMING REGISTER which determines how many CCLK's are used to access Flash memeory.

MAMCR means MAM CONTROL REGISTER which determines the operating mode of MAM.

MAM has three operating modes:

  1. MAM disabled

2.MAM partially Enabled.

  1. MAM fully Enabled.

LPC2468 datasheet here - 85 pages.

User manual here - 792 pages !!! :-)

\$\endgroup\$
  • \$\begingroup\$ Try to explain better the question, it should be useful also for other users. \$\endgroup\$ – clabacchio Feb 15 '12 at 7:12
  • \$\begingroup\$ @Clabacchio is this information sufficient. \$\endgroup\$ – Eljay Feb 15 '12 at 7:26
  • \$\begingroup\$ CTRL+F helps navigating a 792-pages manual...there won't be too many occurrences... \$\endgroup\$ – clabacchio Feb 15 '12 at 8:43
  • \$\begingroup\$ @clabacchio What do u mean to say by CTRL+F \$\endgroup\$ – Eljay Feb 15 '12 at 8:58
  • 1
    \$\begingroup\$ If you use it while reading a manual, you can SEARCH (CTRL+F) through the document to find what you need...you can't live without it :) \$\endgroup\$ – clabacchio Feb 15 '12 at 9:02
2
\$\begingroup\$

Manual seems to clearly say:

You need both MAMCR and MAMTIM
Without MAMCR 'it does not hunt'.
Without setting MAMTIM it appears to hunt randomly.

MAMCR

2 bits in MAMCR control what MAM operating mode is used.
The default setting = 00 which is MAM disabled.
01 partially enables MAM functions and
10 enables all MAM functions.
11 is for when you are feeling bored and wonder what colour smoke it will make. They provide it just to make you curious.

MAMTIM

3 bits in MAMTIM set flash access cycle count.


User manual around page 105 says:

7.1 MAM Control Register (MAMCR - 0xE01F C000)
Two configuration bits select the three MAM operating modes, as shown in Table 6–99. Following any reset, MAM functions are disabled. Software can turn memory access acceleration on or off at any time allowing most of an application to be run at the highest possible performance, while certain functions can be run at a somewhat slower but more predictable rate if more precise timing is required.

Changing the MAM operating mode causes the MAM to invalidate all of the holding latches, resulting in new reads of Flash information as required. This guarantees synchronization of the MAM to CPU operation.

7.2 MAM Timing Register (MAMTIM - 0xE01F C004)
The MAM Timing register determines how many CCLK cycles are used to access the Flash memory. This allows tuning MAM timing to match the processor operating frequency. Flash access times from 1 clock to 7 clocks are possible. Single clock Flash accesses would essentially remove the MAM from timing calculations. In this case the MAM mode may be selected to optimize power usage.


ADDED

Question:

  • sir u want to say that specifying only MAMCR=0x02 will not make the MAM work ?

  • 2 - MAM fetch cycles are 2 CCLKs in duration what does it mean

ANSWER

I want to say, read the manual and user guide in detail and see what all the registers are said to do.

That is a VERY complicated IC and you must be prepared either to spend the time understanding it, or use something else.

I have never used this part - I am just used to reading data sheets. It says that if you set MAMCR it WILL work but, IF I read the user guide correctly, it will use the number of clocks per cycle based on MAMTIM contents which are not defined according to this.

They MAY have been defined somewhere else but you need to know this.

The default may work Ok BUT you need to know this.

\$\endgroup\$
  • \$\begingroup\$ sir u want to say that specifying only MAMCR=0x02 will not make the MAM work \$\endgroup\$ – Eljay Feb 15 '12 at 8:24
  • \$\begingroup\$ 2 - MAM fetch cycles are 2 CCLKs in duration what does it mean \$\endgroup\$ – Eljay Feb 15 '12 at 8:36
  • \$\begingroup\$ I want to say, read the manual and user guide in detail and see what all the registers are said to do. That is a VERY complicated IC and you must be prepared either to spend the time understanding it, or use something else. I have never used this part - I am just used to reading data sheets. If you set MAMCR it WILL work but, IF I read the user guide correctly, it will use the number of clocks per cycle based on MAMTIM contents which are not defined according to this. They MAY have been defined somewhere else but you need to know this. The default may work Ok BUT you need to know this. \$\endgroup\$ – Russell McMahon Feb 15 '12 at 11:06
  • \$\begingroup\$ Actually MAMTIM has a default value; if you just enable MAM though MAMCR then the default value of 0x7 will be used for MAMTIM. (Page 41, section 6) \$\endgroup\$ – akohlsmith Feb 15 '12 at 12:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.