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

boards/msb-430: Fix periph config & improve doc #19922

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

maribu
Copy link
Member

@maribu maribu commented Sep 14, 2023

Contribution description

tl;dr: This fixes the periph config of the MSB-430 board and improves the documentation.

The pins P5.2, P5.1, P5.3 configured as SPI pins are only routed to USART1 and not to USART0, but previously USART0 was configured as peripheral backing the bus. This fixes the peripheral configuration by changing it to USART1.

This is quite unfortunate as USART1 is also used to provide the UART interface used for stdio. Hence, one can either use stdio or SPI. A feature conflict between UART and SPI has therefore been added.

Note that while it would be possible to use P3.2, P3.1, P3.3 to provide SPI with USART0, this would not work in practise: P3.1 and P3.3 are connected to the CC1020 transceiver.

Switching to P3.4/P3.5 for UART to provide it using USART 0 would also resolve the resource conflict. However, these pins are not available via any of the header and would require soldering the UART<->USB adapter directly to the pins of the MCU chip on the PCB. It is therefore much more user friendly to keep the UART bus backed by USART1 to use pins P3.6 and P3.7 that are easily accessible via the pin header.

Testing procedure

20230914_14h59m43s_grim

Check in above screenshot of the datasheet that P5.2, P5.1, and P5.3 indeed can only provide SPI via USART 1, as indicated by the names SOMI1 (SOMI = slave out, master in ≈ master in, slave out = MISO; 1 for USART 1), SIMO1, and UCLK1 (UCLK = USART clock, used as SCK in SPI mode or SCL in I2C mode).

Issues/PRs references

None

The pins P5.2, P5.1, P5.3 configured as SPI pins are only routed to
USART1 and not to USART0, but previously USART0 was configured as
peripheral backing the bus. This fixes the peripheral configuration by
changing it to USART1.

This is quite unfortunate as USART1 is also used to provide the UART
interface used for `stdio`. Hence, one can either use `stdio` or SPI.
A feature conflict between UART and SPI has therefore been added.

Note that while it would be possible to use P3.2, P3.1, P3.3 to provide
SPI with USART0, this would not work in practise: P3.1 and P3.3 are
connected to the CC1020 transceiver.

Switching to P3.4/P3.5 for UART to provide it using USART 0 would also
resolve the resource conflict. However, these pins are not available
via any of the header and would require soldering the UART<->USB
adapter directly to the pins of the MCU chip on the PCB. It is therefore
much more user friendly to keep the UART bus backed by USART1 to use
pins P3.6 and P3.7 that are easily accessible via the pin header.
@maribu maribu added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: doc Area: Documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: boards Area: Board ports labels Sep 14, 2023
@github-actions github-actions bot added the Area: Kconfig Area: Kconfig integration label Sep 14, 2023
@riot-ci
Copy link

riot-ci commented Sep 14, 2023

Murdock results

✔️ PASSED

0ae4711 boards/msb-430: Fix periph config & improve doc

Success Failures Total Runtime
311 0 312 02m:27s

Artifacts

@benpicco benpicco requested a review from kaspar030 September 14, 2023 14:02
@maribu
Copy link
Member Author

maribu commented Sep 14, 2023

bors r+

@bors
Copy link
Contributor

bors bot commented Sep 14, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 7336d9c into RIOT-OS:master Sep 14, 2023
28 checks passed
@maribu maribu deleted the boards/msb-430 branch September 15, 2023 10:51
@maribu
Copy link
Member Author

maribu commented Sep 15, 2023

Thx :)

@MrKevinWeiss MrKevinWeiss added this to the Release 2023.10 milestone Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Area: doc Area: Documentation Area: Kconfig Area: Kconfig integration CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants