Use reserved vectors in Cortex-M3 vector table

Started by pozz February 2, 2018
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] 
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0552a/BABIFJFG.html
On 2.2.18 14:26, pozz wrote:
> 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] > http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0552a/BABIFJFG.html
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
On 02.2.2018 г. 15:05, Tauno Voipio wrote:
> On 2.2.18 14:26, pozz wrote: >> 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] >>
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0552a/BABIFJFG.html
> > > > 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. >
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 http://www.tgi-sci.com ====================================================== http://www.flickr.com/photos/didi_tgi/
On 2.2.18 15:47, Dimiter_Popoff wrote:
> On 02.2.2018 г. 15:05, Tauno Voipio wrote: >> On 2.2.18 14:26, pozz wrote: >>> 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] >>>
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0552a/BABIFJFG.html
>>> >> >> >> >> 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. >> > > 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
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
On 02.2.2018 г. 17:58, Tauno Voipio wrote:
> On 2.2.18 15:47, Dimiter_Popoff wrote: >> On 02.2.2018 г. 15:05, Tauno Voipio wrote: >>> On 2.2.18 14:26, pozz wrote: >>>> 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] >>>>
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0552a/BABIFJFG.html
>>>> >>> >>> >>> >>> 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. >>> >> >> 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 > > > 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. >
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
On 02/02/2018 04:26 AM, pozz wrote:
> 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] > http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0552a/BABIFJFG.html
>
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.
On Fri, 2 Feb 2018 15:05:14 +0200, Tauno Voipio
<tauno.voipio@notused.fi.invalid> wrote:

>On 2.2.18 14:26, pozz wrote: >> 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?&#2013266080; 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.&#2013266080; In my case, I will save the MAC address
(6
>> bytes) and a product serial number (4 bytes). >> >> >> >> [1] >>
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0552a/BABIFJFG.html
> > >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.
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.