RE: wdebug instruction causes XLB slave error acknowledge interrupt on MCF547X.
"Seymour David-RA2693" <[email protected]> Tue, 7 Apr 2009 16:38:58 -0600
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers.coldfire |
|---|---|
| Message-ID | <FE151544B54DB0428FFA9AE99C27A121028D10B9@az33exm22.fsl.freescale.net> |
This is a multi-part message in MIME format. ------_=_NextPart_001_01C9B7D1.A3CC7416 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Chris, Yes MBAR is 0x1000_0000. The nop are my way of viewing the code more easily and should I need to patch another instruction in I have room to do so. But nop insturction does sync the pipeline and ensure writes have completed before moving onto the next instruction so maybe that is helping???? WDEBUG should be a supervisor instruction access. Regards,=20 David=20 =20 David E Seymour http://www.freescale.com/coldfire =20 ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of nop head Sent: Tuesday, April 07, 2009 5:23 PM To: Seymour David-RA2693 Subject: Re: [ColdFire] wdebug instruction causes XLB slave error acknowledge interrupt on MCF547X. 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.=20 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.=20 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!! =20 Ok...re-ran with following code: =09 dBUG> di 20000 00020000: 2C80 MOVE.L D0,(A6) 00020002: 0002 DC.W 0x0002 00020004: 0000 DC.W 0x0000 00020006: 0000 DC.W 0x0000 =09 00020008: 207C 0002 0000 MOVEA.L #0x00020000,A0 0002000E: 4E71 NOP 00020010: 4E71 NOP 00020012: FBD0 0003 WDEBUG (A0)=20 00020016: 4E71 NOP 00020018: 4E71 NOP =09 0002001A: 227C 1000 0248 MOVEA.L #0x10000248,A1 00020020: 2211 MOVE.L (A1),D1=20 00020022: 4E71 NOP 00020024: 4E71 NOP =09 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> =20 Register D1 is zero so bit 8 is not setting. Anything else for me to try? Regards,=20 David=20 =20 David E Seymour http://www.freescale.com/coldfire =20 ________________________________ =09 From: [email protected] [mailto:[email protected]] On Behalf Of nop head =09 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. =09 =09 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. =09 Chris =09 =09 2009/4/7 Seymour David-RA2693 <[email protected]> =09 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 =20 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,=20 David=20 =20 David E Seymour http://www.freescale.com/coldfire =20 ________________________________ 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. =09 =09 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. =09 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 =09 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. =09 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. =09 Anybody know what is going on here? =09 TIA, Chris =09 =09 [email protected] Send a post to the list. [email protected] Join 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] Join 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] Join 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] Join 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] Join the list. [email protected] Join the list in digest mode. [email protected] Leave the list. ------_=_NextPart_001_01C9B7D1.A3CC7416 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Dus-ascii"> <META content=3D"MSHTML 6.00.2900.3492" name=3DGENERATOR></HEAD> <BODY> <DIV dir=3Dltr align=3Dleft><SPAN class=3D301073122-07042009><FONT = color=3D#0000ff=20 size=3D2>Hi Chris,</FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN class=3D301073122-07042009><FONT = color=3D#0000ff=20 size=3D2>Yes MBAR is 0x1000_0000.</FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN class=3D301073122-07042009><FONT = color=3D#0000ff=20 size=3D2>The nop are my way of viewing the code more easily and should I = need to=20 patch another instruction in I have room to do so.</FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN class=3D301073122-07042009><FONT = color=3D#0000ff=20 size=3D2>But nop insturction does sync the pipeline and ensure writes = have=20 completed before moving onto the next instruction so maybe that is=20 helping????</FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN class=3D301073122-07042009><FONT = color=3D#0000ff=20 size=3D2>WDEBUG should be a supervisor instruction = access.</FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN class=3D301073122-07042009><FONT = color=3D#0000ff=20 size=3D2>Regards, </FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN class=3D301073122-07042009><FONT = color=3D#0000ff=20 size=3D2>David </FONT></SPAN></DIV> <DIV> </DIV> <DIV align=3Dleft><FONT size=3D2>David E Seymour</FONT><FONT = size=3D2></DIV> <DIV align=3Dleft> <P><U><FONT color=3D#0000ff size=3D2><A=20 href=3D"http://www.freescale.com/coldfire">http://www.freescale.com/coldf= ire</A></U></FONT><FONT=20 size=3D2></P></FONT></FONT></DIV> <DIV> </DIV><BR> <DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft> <HR tabIndex=3D-1> <FONT face=3DTahoma size=3D2><B>From:</B> [email protected]=20 [mailto:[email protected]] <B>On Behalf Of </B>nop=20 head<BR><B>Sent:</B> Tuesday, April 07, 2009 5:23 PM<BR><B>To:</B> = Seymour=20 David-RA2693<BR><B>Subject:</B> Re: [ColdFire] wdebug instruction causes = XLB=20 slave error acknowledge interrupt on MCF547X.<BR></FONT><BR></DIV> <DIV></DIV>David,<BR><BR>I assume your MBAR was at 0x10000000? Why do = you have=20 NOPs around the wdebug?<BR><BR>I am at home at the moment. I will double = check=20 my findings tomorrow at work. <BR><BR>I had to disable the XLB interrupt = to get=20 past the wdebug and then reset the bit in the status register before = enabling=20 the interrupt again. I can't think what would cause it. My code = and data=20 are in flash, mapped with CS0, read only. MBAR is at 80000000. = <BR><BR>Am I=20 right to assume the WDEBUG read of the data will be in supervisor data = or=20 instruction space? Odd that the address captured by the XLB was half way = through=20 the data.<BR><BR>Chris<BR><BR> <DIV class=3Dgmail_quote>2009/4/7 Seymour David-RA2693 <SPAN = dir=3Dltr><<A=20 href=3D"mailto:[email protected]">[email protected]</= A>></SPAN><BR> <BLOCKQUOTE class=3Dgmail_quote=20 style=3D"PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: = rgb(204,204,204) 1px solid"> <DIV> <DIV dir=3Dltr align=3Dleft><SPAN><FONT color=3D#0000ff = size=3D2>Ouch...just got=20 everything put away! That serves me right for once trying to = keep a=20 clean office. Lesson learned. Thx!!</FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN><FONT color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV dir=3Dltr align=3Dleft><SPAN><FONT color=3D#0000ff = size=3D2>Ok...re-ran with=20 following code:</FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN><FONT color=3D#0000ff size=3D2> <DIV class=3Dim>dBUG> di 20000<BR>00020000:=20 = 2C80 &nb= sp; =20 MOVE.L D0,(A6)<BR>00020002:=20 = 0002 &nb= sp; =20 DC.W 0x0002<BR>00020004:=20 = 0000 &nb= sp; =20 DC.W 0x0000<BR>00020006:=20 = 0000 &nb= sp; =20 DC.W 0x0000<BR></DIV>00020008: 207C 0002 = 0000 MOVEA.L =20 #0x00020000,A0<BR>0002000E:=20 = 4E71 &nb= sp; =20 NOP<BR>00020010:=20 = 4E71 &nb= sp; =20 NOP<BR>00020012: FBD0=20 0003 = WDEBUG (A0) <DIV class=3Dim><BR>00020016:=20 = 4E71 &nb= sp; =20 NOP<BR>00020018:=20 = 4E71 &nb= sp; =20 NOP<BR></DIV>0002001A: 227C 1000 = 0248 =20 MOVEA.L #0x10000248,A1<BR>00020020:=20 = 2211 &nb= sp; =20 MOVE.L (A1),D1 <DIV class=3Dim><BR>00020022:=20 = 4E71 &nb= sp; =20 NOP<BR>00020024:=20 = 4E71 &nb= sp; =20 NOP<BR></DIV>00020026:=20 = 4E4F &nb= sp; =20 TRAP #0x0F<BR>00020028:=20 = 37FE &nb= sp; =20 DC.W 0x37FE<BR>dBUG> rm pc = 20008<BR>dBUG>=20 go<BR>dBUG> rd<BR>PC: 00020028 SR: 2004 [t.Sm.000...xnZvc]<BR>An: = 00020000=20 10000248 00000000 00000000 00000000 00000000 00000000 03FFFFF8<BR>Dn: = 00000000=20 00000000 00000000 00000000 00000000 00000000 00000000=20 00000000<BR>dBUG></FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN><FONT color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV dir=3Dltr align=3Dleft><SPAN><FONT color=3D#0000ff = size=3D2>Register D1 is zero=20 so bit 8 is not setting.</FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN><FONT color=3D#0000ff = size=3D2>Anything else for me=20 to try?</FONT></SPAN></DIV> <DIV class=3Dim> <DIV dir=3Dltr align=3Dleft><SPAN><FONT color=3D#0000ff = size=3D2>Regards,=20 </FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN><FONT color=3D#0000ff size=3D2>David = </FONT></SPAN></DIV> <DIV><FONT color=3D#0000ff size=3D2></FONT> </DIV> <DIV align=3Dleft><FONT size=3D2>David E Seymour</FONT><FONT = size=3D2></FONT></DIV> <DIV align=3Dleft> <P><U><FONT color=3D#0000ff size=3D2><A = href=3D"http://www.freescale.com/coldfire"=20 target=3D_blank>http://www.freescale.com/coldfire</A></FONT></U><FONT=20 size=3D2></FONT></P></DIV> <DIV><FONT color=3D#0000ff size=3D2></FONT> </DIV><BR></DIV> <DIV lang=3Den-us dir=3Dltr align=3Dleft> <HR> <FONT face=3DTahoma size=3D2> <DIV class=3Dim><B>From:</B> <A = href=3D"mailto:[email protected]"=20 target=3D_blank>[email protected]</A> [mailto:<A=20 href=3D"mailto:[email protected]"=20 target=3D_blank>[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>=20 Seymour David-RA2693<BR><B>Subject:</B> Re: [ColdFire] wdebug = instruction=20 causes XLB slave error acknowledge interrupt on = MCF547X.<BR></FONT><BR></DIV> <DIV> <DIV></DIV> <DIV class=3Dh5> <DIV></DIV>Hi David,<BR> 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=3Dgmail_quote>2009/4/7 Seymour David-RA2693 <SPAN = dir=3Dltr><<A=20 href=3D"mailto:[email protected]"=20 target=3D_blank>[email protected]</A>></SPAN><BR> <BLOCKQUOTE class=3Dgmail_quote=20 style=3D"PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: = rgb(204,204,204) 1px solid"> <DIV> <DIV dir=3Dltr align=3Dleft><SPAN><FONT color=3D#0000ff size=3D2>Hi=20 Chris,</FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN><FONT color=3D#0000ff size=3D2>I = did a simple test=20 using the M5474EVB Lite board running dBUG ROM = monitor:</FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN><FONT color=3D#0000ff = size=3D2>dBUG> di=20 20000<BR>00020000:=20 = 2C80 &nb= sp; =20 MOVE.L D0,(A6)<BR>00020002:=20 = 0002 &nb= sp; =20 DC.W 0x0002<BR>00020004:=20 = 0000 &nb= sp; =20 DC.W 0x0000<BR>00020006:=20 = 0000 &nb= sp; =20 DC.W 0x0000<BR>00020008: 267C 0002=20 0000 MOVEA.L =20 #0x00020000,A3<BR>0002000E:=20 = 4E71 &nb= sp; =20 NOP<BR>00020010: FBD3=20 = 4E71 =20 WDEBUG (A3)<BR>00020014:=20 = 4E71 &nb= sp; =20 NOP<BR>00020016:=20 = 4E71 &nb= sp; =20 NOP<BR>00020018:=20 = 4E71 &nb= sp; =20 NOP<BR>0002001A:=20 = 4E71 &nb= sp; =20 NOP<BR>0002001C:=20 = 4E71 &nb= sp; =20 NOP<BR>0002001E:=20 = 4E4F &nb= sp; =20 TRAP #0x0F<BR>00020020:=20 = 4E71 &nb= sp; =20 NOP<BR>00020022:=20 = 4E71 &nb= sp; =20 NOP<BR>00020024:=20 = 4E71 &nb= sp; =20 NOP</FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN><FONT color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV dir=3Dltr align=3Dleft><SPAN><FONT color=3D#0000ff size=3D2>I = set the PC to=20 0x20008 and issued "go" command.</FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN><FONT color=3D#0000ff = size=3D2>Watching PSTCLK=20 with oscope, it is running be default. After executing the = above code,=20 it is low.</FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN><FONT color=3D#0000ff size=3D2>So = I'm seeing it=20 work OK.</FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN><FONT color=3D#0000ff = size=3D2>Regards,=20 </FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN><FONT color=3D#0000ff = size=3D2>David=20 </FONT></SPAN></DIV> <DIV> </DIV> <DIV align=3Dleft><FONT size=3D2>David E Seymour</FONT><FONT=20 size=3D2></FONT></DIV> <DIV align=3Dleft> <P><U><FONT color=3D#0000ff size=3D2><A = href=3D"http://www.freescale.com/coldfire"=20 = target=3D_blank>http://www.freescale.com/coldfire</A></FONT></U><FONT=20 size=3D2></FONT></P></DIV> <DIV> </DIV><BR> <DIV lang=3Den-us dir=3Dltr align=3Dleft> <HR> <FONT face=3DTahoma size=3D2><B>From:</B> <A=20 href=3D"mailto:[email protected]"=20 target=3D_blank>[email protected]</A> [mailto:<A=20 href=3D"mailto:[email protected]"=20 target=3D_blank>[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> = Seymour=20 David-RA2693<BR><B>Subject:</B> [ColdFire] wdebug instruction causes = XLB=20 slave 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 = reduce=20 RF emissions. I used the following code successfully in an MCF537X = project,=20 but when I use it on a V4 processor I get an interrupt from the XLB=20 arbiter.<BR><BR>csr_data =20 dc.w = 0010110010000000b =20 = ;CSR<BR>  = ; =20 dc.w =20 = 2,0,0 &n= bsp; =20 = ;PCD<BR>...<BR> &nbs= p; =20 lea =20 = csr_data,a0<BR> &nbs= p; =20 dc.w 1111101111010000b = ;wdebug.l=20 = a0<BR> &= nbsp; =20 dc.w 0000000000000011b<BR><BR>My assembler doesn't = support=20 wdebug, hence the hand coded dc.w stuff. All the code does is set = the PCD=20 bit in the BDM CSR register.<BR><BR>The fault address is csr_data + = 4, i..e.=20 half way through the data. The fault is a slave error acknowledge. = The data=20 is 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>TIA,=20 Chris<BR><BR></DIV></DIV><A href=3D"mailto:[email protected]"=20 target=3D_blank>[email protected]</A> Send a post to the list. = <A=20 href=3D"mailto:[email protected]"=20 target=3D_blank>[email protected]</A> Join the list. <A=20 href=3D"mailto:[email protected]"=20 target=3D_blank>[email protected]</A> Join the list in = digest mode.=20 <A href=3D"mailto:[email protected]"=20 target=3D_blank>[email protected]</A> Leave the = list.</DIV><A=20 href=3D"mailto:[email protected]" = target=3D_blank>[email protected]</A>=20 Send a post to the list. <A = href=3D"mailto:[email protected]"=20 target=3D_blank>[email protected]</A> Join the list. <A=20 href=3D"mailto:[email protected]"=20 target=3D_blank>[email protected]</A> Join the list in = digest mode.=20 <A href=3D"mailto:[email protected]"=20 target=3D_blank>[email protected]</A> Leave the=20 list.</BLOCKQUOTE></DIV><BR><A href=3D"mailto:[email protected]"=20 target=3D_blank>[email protected]</A> Send a post to the list. <A=20 href=3D"mailto:[email protected]"=20 target=3D_blank>[email protected]</A> Join the list. <A=20 href=3D"mailto:[email protected]"=20 target=3D_blank>[email protected]</A> Join the list in = digest mode.=20 <A href=3D"mailto:[email protected]"=20 target=3D_blank>[email protected]</A> Leave the=20 list.</DIV></DIV></DIV> <DIV> <DIV></DIV> <DIV class=3Dh5><A href=3D"mailto:[email protected]"=20 target=3D_blank>[email protected]</A> Send a post to the list. <A=20 href=3D"mailto:[email protected]"=20 target=3D_blank>[email protected]</A> Join the list. <A=20 href=3D"mailto:[email protected]"=20 target=3D_blank>[email protected]</A> Join the list in = digest mode.=20 <A href=3D"mailto:[email protected]"=20 target=3D_blank>[email protected]</A> Leave the=20 list.</DIV></DIV></BLOCKQUOTE></DIV><BR>[email protected] Send a = post to the=20 list. [email protected] Join the list. = [email protected]=20 Join the list in digest mode. [email protected] Leave the=20 list.</BODY></HTML> [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. ------_=_NextPart_001_01C9B7D1.A3CC7416--