Am I misunderstanding I/O multiplexing (or is this a Datasheet error)?

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

I am looking at the Atmel SAM D20E / SAMD 20G / SAM D20J data sheet (Atmel-42129P-SAM-D20_Datasheet_Complete-09/2016), and specifically at Table 7-1 Port Function Multiplexing.

 

I was under the impression that for each SERCOM/PAD it would only be routed to one pin under "function C" (SERCOM) and one pin under "function D" (SERCOMALT).

 

In the table I find two sets of entries for the SERCOM4 PADs (PB08-09-PB10-PB11 and PA12-13-14-15). Similar duplicates exists for e.g. SERCOM3 and SERCOM5.

 

I have a hard time believing such a blatant error would pass through corrective reading before publishing, so what would be the point in "duplicating" the routing in this way, having the in- and out-put of one SERCOM on several sets of pins?

 

EDIT/PS: I confess not having read every word of the data sheet yet. On my way, though...

This topic has a solution.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

Last Edited: Tue. Nov 28, 2017 - 06:53 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You must remember that you select the function of each pin individually, not as a single unit.

So you can configure each SERCOM pin as required.

David (aka frog_jr)

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

Doh! Of-course. blush 

 

This is what happens to me when I take in too muck information in too short a time for my brain to cope with. Assumptions and misconceptions roam freely between my ears.. wink

 

The more general question, for understanding, would be "what parameters are behind how the set of possible "routings" are determined?" Why the duplication of e.g. SERCOM4 routing possibilities? Did the Atmel people have specific options/applications in mind, or is it simply what reasonably could be designed? (Hope you get what I'm asking - I am aware the question might sound weird...)

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

JohanEkdahl wrote:
muck information

laugh

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

JohanEkdahl wrote:
"what parameters are behind how the set of possible "routings" are determined?"

Nope - I never could fathom that.

 

Especially, IIRC, some of the omissions.

angry

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

I found it useful when the pins could be adjusted to accommodate  other needed functions. In one instance, I found it allowed for a bit more "elegant" board layout.

awneil wrote:
Especially, IIRC, some of the omissions.angry
yes

I still tend to find combinations where no twiddling of the pins can get all of the desired functions, so off to a larger package or another device.

David (aka frog_jr)

Last Edited: Tue. Nov 28, 2017 - 05:54 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:

JohanEkdahl wrote:
muck information

laugh

Both fun and serious: I'm not sure what has happened to my typing lately, but I do that more and more. Not hitting the adjacent key but hitting "similar" keys, not only phonetically similar (but that happens too). 'k' instead of 'h', 'c' instead of 's' (in Swedish both are often "sss"-sounding. The weirder one is 'e' instead of 'a' or vice verse - I'm heving problems with my kayboard typing. It's like there is some badly programmed logic in my psyche - a corrupted LUT? Time for a shrink?

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

JohanEkdahl wrote:
I'm heving problems with my kayboard typing.
Is is probably just that you need a new keyboard!wink

David (aka frog_jr)

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

JohanEkdahl wrote:
"what parameters are behind how the set of possible "routings" are determined?"

Back to serious things after this flippant discussion

If it's anything like the SAMD21 you can configure how the pads are used with the bits SERCOMn->CTRLA.TXPO and .RXPO 

I could give you a short example of code (not ASF) for setting up a SERCOM to talk to a GPS module

Jerry

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

jerryr wrote:
If it's anything like the SAMD21

Yes, it is.

you can configure how the pads are used with the bits SERCOMn->CTRLA.TXPO and .RXPO 

Yes, we know that - but you're missing the point.

 

The point is that only a few of all the possible permutations and combinations are actually available - so the question was how (if at all) they decided which ones to put in, and which ones to leave out.

 

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

jerryr wrote:
If it's anything like the SAMD21 you can configure how the pads are used with the bits SERCOMn->CTRLA.TXPO and .RXPO 

Yes, it's very much like the D21. And, yes, I know how to configure the I/O multiplexing. My initial question was a brain fart due to constipation in my synapses. ;-)

 

Thanks for the code offer, but (as noted in some thread here) I have SERCOM USARTs running just fine (like you, no ASF). Rx working both polled and interrupt driven. Will hook in circular buffers and test out interrupt driven Tx eventually, but right now I'm more eager to get the OLED Xplained extension board working. That requires SERCOM SPI (a different beast!), code to control the SSD1306 display controller which is new to me and then some font stuff too.. After that I'd like to go for SERCOM I2C since I have a separate OLED (also SSD1306) that uses I2C.

 

Both of those was what triggered a new inspection/study of the I/O multiplexing table in the data sheet, and somewhere at that point my brain went into overheating. (-:

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

Only a very limited number of pins can do I2C - so that further reduces your options for that case ...

 

Also, some of the pin assignment choices on the XPro board do seem, well - "strange" ...

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

awneil wrote:
Only a very limited number of pins can do I2C - so that further reduces your options for that case

I know. That was part of the reason for me re-visiting and studying the mux table in the sheet.

 

 

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

awneil wrote:

jerryr wrote:

Yes, we know that - but you're missing the point.

 

O dear! You're right. My only excuse is that it was late and the brain was almost in hibernation mode.

It's indeed difficult to choose what pin should do what if you want to use a lot of the available pins. Just keep shuffling until something sensible comes out

It's easier with some of the PIC (should I mention that here?) chips, you can assign a function to any pin

Jerry

 

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

jerryr wrote:
It's indeed difficult to choose what pin should do what if you want to use a lot of the available pins.
 

..and, while I might be guilty of choosing the wrong wordings and words my (follow-up) question was not even about how I should choose among the options available but rather:

 

What made Atmel choose the set of options they did? Are there any very thoughts behind it that I am missing? I assume they didn't just "sprinkle it out randomly", and knowing what thoughts/ideas/insights they had in mind might help me choosing how to multiplex things in a better way.

 

I spent the last hour yesterday doing a spread-sheet which combines most of table 7-1 from the data sheet with the pinouts of the SAM D20 Xplained board. Makes for easy sorting on whatever column you like, so I can easily get a list of what is available on the EXTn headers - ordered by n and pin within that. (I know I saw a similar spreadsheet being posted somewhere here the other day, but couldn't locate it again. Gotta love the search functionality of this site. Not... )-: )

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

JohanEkdahl wrote:
I know I saw a similar spreadsheet being posted somewhere here the other day

https://community.atmel.com/comm...

 

David (aka frog_jr)

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

You're welcome!

 

laugh

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

JohanEkdahl wrote:
Makes for easy sorting on whatever column you like, so I can easily get a list of what is available on the EXTn headers - ordered by n and pin within that

Absolutely.

 

And, as I said in the other post, it's a shame that manufacturers don't provide this information in an easily machine-digestible form - for precisely this kind of thing!

 

angry

 

Copying & pasting from the PDF is a pain, and it seems that it is more of a pain now than previously - as Adobe seem to have messed-up copying from PDF tables.

 

angry

 

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

frog_jr wrote:

JohanEkdahl wrote:
I know I saw a similar spreadsheet being posted somewhere here the other day

https://community.atmel.com/comm...

 

In a thread I started myself! [rolls eyes] Ouch..

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]