Yahoo Groups archive

68300

Index last updated: 2026-04-29 00:01 UTC

Message

Re: [68300] Use of dual function Port E pin on the 68331

2003-01-08 by Robert Manktelow

Hello Charles
Thanks for the response and, yes, you have fixed it.

If I execute the following code (my Microtec C compiler is o/k wrt long
access, having checked) it runs beyond the bit clear of the RMC pin. The
code fragment below is cut from the Flex BDM debugger I use here.

test##Init_pSOS_Timer_ALTERA#
0641         asm("   bset    #3,$00FFFA15") ;
000049AC 08F9000300FF.. bset      #3,$00FFFA15
0645         asm("   bclr    #3,$00FFFA17") ;
000049B4 08B9000300FF.. bclr      #3,$00FFFA17
0650         asm("   bclr    #3,$00FFFA11") ;
000049CC 08B9000300FF.. bclr      #3,$00FFFA11
0662         PFPAR |= PFPAR_IRQ_5 ;
000049D4 0039002000FF.. ori.b     #$20,$00FFFA1F
667 }
000049DC 4E75           rts

However when the IRQ5 interrupt is unmasked (line before rts) the debugger
locks up and cannot break the target.
The ISR vector for the handler is set correctly at address $74 and the VBR
is unchanged at $0.
But the ISR never executes (breakpoint set but not reached). The SIM's IARB
is set to 7 which is the highest of all the 331 modules and there are no
other external interrupt sources active, although all are enabled. The
Status register is at IRQ mask level 0 and we are running in Supervisor
mode.

If the code is run up to the "ori.b #$20..." line and then the PC is changed
using the debugger to avoid executing this line then again it works. Of
course the interrupts do not happen in this case.

So in summary I have progress, for which I thank you.

Can I, rather cheekily, ask if you have any suggestions to my new conundrum.
I have had this RTOS running with 10mS "pips" generated by interrupts
generated by both the GPT and the PIT timer so I am fairly confident that
the "infrastructure" is correct but without a trace facility it is hard to
locate what is going on.

Robert

----- Original Message -----
From: "Melear Charles-rdph40" <charles.melear@...>
To: <68300@yahoogroups.com>
Sent: Tuesday, January 07, 2003 5:03 PM
Subject: RE: [68300] Use of dual function Port E pin on the 68331


> Robert,
>
> You might want to check how your compiler handles asm(" bset
#3,$00FFFA15").
>
> It might be better to type this   asm (" bset #3,($00fffa15).l ")
>
> The ".l" forces long addressing which some compilers don't do unless
forced to do.  Many compiliers default to ".w" instead of ".l".
>
>
>
> Now, let's say that you held Data Bus 8 high at the release of reset.
This makes port E into bus control signals, including the RMC pin.
>
> By default, the data direction register for Port E will contain $00.
>
> Now, you need to do two things.  1.  Make the bit in the Data Direction
Register for RMC = 1, and change the bit in the Port E pin Assignment
Register for RMC = 0.
>
> Then, I think things will work.
>
> Charlie
>
>
> -----Original Message-----
> From: Robert Manktelow [mailto:robert.manktelow@...]
> Sent: Tuesday, January 07, 2003 4:02 AM
> To: Yahoo 68300 group
> Subject: [68300] Use of dual function Port E pin on the 68331
>
>
> Hello All
> Happy New Year to everybody.
>
> Due to a shortage of bit output pins on our board I have tried using one
of
> the Dual function Port E pins ( either bus control pins or bit port pins)
as
> an bit output with conspicuous lack of success.
> I wonder if this is a problem unique to me or not.
>
> On page D19 of the User Manual the dual use of Port E is described. I have
> used PEPA3 as a bit output (externally pulled high by a resistor) instead
of
> it driving the RMC bus control pin as we do not use this pin in the
design.
> I dropped into assembler as you can see. All is well initialising the port
> as below:
>
> // Set up PORT E, one bit of this controls the pSOS+ Interrupt Clock
Source
> PEPAR = PEPAR_SET ;  // Select the RMC pin only as a port, rest Bus
Control
> // Set the RMC / PE3 pin as a output, rest unchanged
> asm(" bset #3,$00FFFA15") ;
>
> However if I execute the next line the board crashes. It appears as if the
> memory "disappears".
> If I comment out the line below than the code runs on correctly.
>
> // Set PE2 low, this enables the pip IRQ clock source. Pips will be coming
> now.
>     asm(" bclr #3,$00FFFA11") ;
>
> Am I missing something here?
> -
> Robert Manktelow
> Telspec Europe Ltd, Rochester, ME1 3QU
> Phone +44 (0)1634 687 133 extension 2346
>
>
>
> Yahoo! Groups Sponsor
>
> ADVERTISEMENT
>
<http://rd.yahoo.com/M=241773.2725424.4169802.1925585/D=egroupweb/S=17065542
05:HM/A=1394046/R=0/*http://www.hgtv.com/hgtv/pac_ctnt/text/0,,HGTV_3936_580
2,FF.html> HGTV Dream Home Giveaway
>
<http://us.adserver.yahoo.com/l?M=241773.2725424.4169802.1925585/D=egroupmai
l/S=:HM/A=1394046/rand=175932452>
>
> ---------------------------------------------------
> To unsubscribe from this group, send an email to:
> 68300-unsubscribe@yahoogroups.com
>
> To learn more about Motorola Microcontrollers, please visit
> http://www.motorola.com/mcu <http://www.motorola.com/mcu>
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ---------------------------------------------------
> To unsubscribe from this group, send an email to:
> 68300-unsubscribe@yahoogroups.com
>
> To learn more about Motorola Microcontrollers, please visit
> http://www.motorola.com/mcu
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.