Re: wdebug instruction causes XLB slave error acknowledge interrupt on MCF547X.

nop head <[email protected]> Tue, 7 Apr 2009 23:22:36 +0100
Newsgroups gmane.comp.hardware.motorola.microcontrollers.coldfire
Message-ID <[email protected]>
--000e0cd248e6b8e2500466fe7342
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

David,

I assume your MBAR was at 0x10000000? Why do you have NOPs around the
wdebug?

I am at home at the moment. I will double check my findings tomorrow at
work.

I had to disable the XLB interrupt to get past the wdebug and then reset the
bit in the status register before enabling the interrupt again.  I can't
think what would cause it. My code and data are in flash, mapped with CS0,
read only. MBAR is at 80000000.

Am I right to assume the WDEBUG read of the data will be in supervisor data
or instruction space? Odd that the address captured by the XLB was half way
through the data.

Chris

2009/4/7 Seymour David-RA2693 <[email protected]>

>  Ouch...just got everything put away!  That serves me right for once
> trying to keep a clean office.  Lesson learned.  Thx!!
>
> Ok...re-ran with following code:
> dBUG> di 20000
> 00020000: 2C80                 MOVE.L    D0,(A6)
> 00020002: 0002                 DC.W      0x0002
> 00020004: 0000                 DC.W      0x0000
> 00020006: 0000                 DC.W      0x0000
> 00020008: 207C 0002 0000       MOVEA.L   #0x00020000,A0
> 0002000E: 4E71                 NOP
> 00020010: 4E71                 NOP
> 00020012: FBD0 0003            WDEBUG    (A0)
> 00020016: 4E71                 NOP
> 00020018: 4E71                 NOP
> 0002001A: 227C 1000 0248       MOVEA.L   #0x10000248,A1
> 00020020: 2211                 MOVE.L    (A1),D1
> 00020022: 4E71                 NOP
> 00020024: 4E71                 NOP
> 00020026: 4E4F                 TRAP      #0x0F
> 00020028: 37FE                 DC.W      0x37FE
> dBUG> rm pc 20008
> dBUG> go
> dBUG> rd
> PC: 00020028 SR: 2004 [t.Sm.000...xnZvc]
> An: 00020000 10000248 00000000 00000000 00000000 00000000 00000000 03FFFFF8
> Dn: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> dBUG>
>
> Register D1 is zero so bit 8 is not setting.
> Anything else for me to try?
> Regards,
> David
>
> David E Seymour
>
> *http://www.freescale.com/coldfire*
>
>
>  ------------------------------
> *From:* [email protected] [mailto:[email protected]]
> *On Behalf Of *nop head
> *Sent:* Tuesday, April 07, 2009 4:11 PM
> *To:* Seymour David-RA2693
> *Subject:* Re: [ColdFire] wdebug instruction causes XLB slave error
> acknowledge interrupt on MCF547X.
>
> Hi David,
>   Yes I think it kills my PSTCLK, but why does it generate an XLB
> interrupt? Can you look at the XLB registers as see if the status register
> has bit 8 set.
>
> Chris
>
> 2009/4/7 Seymour David-RA2693 <[email protected]>
>
>>  Hi Chris,
>> I did a simple test using the M5474EVB Lite board running dBUG ROM
>> monitor:
>> dBUG> di 20000
>> 00020000: 2C80                 MOVE.L    D0,(A6)
>> 00020002: 0002                 DC.W      0x0002
>> 00020004: 0000                 DC.W      0x0000
>> 00020006: 0000                 DC.W      0x0000
>> 00020008: 267C 0002 0000       MOVEA.L   #0x00020000,A3
>> 0002000E: 4E71                 NOP
>> 00020010: FBD3 4E71            WDEBUG    (A3)
>> 00020014: 4E71                 NOP
>> 00020016: 4E71                 NOP
>> 00020018: 4E71                 NOP
>> 0002001A: 4E71                 NOP
>> 0002001C: 4E71                 NOP
>> 0002001E: 4E4F                 TRAP      #0x0F
>> 00020020: 4E71                 NOP
>> 00020022: 4E71                 NOP
>> 00020024: 4E71                 NOP
>>
>> I set the PC to 0x20008 and issued "go" command.
>> Watching PSTCLK with oscope, it is running be default.  After executing
>> the above code, it is low.
>> So I'm seeing it work OK.
>> Regards,
>> David
>>
>> David E Seymour
>>
>> *http://www.freescale.com/coldfire*
>>
>>
>>  ------------------------------
>> *From:* [email protected] [mailto:[email protected]]
>> *On Behalf Of *nop head
>> *Sent:* Tuesday, April 07, 2009 9:27 AM
>> *To:* Seymour David-RA2693
>> *Subject:* [ColdFire] wdebug instruction causes XLB slave error
>> acknowledge interrupt on MCF547X.
>>
>>   I want to disable the PST signals, when not debugging, to reduce RF
>> emissions. I used the following code successfully in an MCF537X project, but
>> when I use it on a V4 processor I get an interrupt from the XLB arbiter.
>>
>> csr_data       dc.w    0010110010000000b       ;CSR
>>                    dc.w    2,0,0                   ;PCD
>> ...
>>                 lea     csr_data,a0
>>                 dc.w    1111101111010000b     ;wdebug.l a0
>>                 dc.w    0000000000000011b
>>
>> My assembler doesn't support wdebug, hence the hand coded dc.w stuff. All
>> the code does is set the PCD bit in the BDM CSR register.
>>
>> The fault address is csr_data + 4, i..e. half way through the data. The
>> fault is a slave error acknowledge. The data is correctly aligned on a four
>> byte boundary and is certainly accessible by normal instructions.
>>
>> Anybody know what is going on here?
>>
>> TIA, Chris
>>
>> [email protected] Send a post to the list. [email protected] the list.
>> [email protected] Join the list in digest mode.
>> [email protected] Leave the list.
>> [email protected] Send a post to the list. [email protected] the list.
>> [email protected] Join the list in digest mode.
>> [email protected] Leave the list.
>
>
> [email protected] Send a post to the list. [email protected] the list.
> [email protected] Join the list in digest mode.
> [email protected] Leave the list.
> [email protected] Send a post to the list. [email protected] the list.
> [email protected] Join the list in digest mode.
> [email protected] Leave the list.
>

--000e0cd248e6b8e2500466fe7342
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

David,<br><br>I assume your MBAR was at 0x10000000? Why do you have NOPs ar=
ound the wdebug?<br><br>I am at home at the moment. I will double check my =
findings tomorrow at work. <br><br>I had to disable the XLB interrupt to ge=
t past the wdebug and then reset the bit in the status register before enab=
ling the interrupt again.=A0 I can&#39;t think what would cause it. My code=
 and data are in flash, mapped with CS0, read only. MBAR is at 80000000. <b=
r>
<br>Am I right to assume the WDEBUG read of the data will be in supervisor =
data or instruction space? Odd that the address captured by the XLB was hal=
f way through the data.<br><br>Chris<br><br><div class=3D"gmail_quote">2009=
/4/7 Seymour David-RA2693 <span dir=3D"ltr">&lt;<a href=3D"mailto:David.Sey=
[email protected]">[email protected]</a>&gt;</span><br>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



<div>
<div dir=3D"ltr" align=3D"left"><span><font size=3D"2" color=3D"#0000ff">Ou=
ch...just got everything put away!=A0 That serves me right for once=20
trying to keep a clean office.=A0 Lesson learned.=A0=20
Thx!!</font></span></div>
<div dir=3D"ltr" align=3D"left"><span><font size=3D"2" color=3D"#0000ff"></=
font></span>=A0</div>
<div dir=3D"ltr" align=3D"left"><span><font size=3D"2" color=3D"#0000ff">Ok=
...re-ran with following code:</font></span></div>
<div dir=3D"ltr" align=3D"left"><span><font size=3D"2" color=3D"#0000ff"><d=
iv class=3D"im">dBUG&gt; di 20000<br>00020000:=20
2C80=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
MOVE.L=A0=A0=A0 D0,(A6)<br>00020002:=20
0002=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
DC.W=A0=A0=A0=A0=A0 0x0002<br>00020004:=20
0000=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
DC.W=A0=A0=A0=A0=A0 0x0000<br>00020006:=20
0000=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
DC.W=A0=A0=A0=A0=A0 0x0000<br></div>00020008: 207C 0002=20
0000=A0=A0=A0=A0=A0=A0 MOVEA.L=A0=A0=20
#0x00020000,A0<br>0002000E:=20
4E71=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
NOP<br>00020010:=20
4E71=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
NOP<br>00020012: FBD0=20
0003=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
WDEBUG=A0=A0=A0 (A0)<div class=3D"im"><br>00020016:=20
4E71=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
NOP<br>00020018:=20
4E71=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
NOP<br></div>0002001A: 227C 1000 0248=A0=A0=A0=A0=A0=A0=20
MOVEA.L=A0=A0 #0x10000248,A1<br>00020020:=20
2211=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
MOVE.L=A0=A0=A0 (A1),D1<div class=3D"im"><br>00020022:=20
4E71=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
NOP<br>00020024:=20
4E71=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
NOP<br></div>00020026:=20
4E4F=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
TRAP=A0=A0=A0=A0=A0 #0x0F<br>00020028:=20
37FE=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
DC.W=A0=A0=A0=A0=A0 0x37FE<br>dBUG&gt; rm pc 20008<br>dBUG&gt;=20
go<br>dBUG&gt; rd<br>PC: 00020028 SR: 2004 [t.Sm.000...xnZvc]<br>An: 000200=
00=20
10000248 00000000 00000000 00000000 00000000 00000000 03FFFFF8<br>Dn: 00000=
000=20
00000000 00000000 00000000 00000000 00000000 00000000=20
00000000<br>dBUG&gt;</font></span></div>
<div dir=3D"ltr" align=3D"left"><span><font size=3D"2" color=3D"#0000ff"></=
font></span>=A0</div>
<div dir=3D"ltr" align=3D"left"><span><font size=3D"2" color=3D"#0000ff">Re=
gister D1 is zero so bit 8 is not setting.</font></span></div>
<div dir=3D"ltr" align=3D"left"><span><font size=3D"2" color=3D"#0000ff">An=
ything else for me to try?</font></span></div><div class=3D"im">
<div dir=3D"ltr" align=3D"left"><span><font size=3D"2" color=3D"#0000ff">Re=
gards, </font></span></div>
<div dir=3D"ltr" align=3D"left"><span><font size=3D"2" color=3D"#0000ff">Da=
vid </font></span></div>
<div><font size=3D"2" color=3D"#0000ff"></font>=A0</div>
<div align=3D"left"><font size=3D"2">David E Seymour</font><font size=3D"2"=
></font></div>
<div align=3D"left">
<p><u><font size=3D"2" color=3D"#0000ff"><a href=3D"http://www.freescale.co=
m/coldfire" target=3D"_blank">http://www.freescale.com/coldfire</a></font><=
/u><font size=3D"2"></font></p></div>
<div><font size=3D"2" color=3D"#0000ff"></font>=A0</div><br>
</div><div dir=3D"ltr" align=3D"left" lang=3D"en-us">
<hr>
<font size=3D"2" face=3D"Tahoma"><div class=3D"im"><b>From:</b> <a href=3D"=
mailto:[email protected]" target=3D"_blank">coldfire-bounce@wild=
rice.com</a>=20
[mailto:<a href=3D"mailto:[email protected]" target=3D"_blank">c=
[email protected]</a>] <b>On Behalf Of </b>nop=20
head<br></div><b>Sent:</b> Tuesday, April 07, 2009 4:11 PM<br><b>To:</b> Se=
ymour=20
David-RA2693<br><b>Subject:</b> Re: [ColdFire] wdebug instruction causes XL=
B=20
slave error acknowledge interrupt on MCF547X.<br></font><br></div><div><div=
></div><div class=3D"h5">
<div></div>Hi David,<br>=A0 Yes I think it kills my PSTCLK, but why does it=
=20
generate an XLB interrupt? Can you look at the XLB registers as see if the=
=20
status register has bit 8 set.<br><br>Chris<br><br>
<div class=3D"gmail_quote">2009/4/7 Seymour David-RA2693 <span dir=3D"ltr">=
&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">David.=
[email protected]</a>&gt;</span><br>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
  <div>
  <div dir=3D"ltr" align=3D"left"><span><font size=3D"2" color=3D"#0000ff">=
Hi=20
  Chris,</font></span></div>
  <div dir=3D"ltr" align=3D"left"><span><font size=3D"2" color=3D"#0000ff">=
I did a simple test=20
  using the M5474EVB Lite board running dBUG ROM monitor:</font></span></di=
v>
  <div dir=3D"ltr" align=3D"left"><span><font size=3D"2" color=3D"#0000ff">=
dBUG&gt; di=20
  20000<br>00020000:=20
  2C80=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
  MOVE.L=A0=A0=A0 D0,(A6)<br>00020002:=20
  0002=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
  DC.W=A0=A0=A0=A0=A0 0x0002<br>00020004:=20
  0000=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
  DC.W=A0=A0=A0=A0=A0 0x0000<br>00020006:=20
  0000=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
  DC.W=A0=A0=A0=A0=A0 0x0000<br>00020008: 267C 0002=20
  0000=A0=A0=A0=A0=A0=A0 MOVEA.L=A0=A0=20
  #0x00020000,A3<br>0002000E:=20
  4E71=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
  NOP<br>00020010: FBD3=20
  4E71=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
  WDEBUG=A0=A0=A0 (A3)<br>00020014:=20
  4E71=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
  NOP<br>00020016:=20
  4E71=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
  NOP<br>00020018:=20
  4E71=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
  NOP<br>0002001A:=20
  4E71=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
  NOP<br>0002001C:=20
  4E71=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
  NOP<br>0002001E:=20
  4E4F=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
  TRAP=A0=A0=A0=A0=A0 #0x0F<br>00020020:=20
  4E71=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
  NOP<br>00020022:=20
  4E71=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
  NOP<br>00020024:=20
  4E71=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
  NOP</font></span></div>
  <div dir=3D"ltr" align=3D"left"><span><font size=3D"2" color=3D"#0000ff">=
</font></span>=A0</div>
  <div dir=3D"ltr" align=3D"left"><span><font size=3D"2" color=3D"#0000ff">=
I set the PC to=20
  0x20008 and issued &quot;go&quot; command.</font></span></div>
  <div dir=3D"ltr" align=3D"left"><span><font size=3D"2" color=3D"#0000ff">=
Watching PSTCLK with=20
  oscope, it is running be default.=A0 After executing the above code, it i=
s=20
  low.</font></span></div>
  <div dir=3D"ltr" align=3D"left"><span><font size=3D"2" color=3D"#0000ff">=
So I&#39;m seeing it work=20
  OK.</font></span></div>
  <div dir=3D"ltr" align=3D"left"><span><font size=3D"2" color=3D"#0000ff">=
Regards,=20
  </font></span></div>
  <div dir=3D"ltr" align=3D"left"><span><font size=3D"2" color=3D"#0000ff">=
David=20
  </font></span></div>
  <div>=A0</div>
  <div align=3D"left"><font size=3D"2">David E Seymour</font><font size=3D"=
2"></font></div>
  <div align=3D"left">
  <p><u><font size=3D"2" color=3D"#0000ff"><a href=3D"http://www.freescale.=
com/coldfire" target=3D"_blank">http://www.freescale.com/coldfire</a></font=
></u><font size=3D"2"></font></p></div>
  <div>=A0</div><br>
  <div dir=3D"ltr" align=3D"left" lang=3D"en-us">
  <hr>
  <font size=3D"2" face=3D"Tahoma"><b>From:</b> <a href=3D"mailto:coldfire-=
[email protected]" target=3D"_blank">[email protected]</a> [ma=
ilto:<a href=3D"mailto:[email protected]" target=3D"_blank">cold=
[email protected]</a>] <b>On Behalf Of </b>nop=20
  head<br><b>Sent:</b> Tuesday, April 07, 2009 9:27 AM<br><b>To:</b> Seymou=
r=20
  David-RA2693<br><b>Subject:</b> [ColdFire] wdebug instruction causes XLB =
slave=20
  error acknowledge interrupt on MCF547X.<br></font><br></div>
  <div>
  <div></div>
  <div>
  <div></div>I want to disable the PST signals, when not debugging, to redu=
ce RF=20
  emissions. I used the following code successfully in an MCF537X project, =
but=20
  when I use it on a V4 processor I get an interrupt from the XLB=20
  arbiter.<br><br>csr_data=A0=A0=A0=A0=A0=A0=20
  dc.w=A0=A0=A0 0010110010000000b=A0=A0=A0=A0=A0=A0=20
  ;CSR<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
  dc.w=A0=A0=A0=20
  2,0,0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
  ;PCD<br>...<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
  lea=A0=A0=A0=A0=20
  csr_data,a0<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
  dc.w=A0=A0=A0 1111101111010000b=A0=A0=A0=A0 ;wdebug.l=20
  a0<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20
  dc.w=A0=A0=A0 0000000000000011b<br><br>My assembler doesn&#39;t support=
=20
  wdebug, hence the hand coded dc.w stuff. All the code does is set the PCD=
 bit=20
  in the BDM CSR register.<br><br>The fault address is csr_data + 4, i..e. =
half=20
  way through the data. The fault is a slave error acknowledge. The data is=
=20
  correctly aligned on a four byte boundary and is certainly accessible by=
=20
  normal instructions.<br><br>Anybody know what is going on here?<br><br>TI=
A,=20
  Chris<br><br></div></div><a href=3D"mailto:[email protected]" target=
=3D"_blank">[email protected]</a> Send a post to the list. <a href=3D"m=
ailto:[email protected]" target=3D"_blank">coldfire-join@wildrice.=
com</a> Join the list. <a href=3D"mailto:[email protected]" targ=
et=3D"_blank">[email protected]</a> Join the list in digest mode=
.=20
  <a href=3D"mailto:[email protected]" target=3D"_blank">coldfire=
[email protected]</a> Leave the list.</div><a href=3D"mailto:coldfire@wil=
drice.com" target=3D"_blank">[email protected]</a>=20
  Send a post to the list. <a href=3D"mailto:[email protected]" ta=
rget=3D"_blank">[email protected]</a> Join the list. <a href=3D"ma=
ilto:[email protected]" target=3D"_blank">coldfire-digest@wildri=
ce.com</a> Join the list in digest mode.=20
  <a href=3D"mailto:[email protected]" target=3D"_blank">coldfire=
[email protected]</a> Leave the=20
list.</blockquote></div><br><a href=3D"mailto:[email protected]" target=
=3D"_blank">[email protected]</a> Send a post to the list.=20
<a href=3D"mailto:[email protected]" target=3D"_blank">coldfire-jo=
[email protected]</a> Join the list. <a href=3D"mailto:coldfire-digest@wildri=
ce.com" target=3D"_blank">[email protected]</a> Join the=20
list in digest mode. <a href=3D"mailto:[email protected]" target=
=3D"_blank">[email protected]</a> Leave the list.</div></div></di=
v><div><div></div><div class=3D"h5">

<a href=3D"mailto:[email protected]" target=3D"_blank">coldfire@wildric=
e.com</a>	Send a post to the list.
<a href=3D"mailto:[email protected]" target=3D"_blank">coldfire-jo=
[email protected]</a>	Join the list.
<a href=3D"mailto:[email protected]" target=3D"_blank">coldfire-=
[email protected]</a>	Join the list in digest mode.
<a href=3D"mailto:[email protected]" target=3D"_blank">coldfire-l=
[email protected]</a>	Leave the list.</div></div></blockquote></div><br>

[email protected]=09Send a post to the list.
[email protected]=09Join the list.
[email protected]=09Join the list in digest mode.
[email protected]=09Leave the list.
--000e0cd248e6b8e2500466fe7342--