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 when the Flexbus is in 16 bit mode ? Is it still driven when an odd memory access is attempted ? In Section 220.127.116.11 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.