Mixing 8-bit and 16-bit devices on an 8-bit mini-FlexBus (MCF51CN128)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Mixing 8-bit and 16-bit devices on an 8-bit mini-FlexBus (MCF51CN128)

750 Views
armistej
Contributor III

Hi everyone

 

I need to mix both 8 and 16 bit devices on a MCF51CN128 device's Flexbus.  The particular package I have only has a single chip select, so I think I'm forced to use the Flexbus in 16 bit mulitplexed mode, since I still have some 16-bit wide devices I need to talk to.

 

Now if I want to add an 8 bit peripheral chip, and its registers are sequentially arranged on both even and odd address boundaries, what's the best way to deal with that ? Remember, I only have one chip select, not two, so I don't have the luxury of having one Flexbus chip select for 8 bit and the other for 16 bit.  Nice to dream, but .... no dice !

 

Section 11.4.3 of the MCF51CN128 Reference Manual (Rev 6, which I think is the latest) shows a 32-bit longword transfer in multiplexed mode.

 

But what if I'm using a MOVE.B instruction to move a byte of data. Will bytes that are at odd addresses always be output on FB_AD[7:0] and bytes that are at even addresses be output on FB_AD[15:8] ?  The Reference Manual doesn't show a concrete example of what happens, or what happens if I try to access a 16 bit word that is misaligned ?

 

That looks like it's going to make life tricky for my 8-bit peripherals if I have to add extra logic to steer the data bits back and forth to my peripheral chips D[7:0]

 

Any thoughts ?

 

On a related topic, what happens to FB_AD[0] when the Flexbus is in 16 bit mode ?  Is it still driven when an odd memory access is attempted ?  In Section 11.4.1.2 of the Referenec Manual, it says to connect a 16-bit address/16-bit data device to FB_AD[16:1], which makes sense due to it having a 16 bit bus.  But it doesn't explain what FB_AD0 does during the address output period prior to FB_ALE being asserted.

 

Regards,

Jason

Labels (1)
0 Kudos
Reply
1 Reply

397 Views
scifi
Senior Contributor I

 


I need to mix both 8 and 16 bit devices on a MCF51CN128 device's Flexbus.  The particular package I have only has a single chip select, so I think I'm forced to use the Flexbus in 16 bit mulitplexed mode, since I still have some 16-bit wide devices I need to talk to.


It's very likely that the second chip select is still present, simply not pinned out. So you still can configure the mini-flexbus to operate in 8-bit and 16-bit modes in different address ranges. You can generate chip select signals based on address lines. It could be as simple as using the upper address lines as chip selects.

 

 


But what if I'm using a MOVE.B instruction to move a byte of data. Will bytes that are at odd addresses always be output on FB_AD[7:0] and bytes that are at even addresses be output on FB_AD[15:8] ?  The Reference Manual doesn't show a concrete example of what happens, or what happens if I try to access a 16 bit word that is misaligned ?


The manual says this about 16-bit mode: "Up to a 20-bit address (multiplexed) with 16-bit data (write masking of upper/lower bytes not supported)." It could mean that byte writes in this mode are not allowed (lead to CPU exceptions.) Anyway, it doesn't sound very promising.

 

0 Kudos
Reply