Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Connecting big endian device to LPC2210

2006-01-13 by Micron Engineering

Pieter Verstraelen ha scritto:

>>>I don't see any problems with this but it's a tricky thing to do, so
>>>maybe someone out there might have done this?
>>>
>>>
>>>      
>>>
>>Not with ARM but normally I do hardware byte swap with Renesas 16 bit
>>microcontrollers and ethernet MAC chips (that are little endian
>>    
>>
>because
>  
>
>>they interface directly to ISA bus on PCs architectures). Endianess is
>>    
>>
>a
>  
>
>>common problem.
>>    
>>
>
>So, does this hardware byte swap solve all endian problems?  Can you use
>the Ethernet MAC chip without changes to the code?  
>I think 8 and 16 bit access (to a 16 bit device with swapped data lines)
>is not a problem but a 32 bit access (to a 16 bit swapped device) might
>go wrong.
>
>Best regards,
>Pieter Verstraelen
>
>  
>
Suppose to write the DWORD d=0x01020304

A little endian machine interface on 8 bit bus will write lsb first so 
will write on the bus: 0x04, 0x03, 0x02, 0x01
interfacing on a 16 bit bus (without swapping) it will write 0x0403, 0x0201
so swapping MSB and LSB data port will solve the problem.
The little endina advantage is that data will be write always in the 
same order independently from their size.

> 
>Yahoo! Groups Links
>
>
>
> 
>
>
>
>
>  
>


  ----------

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.16/225 - Release Date: 09/01/2006


[Non-text portions of this message have been removed]

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.