boards/msb-430: Fix periph config & improve doc #19922
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 usestdio
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
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