ATSAMD21 SERCOM I2C inverting SDA SCL

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello, 

I made a custom board using ATSAMD21E18, and made a little mistake for my I2C line:

SDA is on SERCOM1 PAD1 (PA17) and SCL on SERCOM1 PAD0 (PA16)
Is i possible to have SCL on pad0 and SDA on pad1, or they are only working in pad0 for SDA and pad1 for SCL ?

 

Thanks in advance

This topic has a solution.
Last Edited: Sat. Sep 30, 2017 - 09:39 AM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Check "Signal Description" under SERCOM I2C in the datasheet. Looks like the pad to signal mapping is fixed for SERCOM I2C (unlike USART and SPI).

/Lars

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks alot for your quick answer, that is what I feared 
I will change my board layout then

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Looks like the pad to signal mapping is fixed for SERCOM I2C (unlike USART and SPI).

 I'm not sure I understand how the PAD mapping is supposed to be helpful.   Uart TX is always on Pad0,  SPI SCK is always Pad1,  I2C isn't changeable at all...  Grr.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Fixed for I2C yes but USART has TXPO, RXPO and SPI has DIPO, DOPO.

/Lars

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But not all combinations are available.

 

Inevitable, Murphy dictates that the one you really want is the one that's not available!

 

angry

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

but USART has TXPO, RXPO

Like I said: not really.   USART RX can be any pin, but TX *must* be on Pad0 (you get to enable RTS or RTS and CTS, or XCK.  But there are no choices as to where they go.)

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not really, at least from the datasheet I get that USART TX can be on Pad[0] or Pad[2].

/Lars

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

(ah.  I was looking at SAMD51, and assuming that its Sercom was the same as the other SAMD Sercom chips.   Apparently not!  :-(   The SAMD51 seems to allow uart tx only on pad0, while the samd21 allows pad0 or pad2...)