stm32f0discovery core?

The official STMicroelectronics Arduino core
Post Reply
User avatar
Rick Kimball
Posts: 935
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

stm32f0discovery core?

Post by Rick Kimball » Sun Jun 18, 2017 2:37 pm

I'm thinking about adding a core for the stm32f0 discovery board (MB1034B). I noticed on the other discovery boards, your pin numbering scheme just enumerates the actual pins, ignoring any pin that isn't connected to a GPIO. I was hoping to be able to point people to a document that would explain the pin numbering.

I see two approaches to this:

1.) Ignore the connector pin numbering and order the arduino pin numbers based on the port and pin numbers so GPIOA0 would be 0, GPIOA15 would be 15, GPIOB0 16 .. etc. The advantage to this approach is that you could do mental math to get the pin number without hurting your brain too much.

2.) Use the connector numbers as documented in the board's user manual. In my case the manual is UM1525 starting on page 20. This would involve putting NC entries in my digital_arduino[] array for any non gpio pins. The advantage is someone could look up in the UM1525 to find the pin mapping and I don't have to make a graphic. The disadvantage is that for the P2 connector they are going to have to add 33 to all the numbers in the user manual to get the real D pin number.

The nice thing about the discovery boards is that the silkscreen clearly marks which pins are which. There really isn't any concept of pin number except in the user manual and those addicted to Arduino thinking.

Do you have any thoughts on it one way or the other @fpiSTM?
Last edited by Rick Kimball on Mon Jun 19, 2017 2:13 am, edited 3 times in total.
-rick

User avatar
Rick Kimball
Posts: 935
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: stm32f0discovery core?

Post by Rick Kimball » Sun Jun 18, 2017 5:02 pm

What is your thoughts on the RCC source @fpiSTM?

With this stm32f0 discovery board, the default solder bridge settings provide the MCO from the stlink side of the board. You can use that as a high speed bypass clock and get a very accurate oscillator source. Do you think running at 48MHz using the MCO and PLL as an external clock is the right approach to the default SYSCLK?
-rick

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

Re: stm32f0discovery core?

Post by fpiSTM » Tue Jun 20, 2017 7:01 am

Rick Kimball wrote:
Sun Jun 18, 2017 2:37 pm
Do you have any thoughts on it one way or the other @fpiSTM?
At this time, not really, pin numbering and ordering is opened. It's mainly up to the user to define the Arduino style pin numbering.
For the other DISCO, I add first the Arduino connector then add connectors pins.
Currently, for F746, I've added only Arduino Connectore and the user button. It was an enabler to test the F7 core but there is a lot other pins not available through a connectorbut accessible thanks their piname PYx.
For F407, I've simply followed the connectors and define some Ax as no Arduino uno like connector.

For the RCC, it's quiet the same thing depending of the use case the user wants (accuracy, low power,...). We can provide a default clock config. Actually, when I add a new variant, I use the clock config mainly used by the Cube. Maybe it not the best approach.

Post Reply

Who is online

Users browsing this forum: fpiSTM and 1 guest