Reply
Posts: 23
Registered: ‎06-02-2014

Swapping SMBus pins on a 8051F338 device

[ Edited ]

Currently using P0Skip and the crossbar, I can set the SMBus on P0.4 (SDA) and P0.5(SCL), but the hardware layout has the SDA and SCL pins swopped, i have read conflicting answers about if the SMBus pins can be swapped around?

Posts: 3,033
Registered: ‎02-07-2002

Re: Swapping SMBus pins on a 8051F338 device

Forget it. You have some patching to do.

Posts: 167
Registered: ‎07-12-2016

Re: Swapping SMBus pins on a 8051F338 device

hi @petewaddy,

 

Can you please show me the webpage of the conflicting answers ?
The pin assignments are determined by the priority of the enabled peripherals. And the priority of SDA is higer than the SCL, for my understanding, there is no way to swap the SDA/SCL pins.

 

Thanks

Posts: 2,220
Registered: ‎10-14-2014

Re: Swapping SMBus pins on a 8051F338 device

Some of 8-bit device support SDA/SCL swap for SMBUS, for example EFM8LB1, if you read the reference manual (EFM8LB1) you could get a bitfield named SWAP that was used to control this swap feature. But for F338, I think it don't support this feature.

WeiguoLu
<a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Hero</font></font> </a> jmg
Posts: 1,167
Registered: ‎04-27-2004

Re: Swapping SMBus pins on a 8051F338 device


.... but the hardware layout has the SDA and SCL pins swopped, i have read conflicting answers about if the SMBus pins can be swapped around?

What does the data sheet for your device say ?

Some SiLabs parts (this from EFM8BB3) say this

"SMBus Pin Swap
The SMBus peripheral is assigned to pins using the priority crossbar decoder. By default, the SMBus signals are assigned to port pins starting with SDA on the lower-numbered pin, and SCL on the next available pin. The SWAP bit in the SMBus Timing Control register can be set to 1 to reverse the order in which the SMBus signals are assigned."

 

If your data does not, then there is your answer.

That said, if this is just a simple i2c master use, then you can of course, create a Software i2c that swaps the pins (or uses any pins you like).

 

Posts: 8,110
Registered: ‎08-13-2003

Re: Swapping SMBus pins on a 8051F338 device

I can set the SMBus on P0.4 (SDA) and P0.5(SCL), but the hardware layout has the SDA and SCL pins swopped, i have read conflicting answers about if the SMBus pins can be swapped around?

 

on the 8051fxxx devices they can not

 

I continuously get amazed to see how many do not digest the datasheet before designing the hardware

erik