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

Pin missing from PeripheralPins.c #4894

Closed
brandonboesch opened this issue Aug 11, 2017 · 5 comments
Closed

Pin missing from PeripheralPins.c #4894

brandonboesch opened this issue Aug 11, 2017 · 5 comments

Comments

@brandonboesch
Copy link

Description

  • Type: Bug
  • Priority: Major

Target
STM32F401 Nucleo

mbed-os sha:
f4864dc Merge pull request #3930 from ARMmbed/release-candidate

Issue
The issue is in regards to PeripheralPins.c for the STM32F401 Nucleo board which can be found at :
targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F401xE/TARGET_NUCLEO_F401RE/PeripheralPins.c

In this file, the pinmap for SPI_SSEL is missing its default arduino header pin that is defined in PinNames.h The image below shows two different pin maps for the device from PeripheralPins.c, SPI_SCLK and SPI_SSEL. Notice how SPI_SCLK has the arduino pin commented on, and that SPI_SSEL does not.

image

Now look at PinNames.h found at: /targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F401xE/TARGET_NUCLEO_F401RE/PinNames.h

You will notice that the default SPI_CS pin is PB_6 (as highlighted in the image below), which is not added to the PinMap in PerphiralPins.c. I have not checked whether other STM Nucleo boards have similar issues as well.
image

@brandonboesch
Copy link
Author

@screamerbg

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 14, 2017

@jeromecoutant
Copy link
Collaborator

Hi
I agree this is misleading...
But I think there is no issue as in MBED, we are using SW NSS management.
So SPI_CS, connected to PB_6/D10, is used as a GPIO out.
The HW part (pins in PinMap_SPI_SSEL) are not really used...

As an example , you can see it in
https://github.com/ARMmbed/ci-test-shield/blob/master/TESTS/API/SPI/SPI.cpp#L54

@LMESTM
Copy link
Contributor

LMESTM commented Aug 16, 2017

@brandonboesch - one more question, are you facing an actual issue ?
Physically on the board the SPI HW NSS is indeed not connected to the PB6/D10 pin, so you actually have 2 possibilities

  1. use SPI_CS as SW GPIO as done most of the time in MBED as explained by @jeromecoutant
    or
  2. use another pin from the list in PinMap_SPI_SSEL table if you want to use SPI HW NSS.

@brandonboesch
Copy link
Author

Thanks for the clarification. Using SPI_CS as SW GPIO will work fine for my purposes. Closing the issue.

brandonboesch pushed a commit to brandonboesch/ci-test-shield that referenced this issue Aug 16, 2017
… CS pinmap, but rather the DigitalIO pinmap, per response of issue that I raised here: ARMmbed/mbed-os#4894
brandonboesch pushed a commit to brandonboesch/ci-test-shield that referenced this issue Aug 16, 2017
… the cs pin in the CS pinmap, but rather the DigitalIO pinmap, per response of issue that I raised here: ARMmbed/mbed-os#4894
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants