3
\$\begingroup\$

Why some bits in microcontroller registers are marked as reserved or for future pupose? I have seen some address spaces also marked as reserved for future expansion.

Are these bits result of a 'plan for future'? Or are these 'useless but may be we can use in future' bits?

Do the manufactures usually implement functions for these bits in their future release microcontollers?

Example:

enter image description here Screenshot from this document.

\$\endgroup\$

3 Answers 3

5
\$\begingroup\$

Unfortunately your questions require one to be psychic to answer them, as not even the manufacturer may know yet. But it is very easy to state one crystal clear thing about them: do not use them!

The original Macintoshes shipped with the 68000 microprocessor. While this CPU is capable of doing 32 bit operations, it has only 24 bit addressing capability.

[...]

Back when the Macintosh only had a 128k of RAM, the Operating System had to go to some extreme lengths to ensure that application have enough memory to run. The Macintosh Memory manager allows blocks of memory to move, and/or be purged if the System is having trouble fulfilling a memory request. The original designers of the Macintosh OS decided to use the last three of the unused bits in a 32 bit memory address to indicate whether a block of memory can move, be purged or if the block contains a resource item.

[...]

The problem is that to set these three bits, the Operating System routines have to call other routines who have to call still others etc. The net result is that using the Operating System routines to set these bits is quite inefficient when it comes to speed. Therefore, prior the introduction of System 7, some creative programmers with a need for speed, took it upon themselves to set these bits in the memory block's addresses directly thereby bypassing the overhead associated with calling the Operating System routines. Of course, the problem with doing this is that System 7 no longer stores these three bits in the address of the block of memory. Another significant programming error involves the other 5 bits of the 32 bit address. Ordinarily, these bits should remain unused and therefore, insignificant. However, some programmers, having realized that 5 bits are wasted decided to use them for their own purposes, even though Apple Developer Technical Support began warning them against this practice a full three years prior to the introduction of System 7.

[...]

The fundamental problem with setting the upper 8 bits of the address directly is that with System 7 all 32 bits of information are used for addressing. Changing the value of any of the 8 bits changes the address of the block of memory. When an application or an init tries to access the block of memory that now has an invalid address, the usual result is a Type 1 error. This occurs because the first 24 bits of an address are used to access memory locations between 0 and 16mb. The upper eight bits are used to access memory locations between 16mb and 4,096mb. Since most Macintoshes have less than 16mb of RAM, chances are this incorrect memory location is pointing to an address that does not physically exist, and this will yield a Type 1 (Bus Error).

In the event that the memory location does physically exists, then the application or init will then operate on whatever information it finds at the incorrect location. Depending on what the application or init is attempting to do, various errors may result.

\$\endgroup\$
3
\$\begingroup\$

Basically it is a coded message that says " do not count on consistent operation of these bits". When writing these specifications you may sometimes have register bits there that aren't used, because it is easier to leave them in that to take them out (i.e you just instantiate a copy - it saves time in testing) but you also don't want your customers writing code that may store stuff there as you may rip it out or change operation in the future.

\$\endgroup\$
1
\$\begingroup\$

The manufacturer is free to do whatever they like with these bits. In some cases, they may act as settable bits, but in other cases they could always read back as zeroes (or ones). A good data sheet will tell you what to expect. They do like to add features, though. If this were a Microchip part, one could reasonably expect to find a similar part that has 3 or 4 timers, not just two. And you might not have to wait for it--they often have several similar parts in a family so you can choose to have some or all of the possible features.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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