Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

applet.internal.selftest: permit pin mapping to be direct instead of swapped #207

Merged
merged 1 commit into from Oct 3, 2020

Conversation

attie
Copy link
Member

@attie attie commented Sep 23, 2020

Currently, the glasgow run selftest pins-loop test requires that pins are mapped as opposites / swapped (i.e: A0:A7 to B7:B0).
I don't think it's possible to achieve the required mapping with ribbon cables, as each port's data pins would end up on the opposite port's ground pins (in a cable where pin 1 maps to pin 20 on the other end).

As I have direct cables to hand (where pin 1 maps to pin 1 on both ends), I'd like to use this to perform the self test, instead of 8x jumpers.

This patch adds a --pinmap-straight flag that permits the "straight-through" A0:A7 -> B0:B7 mapping, instead of the "straight across the board" mapping that currently stands.

It's not likely to be beneficial for production runs where a test jig is available, but should help those who don't have access to one, and are bringing up / testing a non-trivial number of boards.

@whitequark
Copy link
Member

You can use a ribbon cable crimped with an offset.

@attie
Copy link
Member Author

attie commented Sep 23, 2020

You can use a ribbon cable crimped with an offset.

... that's a very fair point.

I'm not sure how common that'll be as an "off the shelf" part though, and I don't have any parts to hand (or a cable that I'm willing to rework).

@whitequark
Copy link
Member

I've never used off-the-shelf ribbon cables with Glasgow; it's really easy to crimp IDC cables so there's no point.

@FFY00
Copy link
Contributor

FFY00 commented Sep 25, 2020

I second this, I have some off-the-shelf straight through cables and would be great to be able to use them here. Currently I am just using jumpers. I think everybody playing with a glasgow should have jumpers available, so I don't think this matters that much, but IMO it would definitely be a good addition.

@whitequark
Copy link
Member

As I have direct cables to hand (where pin 1 maps to pin 1 on both ends), I'd like to use this to perform the self test, instead of 8x jumpers.

I have to admit that for some reason it did not occur to me (while writing the selftest applet) that you could simply twist the cable. That's clearly much easier for everyone (myself included!) so I think we should just switch the selftest applet to always assume that.

@attie
Copy link
Member Author

attie commented Oct 2, 2020

it did not occur to me that you could simply twist the cable

Ah, yes - I should have been more explicit, sorry.

I think we should just switch the selftest applet to always assume that.

Done! --pinmap-swapped is available if you need the "old" behaviour (i.e: A0:A7 to B7:B0).

@whitequark
Copy link
Member

--pinmap-swapped is available if you need the "old" behaviour (i.e: A0:A7 to B7:B0).

I was suggesting to make the new behavior the only available. Even I don't actually have a selftest cable crimped according to the "old" behavior because... I accidentally crimped it for the "new" behavior but also made it too short to be usable.

@attie
Copy link
Member Author

attie commented Oct 2, 2020

I was suggesting to make the new behavior the only available.

Ah, okay. How's this?

@whitequark whitequark merged commit 1687801 into GlasgowEmbedded:master Oct 3, 2020
@attie attie deleted the selftest-pins-straight branch October 10, 2020 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants