<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic DIVU/DIVS Forcing a Reset in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209471#M10125</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I am using the MCF51JE2256 and when I try to use the DIVU/DIVS instructions it forces a reset...any ideas what I am doing wrong?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;move.w #$03E8,D2 ;move in 1000 dec&lt;BR /&gt;divu.l D2,D0 ;divid by 1000&lt;BR /&gt;move.b D0,(adeci1,A5) ;store 1000 place&lt;BR /&gt;move.b D1,D0 ;get original byte&lt;BR /&gt;move.b #$64,D2 ;move in 100&lt;BR /&gt;divu.l D2,D0 ;divide it by 100&lt;BR /&gt;move.b D0,(adeci2,A5) ;save hundreds place&lt;BR /&gt;move.w D1,D0 ;get orginal byte&lt;BR /&gt;move.b #$0A,D2 ;move in 10 dec&lt;BR /&gt;divu.l D2,D0 ;divide by 10&lt;BR /&gt;move.b D0,(adeci3,A5) ;store tens place(s)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Feb 2012 23:59:02 GMT</pubDate>
    <dc:creator>grt951</dc:creator>
    <dc:date>2012-02-23T23:59:02Z</dc:date>
    <item>
      <title>DIVU/DIVS Forcing a Reset</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209471#M10125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I am using the MCF51JE2256 and when I try to use the DIVU/DIVS instructions it forces a reset...any ideas what I am doing wrong?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;move.w #$03E8,D2 ;move in 1000 dec&lt;BR /&gt;divu.l D2,D0 ;divid by 1000&lt;BR /&gt;move.b D0,(adeci1,A5) ;store 1000 place&lt;BR /&gt;move.b D1,D0 ;get original byte&lt;BR /&gt;move.b #$64,D2 ;move in 100&lt;BR /&gt;divu.l D2,D0 ;divide it by 100&lt;BR /&gt;move.b D0,(adeci2,A5) ;save hundreds place&lt;BR /&gt;move.w D1,D0 ;get orginal byte&lt;BR /&gt;move.b #$0A,D2 ;move in 10 dec&lt;BR /&gt;divu.l D2,D0 ;divide by 10&lt;BR /&gt;move.b D0,(adeci3,A5) ;store tens place(s)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2012 23:59:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209471#M10125</guid>
      <dc:creator>grt951</dc:creator>
      <dc:date>2012-02-23T23:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: DIVU/DIVS Forcing a Reset</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209472#M10126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't immediately see why you're getting a reset as it doesn't seem to be dividing by zero anywhere, but there are bugs on just about every line of your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For debugging the reset, add some exception service routines to all the exception vectors, and have them breakpoint or print or something. Are you sure "A5" is set up properly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you single-step through the code and see which line it fails on?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;Assume D0 contains xxxxxxxx and D2 contains yyyyyyyy
&amp;nbsp;&amp;nbsp;&amp;nbsp; move.w #$03E8,D2 ; move in 1000 decD2 now contains yyyy03e8
&amp;nbsp;&amp;nbsp;&amp;nbsp; divu.l D2,D0 ;divid by 1000D0 contains xxxxxxxx/yyyy03e8, call this zzzzzzzz
&amp;nbsp;&amp;nbsp;&amp;nbsp; move.b D0,(adeci1,A5) ;store 1000 place
&amp;nbsp;&amp;nbsp;&amp;nbsp; move.b D1,D0 ;get original byteD0 now contains zzzzzzxx
&amp;nbsp;&amp;nbsp;&amp;nbsp; move.b #$64,D2 ;move in 100D2 now contains yyyy0364
&amp;nbsp;&amp;nbsp;&amp;nbsp; divu.l D2,D0 ;divide it by 100D0 now contains zzzzzzxx/yyyy0364, call this mmmmmmmm
&amp;nbsp;&amp;nbsp;&amp;nbsp; move.b D0,(adeci2,A5) ;save hundreds place
&amp;nbsp;&amp;nbsp;&amp;nbsp; move.w D1,D0 ;get orginal byteD0 now contains mmmmzzzz
&amp;nbsp;&amp;nbsp;&amp;nbsp; move.b #$0A,D2 ;move in 10 decD2 now contains yyyy030a
&amp;nbsp;&amp;nbsp;&amp;nbsp; divu.l D2,D0 ;divide by 10D0 now contains mmmmzzzz/yyyy030a, call this nnnnnnnn
&amp;nbsp;&amp;nbsp;&amp;nbsp; move.b D0,(adeci3,A5) ;store tens place(s)
&lt;/PRE&gt;&lt;P&gt;I'm not sure what the above routine is trying to do, but I'm sure you're not intending to divide by almost random numbers like you're doing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"move.b #$64,D2 ;move in 100" moves 0x64 into the lower BYTE of D2, leaving the upper three bytes the same as they were before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case, the divide instruction might have zeroed the upper bits as a side effect of the division and the data you're using, but relying on that is very risky. The "divide by 100" is guaranteed to be dividing by 868 (0x0364) even if you have zeroed D2 previously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is "just something you have to know". I've just read the "ColdFire Family Programmer's Reference Manual" pretty much from cover to cover, and after a trip back to an old 68000 Programming Manual I found section 1.19 in the ColdFire one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;1.9 Organization of Data in Registers
This section describes data organization within the data, address, and control registers.
1.9.1 Organization of Integer Data Formats in Registers
Each integer data register is 32 bits wide. Byte and word operands occupy the lower
8- and 16-bit portions of integer data registers, respectively. Longword operands
occupy entire data registers. A data register that is either a source or destination
operand only uses or changes the appropriate lower 8 or 16 bits (in byte orword
operations, respectively). The remaining high-order portion does not
change and is unused and unchanged.
&lt;/PRE&gt;&lt;P&gt;If you missed reading that section you have to read between a lot of lines to find this out. The MOVE instruction&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;MOVE:
&amp;nbsp;&amp;nbsp;&amp;nbsp; Moves the data at the source to the destination locationand sets the
&amp;nbsp;&amp;nbsp;&amp;nbsp; condition codes according to the data. Thesize of the operation may
&amp;nbsp;&amp;nbsp;&amp;nbsp; be specified as byte, word, or longword.
&lt;/PRE&gt;&lt;P&gt;That doesn't mention sign extending. Compare with these instructions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;MOVEA
Word size source operands are sign extended to 32-bit quantities
before the operation is done.
MOVEQ
The data in an 8-bit field within the operation word is sign-extended
to a longword operand in the data register as it is transferred.
MOV3Q
The 3-bit immediate operand is sign extended to a longword operand
and all 32 bits are transferred to the destination location.
MVS 
Move with Sign ExtendSign-extend the source operand and move
to the destination register.
MVZ Move with Zero-Fill
Zero-fill the source operand and move to the destination register
.&lt;/PRE&gt;&lt;P&gt;MOV3Q, MVZ and MVZ all require ISA_B. I know the MCF51MM256 is ISA_C, so your one might be too. it is more portable to explicitly clear the registers before loading bytes or words into them, like this compiler-generated code does:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;40104698:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4280&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clrl %d
04010469a:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; moveb %d1,%d
04010469c:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2f00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; movel %d0,%sp@-
4010469e:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4e90&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; jsr %a0@
=======================
40104972:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4280&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clrl %d0
40104974:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4878 000c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pea c &amp;lt;OPER1&amp;gt;
40104978:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1439 4024 56bd&amp;nbsp; moveb 402456bd &amp;lt;cmdQueueHead&amp;gt;,%d2
4010497e:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1002&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; moveb %d2,%d0
40104980:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2200&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; movel %d0,%d1
40104982:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5282&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; addql #1,%d2
40104984:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e588&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lsll #2,%d0
40104986:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e989&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lsll #4,%d1
40104988:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9280&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subl %d0,%d1
4010498a:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0681 4024 5722&amp;nbsp; addil #1076123426,%d1
40104990:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2f01&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; movel %d1,%sp@-
40104992:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4879 4024 56be&amp;nbsp; pea 402456be &amp;lt;testCmd.4546&amp;gt;
40104998:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4eb9 4015 04e0&amp;nbsp; jsr 401504e0 &amp;lt;memcpy&amp;amp;gt
;========================== 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (testListPtr-&amp;gt;numParams == testCmd.numParams)
401049dc:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4281&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clrl %d1
401049de:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4280&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clrl %d0
401049e0:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3228 0002&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; movew %a0@(2),%d1
401049e4:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3039 4024 56c0&amp;nbsp; movew 402456c0 &amp;lt;testCmd.4546+0x2&amp;gt;,%d0
401049ea:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b081&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmpl %d1,%d0
401049ec:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 660a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bnes 401049f8 &amp;lt;HsvHwTest+0xb8&amp;gt;
&lt;/PRE&gt;&lt;P&gt;This also shows why it is a very good idea to use a compiler to generate your code. It knows about this stuff.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you're trying to convert binary to decimal, then you should check the REMS.L and REMU.L instructions. Just keep dividing the same number by 10 and print the REMAINDER until the dividend is zero&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2012 07:37:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209472#M10126</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2012-02-24T07:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: DIVU/DIVS Forcing a Reset</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209473#M10127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AFAIK JE256 has only MAC and no hardware divider. You need to use software&amp;nbsp;routines for DIV and MOD.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try reading hardware configuration info (contents of D0 register on reset, see Reset Exception chapter in JE reference manual). See if DIV bit is set or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Feb 2012 22:19:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209473#M10127</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-02-25T22:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: DIVU/DIVS Forcing a Reset</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209474#M10128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; Try reading hardware configuration info (contents of D0 register on reset, see Reset Exception&lt;/P&gt;&lt;P&gt;&amp;gt; chapter in JE reference manual). See if DIV bit is set or not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You shouldn't have to read a register to see if the CPU has a divide instruction. That should be obvious from the manual. That should be explicitly documented in the manual. But it isn't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Reference Manual states:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.3 V1 ColdFire Core&lt;/P&gt;&lt;P&gt;The CPU implements ColdFire instruction set &lt;FONT color="#3366FF"&gt;&lt;STRONG&gt;architecture revision C (ISA_C)&lt;/STRONG&gt;&lt;/FONT&gt; with added&lt;BR /&gt;capabilities:&lt;/P&gt;&lt;P&gt;• Hardware MAC support for 16X16 32 and 32X32  32 bit multiply-accumulate operations&lt;BR /&gt;(32-bit accumulator)&lt;BR /&gt;• Upward compatibility with all other ColdFire cores (V2–V5)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;7.1 Introduction&lt;/P&gt;&lt;P&gt;For detailed information on instructions, see the &lt;STRONG&gt;&lt;FONT color="#3366FF"&gt;ISA_C&lt;/FONT&gt;&lt;/STRONG&gt; definition in the&lt;BR /&gt;ColdFire Family Programmer’s Reference Manual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That referenced manual states:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3.2 Instruction Set Summary&lt;/P&gt;&lt;P&gt;Table 3-14 shows the entire user instruction set in alphabetical order. Table 3-15 shows the entire&lt;BR /&gt;supervisor instruction set in alphabetical order. Recall the major ISA revisions are defined as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;• ISA_ A: Original ColdFire instruction set architecture.&lt;BR /&gt;• ISA_B: Improved data movement instructions, byte- and word-sized compares, and miscellaneous&lt;BR /&gt;enhancements are added.&lt;BR /&gt;• ISA_C: Instructions are added for improved bit manipulation.&lt;BR /&gt;• FPU: Floating-Point Unit instructions.&lt;BR /&gt;• MAC: Multiply-Accumulate instructions.&lt;BR /&gt;• EMAC: Revised ISA for enhanced Multiply-Accumulate unit.&lt;BR /&gt;• EMAC_B: Instructions are added for dual-accumulation operations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DIV is listed as first appearing in ISA_A. The Cross Reference in &lt;FONT color="#3366FF"&gt;&lt;STRONG&gt;Table 3-16 shows ISA_C supports DIVU, DIVS, REMS and REMU.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;STRONG&gt;So from that the JE256 MUST support the DIV instructions.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Except ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CFPRM Table 11-1. Exception Vector Assignments&lt;/P&gt;&lt;P&gt;Vector 5 [Note 2] Offset: 014 Assignment: Divide by zero&lt;/P&gt;&lt;P&gt;Note 2: If the divide unit is not present (5202, 5204, 5206), vector 5 is reserved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So only the 5202, 5204 and 5206 don't have Divide Units according to the latest Programmer's Reference Manual (Rev 3, March 2005). This is also the version linked from the MCF51JE256 page on Freescale's web site.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Comparing that table with the one in the MCF51JE256 manual:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table 7-6. Exception Vector Assignments&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;&lt;STRONG&gt;Vector 5-7 Offset: 0x014-0x01C Assignment: Reserved&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000"&gt;&lt;STRONG&gt;No divide-by-zero trap. That implies it doesn't have the divide instruction.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt; Try reading hardware configuration info (contents of D0 register on reset, see Reset Exception&lt;/P&gt;&lt;P&gt;&amp;gt; chapter in JE reference manual). See if DIV bit is set or not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;7.3.3.14 Reset Exception&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;Figure 7-12. D0 Hardware Configuration Info&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;The above figure doesn't give the default value for the DIV bit. It is blank.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Didn't Freescale know if the CPU was going to support the divide instruction when they wrote the manual?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's a glaring conflict in the manual, and an important feature of the chip that looks to have been left out, without documenting that it has been left out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking at other manuals...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The MCF51JM128 manual doesn't list a divide-by-zero exception, the Reset Exception documentation says the "DIV" bit isn't set (but it doesn't state if it has a MAC or not). Except this manual does state:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.3 V1 ColdFire Core&lt;/P&gt;&lt;P&gt;This CPU implements ColdFire instruction set architecture revision C (ISA_C) with a reduced&lt;BR /&gt;programming model:&lt;BR /&gt;• &lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;No hardware support&lt;/FONT&gt;&lt;/STRONG&gt; for MAC/EMAC and &lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;DIV instructions&lt;/FONT&gt;&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The MCF51AC256, CN128 and QE128 manuals say the same thing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That text doesn't appear in the MCF51JE256 manual. That's the problem here. When the line in section 1.3 stating "Hardware MAC support..." got added, the "No hardware support .. DIV instruction" got deleted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 10:00:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209474#M10128</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2012-02-27T10:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: DIVU/DIVS Forcing a Reset</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209475#M10129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI&gt;DIV is listed as first appearing in ISA_A. The Cross Reference in &lt;FONT color="#3366FF"&gt;&lt;STRONG&gt;Table 3-16 shows ISA_C supports DIVU, DIVS, REMS and REMU.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#3366FF"&gt;&lt;STRONG&gt;So from that the JE256 MUST support the DIV instructions.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I think that DIV HW is optional and&amp;nbsp;doesn't violate ISA_C requirements. CPU should handle divide and remainder instruction anyway, but&amp;nbsp;since DIV HW is not present, CPU should jump to specific exception handler.&lt;/P&gt;&lt;P&gt;Of course you are right, it must be specified more clearly is&amp;nbsp;DIV HW present in specific family, or not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;1.3 V1 ColdFire Core&lt;/LI&gt;&lt;LI&gt;This CPU implements ColdFire instruction set architecture revision C (ISA_C) with a reduced&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;programming model: &lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;No&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;ardware support&lt;/FONT&gt;&lt;/STRONG&gt; for MAC/EMAC and &lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;DIV instructions&lt;/FONT&gt;&lt;/STRONG&gt;.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Indeed there are V1's with MAC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 22:51:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209475#M10129</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-02-27T22:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: DIVU/DIVS Forcing a Reset</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209476#M10130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; I think that DIV HW is optional and&amp;nbsp;doesn't violate ISA_C requirements.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not as documented in the currently released (seven year old) version of the "ColdFire Family Programmer's Reference Manual Rev 3 03/2005".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to it, the only "options" are Floating Point, MAC, EMAC and EMAC_B. It documents that DIV isn't available in MCF5202, MCF5204 and MCF5206, but ONLY in those models.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If some internal Freescale specification of "ISA_C" has changed to allow DIV to be optional, then a new version of the CFPRM should be released stating that.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The individual MCF51AC, CN, JM and QE manuals all state "ISA_C with a reduced programming model: ... No hardware support ... DIV instructions".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The documentation error is that sentence isn't present in the MCF51JE256 manual. I've put in a Service Report on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt; but&amp;nbsp;since DIV HW is not present, CPU should jump to specific exception handler.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Obviously not provided (or enabled) by whatever development environment "grt951" is using.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does CodeWarrior provide these automatically if the right CPU and/or build options are selected?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2012 12:52:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209476#M10130</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2012-02-28T12:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: DIVU/DIVS Forcing a Reset</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209477#M10131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you everyone for your help....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had to use a macro to divide because as many of you pointed out there is no hardware divider in the JE256. I found the following routine which can divide pretty much anything.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;;*** ColdFire 32/32-&amp;gt;32 unsigned divide routine&lt;BR /&gt;;*** C = A/B, A is called the dividend, B the divisor and C the quotient.&lt;BR /&gt;;*** D0 = dividend&lt;BR /&gt;;*** D1 = divisor&lt;BR /&gt;;*** quotient returned in D0 also D0 = (D0/D1)&lt;BR /&gt;;*** (preserves all other registers)&lt;BR /&gt;uldiv lea.l (-16,a7),a7 ;adjust the stack pointer&lt;BR /&gt;movem.l D4-D7,(a7) ;save d4, d5, d6, d7 registers&lt;BR /&gt;move.l d0,d5 ;store a dividend copy in D5&lt;BR /&gt;move.l d1,d7 ;store a divisor copy in D7&lt;BR /&gt;move.l d7,d0 ;D0 = D7 = divisior&lt;BR /&gt;subq.l #$01,d0 ;D0 = D0 -1 = divisior - 1&lt;BR /&gt;and.l d7,d0 ;&lt;BR /&gt;bne.b L_ULDIV17&lt;BR /&gt;move.l d5,d0&lt;BR /&gt;lsr.l #$01,d7&lt;BR /&gt;beq.w L_ULDIV18&lt;BR /&gt;L_ULDIV5&lt;BR /&gt;lsr.l #$01,d0&lt;BR /&gt;lsr.l #$01,d7&lt;BR /&gt;bne.b L_ULDIV5&lt;BR /&gt;bra.w L_ULDIV18&lt;BR /&gt;L_ULDIV17&lt;BR /&gt;move.l d7,d4&lt;BR /&gt;or.l d5,d4&lt;BR /&gt;move.l #$0ff000000,d6&lt;BR /&gt;move.l d6,d0&lt;BR /&gt;and.l d4,d0&lt;BR /&gt;bne.b L_ULDIV6&lt;BR /&gt;asr.l #$08,d6&lt;BR /&gt;move.l d6,d0&lt;BR /&gt;and.l d4,d0&lt;BR /&gt;bne.b L_ULDIV6&lt;BR /&gt;asr.l #$08,d6&lt;BR /&gt;move.l d6,d0&lt;BR /&gt;and.l d4,d0&lt;BR /&gt;bne.b L_ULDIV6&lt;BR /&gt;asr.l #$08,d6&lt;BR /&gt;L_ULDIV6&lt;BR /&gt;moveq.l #$00,d4&lt;BR /&gt;move.l d6,d0&lt;BR /&gt;and.l d7,d0&lt;BR /&gt;bne.b L_ULDIV11&lt;BR /&gt;lsl.l #$08,d7&lt;BR /&gt;moveq.l #$08,d4&lt;BR /&gt;move.l d6,d0&lt;BR /&gt;and.l d7,d0&lt;BR /&gt;bne.b L_ULDIV11&lt;BR /&gt;lsl.l #$08,d7&lt;BR /&gt;moveq.l #$010,d4&lt;BR /&gt;move.l d6,d0&lt;BR /&gt;and.l d7,d0&lt;BR /&gt;bne.b L_ULDIV11&lt;BR /&gt;lsl.l #$08,d7&lt;BR /&gt;moveq.l #$018,d4&lt;BR /&gt;L_ULDIV11&lt;BR /&gt;tst.l d5&lt;BR /&gt;bpl.b L_ULDIV41&lt;BR /&gt;tst.l d7&lt;BR /&gt;ble.b L_ULDIV43&lt;BR /&gt;L_ULDIV44&lt;BR /&gt;addq.l #$01,d4&lt;BR /&gt;add.l d7,d7&lt;BR /&gt;bmi.b L_ULDIV43&lt;BR /&gt;addq.l #$01,d4&lt;BR /&gt;add.l d7,d7&lt;BR /&gt;bpl.b L_ULDIV44&lt;BR /&gt;L_ULDIV43&lt;BR /&gt;addq.l #$01,d4&lt;BR /&gt;bra.b L_ULDIV42&lt;BR /&gt;L_ULDIV41&lt;BR /&gt;cmp.l d5,d7&lt;BR /&gt;bhi.b L_ULDIV10&lt;BR /&gt;L_ULDIV39&lt;BR /&gt;add.l d7,d7&lt;BR /&gt;addq.l #$01,d4&lt;BR /&gt;cmp.l d5,d7&lt;BR /&gt;bhi.b L_ULDIV10&lt;BR /&gt;add.l d7,d7&lt;BR /&gt;addq.l #$01,d4&lt;BR /&gt;cmp.l d5,d7&lt;BR /&gt;bls.b L_ULDIV39&lt;BR /&gt;L_ULDIV10&lt;BR /&gt;lsr.l #$01,d7&lt;BR /&gt;L_ULDIV42&lt;BR /&gt;moveq.l #$00,d0&lt;BR /&gt;tst.l d4&lt;BR /&gt;beq.b L_ULDIV18&lt;BR /&gt;subq.l #$01,d4&lt;BR /&gt;ble.b L_ULDIV12&lt;BR /&gt;L_ULDIV13&lt;BR /&gt;cmp.l d7,d5&lt;BR /&gt;bcs.b L_ULDIV14&lt;BR /&gt;sub.l d7,d5&lt;BR /&gt;or.l #$01,d0&lt;BR /&gt;L_ULDIV14&lt;BR /&gt;lsr.l #$01,d7&lt;BR /&gt;add.l d0,d0&lt;BR /&gt;subq.l #$01,d4&lt;BR /&gt;ble.b L_ULDIV12&lt;BR /&gt;cmp.l d7,d5&lt;BR /&gt;bcs.b L_ULDIV14a&lt;BR /&gt;sub.l d7,d5&lt;BR /&gt;or.l #$01,d0&lt;BR /&gt;L_ULDIV14a&lt;BR /&gt;lsr.l #$01,d7&lt;BR /&gt;add.l d0,d0&lt;BR /&gt;subq.l #$01,d4&lt;BR /&gt;bgt.b L_ULDIV13&lt;BR /&gt;L_ULDIV12&lt;BR /&gt;cmp.l d7,d5&lt;BR /&gt;bcs.b L_ULDIV18&lt;BR /&gt;or.l #$01,d0&lt;BR /&gt;L_ULDIV18&lt;BR /&gt;tst.l d3&lt;BR /&gt;movem.l (a7),D4-D7 ;restore d4, d5, d6, d7 registers&lt;BR /&gt;lea.l (16,a7),a7&lt;BR /&gt;rts&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Feb 2012 00:36:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209477#M10131</guid>
      <dc:creator>grt951</dc:creator>
      <dc:date>2012-02-29T00:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: DIVU/DIVS Forcing a Reset</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209478#M10132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;BLOCKQUOTE&gt;TomE wrote:&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;The documentation error is that sentence isn't present in the MCF51JE256 manual. I've put in a Service Report on this.&lt;/BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I have received the following answer:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... In reply to your message regarding Service Request SR xxxx: Yes, you are right there is a document error on the reference manual of JE family. I already create an internal service request to the document department in order to fix this document. Please accept my apologies for the inconvenience. Have a good day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2012 06:40:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209478#M10132</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2012-03-05T06:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: no division instruction on V1's</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209479#M10133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;FONT size="4"&gt;I was recently using the MCF51AC256 which hit me with the same unexpected problem, no division instruction.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;The GNU C compiler supplies its own arithmetic and can handle that if you specify the&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;"-hwdiv" parameter for the call in your BAT file.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;set GENFLAGS=-m5200 -mno-mac -mno-hwdiv -w -O0 -Wa,-a=C:\PROJ\GNUBOA~1\main.lst&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;here's an excerpt from the MCF51AC256 reference manual:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;7.3.3.14 Reset Exception&lt;/P&gt;&lt;P&gt;Asserting the reset input signal (RESET) to the processor causes a reset exception. The reset exception has&lt;/P&gt;&lt;P&gt;the highest priority of any exception; it provides for system initialization and recovery from catastrophic&lt;/P&gt;&lt;P&gt;failure. Reset also aborts any processing in progress when the reset input is recognized. Processing cannot&lt;/P&gt;&lt;P&gt;be recovered.&lt;/P&gt;&lt;P&gt;The reset exception places the processor in the supervisor mode by setting the SR[S] bit and disables&lt;/P&gt;&lt;P&gt;tracing by clearing the SR[T] bit. This exception also clears the SR[M] bit and sets the processor’s SR[I]&lt;/P&gt;&lt;P&gt;bit to the highest level (level 7, 0b111). Next, the VBR is initialized to zero (0x0000_0000). The control&lt;/P&gt;&lt;P&gt;registers specifying the operation of any memories (e.g., cache and/or RAM modules) connected directly&lt;/P&gt;&lt;P&gt;to the processor are disabled.&lt;/P&gt;&lt;P&gt;NOTE&lt;/P&gt;&lt;P&gt;Other implementation-specific registers are also affected. Refer to each&lt;/P&gt;&lt;P&gt;module in this reference manual for details on these registers.&lt;/P&gt;&lt;P&gt;After the processor is granted the bus, it performs two longword read-bus cycles. The first longword at&lt;/P&gt;&lt;P&gt;address 0x(00)00_0000 is loaded into the supervisor stack pointer and the second longword at address&lt;/P&gt;&lt;P&gt;0x(00)00_0004 is loaded into the program counter. After the initial instruction is fetched from memory,&lt;/P&gt;&lt;P&gt;program execution begins at the address in the PC. If an access error or address error occurs before the first&lt;/P&gt;&lt;P&gt;instruction is executed, the processor enters the fault-on-fault state.&lt;/P&gt;&lt;P&gt;ColdFire processors load hardware configuration information into the D0 and D1 general-purpose&lt;/P&gt;&lt;P&gt;registers after system reset. The hardware configuration information is loaded immediately after the&lt;/P&gt;&lt;P&gt;reset-in signal is negated. This allows an emulator to read out the contents of these registers via the BDM&lt;/P&gt;&lt;P&gt;to determine the hardware configuration.&lt;/P&gt;&lt;P&gt;Information loaded into D0 defines the processor hardware configuration as shown in&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000C3" face="Times New Roman"&gt;&lt;FONT color="#0000C3" face="Times New Roman"&gt;Figure 7-12&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Times New Roman"&gt;.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;..and so forth, with a big diagram in Figure 7-12 showing each bit.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;For assembly division on the V1 a macro is just about the worst thing I could immagine. I just whipped&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;up a quick shift and subtract subroutine. To be called by assembly calculations.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;I've managed to scrounge up an old copy of that division routine written in PE-Micro assembly but it's an early one and I'm not sure if it has a bug with signed numbers or not.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;(Man that excerpt&amp;nbsp;didn't look that&amp;nbsp;bad before I previewed it)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;Mudwog&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;　&lt;/FONT&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 11:40:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209479#M10133</guid>
      <dc:creator>Mudwog</dc:creator>
      <dc:date>2012-03-06T11:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: no division instruction on V1's</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209480#M10134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is not that bad with availability of FF1 instruction, which allows to determine required iterations count (FF1(numerator)-FF1(denominator)) or quickly skip past leading zeros.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Mar 2012 19:02:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209480#M10134</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-03-08T19:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: FF1 instruction</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209481#M10135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;COOL!&lt;/P&gt;&lt;P&gt;I was not aware of the FF1 instruction before.&amp;nbsp;&amp;nbsp; This will come in handy the next time I work on a V1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mudwog&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Mar 2012 09:27:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209481#M10135</guid>
      <dc:creator>Mudwog</dc:creator>
      <dc:date>2012-03-10T09:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: DIVU/DIVS Forcing a Reset</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209482#M10136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI&gt;&amp;gt; I think that DIV HW is optional and doesn't violate ISA_C requirements.&lt;/LI&gt;&lt;LI&gt;Not as documented in the currently released (seven year old) version of the "ColdFire Family Programmer's&lt;/LI&gt;&lt;LI&gt;Reference Manual Rev 3 03/2005".&lt;/LI&gt;&lt;LI&gt;According to it, the only "options" are Floating Point, MAC, EMAC and EMAC_B. It documents that DIV isn't&lt;/LI&gt;&lt;LI&gt;available in MCF5202, MCF5204 and MCF5206, but ONLY in those models.&lt;/LI&gt;&lt;LI&gt;If some internal Freescale specification of "ISA_C" has changed to allow DIV to be optional, then a new version of the&lt;/LI&gt;&lt;LI&gt;CFPRM should be released stating that.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;V1CFWP.pdf &amp;nbsp;"Version 1 ColdFire® White Paper", Rev 0 07/2006, on page 6 has these lines:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Additionally, the V1 core includes design parameters to easily include/exclude various “execute engines”&lt;/LI&gt;&lt;LI&gt;associated with specific instructions. These optional execute engines include an integer divider (DIV),&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;{E}MAC multiply-accumulate engines, and a cryptographic acceleration unit (CAU).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MCF51JFRM128.pdf confirms the above. On page 73&amp;nbsp;it is said that JF has both EMAC and DIV. D0 Hardware Configuration Information table on page 256 just confirms this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So "ColdFire Family Programmer's Reference Manual Rev 3 03/2005" is really outdated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2012 17:41:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209482#M10136</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-03-13T17:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: DIVU/DIVS Forcing a Reset</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209483#M10137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wrote, just over a YEAR ago:&lt;/P&gt;&lt;P&gt;&amp;gt; I have received the following answer:&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt;... In reply to your message regarding Service Request SR xxxx:&lt;/P&gt;&lt;P&gt;&amp;gt; Yes, you are right there is a document error on the reference&lt;/P&gt;&lt;P&gt;&amp;gt; manual of JE family. I already create an internal service request&lt;/P&gt;&lt;P&gt;&amp;gt; to the document department in order to fix this document. Please&lt;/P&gt;&lt;P&gt;&amp;gt; accept my apologies for the inconvenience. Have a good day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That Service Request was closed 5 days after I reported it. Has the manual been updated? Has a Reference Manual Addendum been released? It would make a lot of sense if the "close" was delayed until something actually happened.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Reference Manual "MCF51JE256RM.pdf" is still dated "12/1/2010" and there's no sign of a Reference Manual Addendum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only place these problems are documented is in this forum. Nothing else seems to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Mar 2013 23:43:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/DIVU-DIVS-Forcing-a-Reset/m-p/209483#M10137</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2013-03-09T23:43:01Z</dc:date>
    </item>
  </channel>
</rss>

