Use reserved vectors in Cortex-M3 vector table

Here[1] you will find the vector table of Cortex-M3 core.

There are 4 vectors (16 bytes) that are named "Reserved" (plus one more at index 13). Do you think they can be used for custom purposes? The word "Reserved" seems this can't be done.

I'd like to use those vectors, that are in the non-volatile Flash memory, to store some data. In my case, I will save the MAC address (6 bytes) and a product serial number (4 bytes).

[1]
formatting link
Reply to
pozz
Loading thread data ...

Do not use the reserved vectors for anything, it will bite later, for sure.

There are examples in the past. One of the most glaring is the IBM selection of BIOS call interrupts: Intel reserved the first

32 vectors (0 - 0x1f), and IBM placed *all* BIOS calls in the area. This made it impossible to use (MS/PC)-DOS on the 80186 family, as there ws a collision of the disk I/O call and a serial interface hardware interrupt.
--

-TV
Reply to
Tauno Voipio

Oh come on. Over how many mcu generations do you expect his product to live so these reserved vectors would matter. And if it does (which I estimate at about 0.01% likelihood) he will have to move his MAC address and serial no. to some new place in a new environment, big deal.

Dimiter

====================================================== Dimiter Popoff, TGI

formatting link
======================================================
formatting link

Reply to
Dimiter_Popoff

For one product, I have moved it from ARM7TDMI to Cortex-M3 and from there to Cortex-M4. If the product is at all successful, you will see such development, as the old chips change to scarcity.

--

-TV
Reply to
Tauno Voipio

And even if during these 3 changes they take the reserved few bytes you have hijacked in order to save an external eeprom or something migrating from one platform to another will cost you a lot more work than moving the few bytes elsewhere will take. We all know the obvious mantras like "don't use reserved space" etc., however in this case I don't see much if anything going wrong because of violating that 'rule'.

Dimiter

Reply to
Dimiter_Popoff

Not to ignore the other thread, but the obvious question is: why? Are you really so hard up for space that getting those 10 bytes back is make or break for your design? Or is it just to be cute? If it's the former, you need a bigger chip; something else will eventually need 10 bytes as well. If it's the latter, don't do that.

In either case, while the question of can you might be academically entertaining, the answer of should you is a pretty resounding no.

--
Rob Gaddi, Highland Technology -- www.highlandtechnology.com 
Email address domain is currently out of order.  See above to fix.
Reply to
Rob Gaddi

That wasn't the problem with the '186. All subsequent processors have exactly the same problem (and worse) with the use of reserved interrupt vectors by the IBM PC BIOS.

The '186s real flaw was that while it was a bit faster than the 8086, and had a bunch of built-in hardware, none of that built-in hardware was IBM PC compatible.

There were a few '186 based PC clones built, but they all started with mostly disabling all the built-in hardware, and building the (slightly) faster processor into a motherboard with all the standard PC devices.

Reply to
Robert Wessel

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.