Page 1 of 1

Nucleo F072

Posted: Tue Apr 28, 2020 5:07 pm
by Toley
I do not see STM32F072 Nucleo board on the list is it supported ?
I know F072 discovery is there should I use that one instead?

Re: Nucleo F072

Posted: Wed Apr 29, 2020 7:17 am
by fpiSTM
The MCU is supported.
Variant has currently not been added.
Using the F072 could work but It depends of the systemCore clock config, if the Disco uses the HSE by default and the Nucleo doesn't have it, this will not work.

Re: Nucleo F072

Posted: Thu Apr 30, 2020 8:10 am
by Just4Fun
Another thing is the pins mapping for serial I/O.

May be that the F072 Disco and F072 Nucleo use different pin mapping for the USART.

For sure this happens for the F030R8 Disco and the equivalent Nucleo board.
I realized that testing a custom board compatible with the F030R8 Discovery (ARMando), and to use the serial port when compiling as a F030R8 Nucleo required a remapping of the USART pins.

BTW: if the systemCore clock uses the HSE on a board not having any quartz, it should work anyway because the internal clock HSI is switched only if the HSE is ready and running. I've tested this on a F030R8 MCU try to force the use of the HSE in a board with the Quartz not populated.

Re: Nucleo F072

Posted: Thu Apr 30, 2020 9:57 am
by stas2z
Just4Fun wrote: Thu Apr 30, 2020 8:10 am
BTW: if the systemCore clock uses the HSE on a board not having any quartz, it should work anyway because the internal clock HSI is switched only if the HSE is ready and running. I've tested this on a F030R8 MCU try to force the use of the HSE in a board with the Quartz not populated.
But the working frequency can be not fastest or optimal, so proper clock init is recommended, it can be done by creating dummy project with cubemx and copy/paste SystemClock_Config() to the sketch
Also all IP pin definitions can be redefined as it weak, so its not difficult to start work with 072 nucleo without modifying core in case of 072 disco variant exists

Re: Nucleo F072

Posted: Sat May 02, 2020 8:11 pm
by MGeo
It turns out I was looking at a NUCLEO-F072RB variant as well. I want to make use of the USB Full-speed device (crystal-less) feature. The mapping is indeed different than the Disco F072RB board.

Follwing the wiki directions (https://github.com/stm32duino/wiki/wiki ... 28board%29), I put together a variant and have tested successfully on my NUCLEO-F072RB board. I've created a pull request here: https://github.com/stm32duino/Arduino_C ... /pull/1053

The variant in the PR is using the HSI48 oscillator in SystemClock_Config(). This is the same config as the Disco F072RB board, ideal for crystal-less USB when combined with clock recovery system (CRS). It is defined as weak so you can change it in your sketch if you want something different.

Code: Select all

extern "C" void SystemClock_Config(void) {...}

Re: Nucleo F072

Posted: Tue May 26, 2020 11:08 am
by Toley
Added in v1.9 thanks.