[Answered] New NUCLEO-F302R8 variant; question about SS1/SS2/SS3

The official STMicroelectronics Arduino core
Post Reply
knielsen
Posts: 7
Joined: Sat Nov 04, 2017 10:10 am

[Answered] New NUCLEO-F302R8 variant; question about SS1/SS2/SS3

Post by knielsen » Sat Nov 04, 2017 10:39 am

I had a go at introducing a NUCLEO-F302R8 variant, following https://github.com/stm32duino/wiki/wiki ... nt-(board) :

https://github.com/knielsen/Arduino_Cor ... leo-f302r8

It is partly based on NUCLEO-F303RE, which is quite similar. The NUCLEO-F302R8 devboard PCB is identical, just with a few solder bridges remapping pins D11-D13. The STM32F302x8 seems also quite similar to STM32F3xE, just with less ram/flash/peripherals.

One thing I was not sure about is the SS1/SS2/SS3 #defines in variant.h:

Code: Select all

  #define SS1                     4
  #define SS2                     7
  #define SS3                     8
What is the meaning of these? These are copied from NUCLEO-F303RE, but I do not understand their meaning even there...

Are they supposed to be hardware slave-select pins for SPI1/SPI2/SPI3? The STM32F302R8 has no SPI1 (only SPI2/SPI3), so should SS1 be left undefined?

(If someone wants to test this on a NUCLEO-F302R8 I will be happy to help with / fix any issues; just be warned that I have not tested much myself yet.)

- Kristian.

fpiSTM
Posts: 271
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France

Re: New NUCLEO-F302R8 variant; question about SS1/SS2/SS3

Post by fpiSTM » Sat Nov 04, 2017 8:11 pm

Those defines are for convenience. For software SPI select.
I thought it was defined for convenience and some libraries compatibility with some arduino shields (some uses the D10 while some other use D4...)
They are not linked to an SPI instance number (SPIx).
I saw you've made a fix when SPI1 is not defined.
Do not hesitate to make a PR for your variant.

knielsen
Posts: 7
Joined: Sat Nov 04, 2017 10:10 am

Re: New NUCLEO-F302R8 variant; question about SS1/SS2/SS3

Post by knielsen » Sat Nov 04, 2017 9:35 pm

Ok, thanks for the answer! So it makes sense to just leave those SSn defines as is.

I got some tests done on a board, it seems to work (blink, serial, ...). I will send a pull-request soon.

- Kristian.

Post Reply