-
Notifications
You must be signed in to change notification settings - Fork 1k
NUCLEO-F302R8 variant support #145
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
Conversation
Signed-off-by: Kristian Nielsen <[email protected]>
Signed-off-by: Kristian Nielsen <[email protected]>
Hi @knielsen, Thanks for the PR. To sum up:
I've tested SPI (TFT with SD), I2C (eeproom and teperature sensors), tone, servo and Firmata --> ok |
- Correct f_cpu in boards.txt - Enable some TIM17 pins. - Revert back to HSI for clock (NUCLEO_F302R8 has no external HSE source by default). Signed-off-by: Kristian Nielsen <[email protected]>
3c8bce5
to
e8eae90
Compare
Thanks for looking at the patch and finding the problems you pointed out!
That seems wrong? There is no external HSE crystal mounted on the NUCLEO-F302R8 board. From "HSE oscillator on-board from X3 crystal (not provided)" Reading closer, there are two versions of the board (MB1136 C-01 / MB1136 And this will not work on the version C-01 board without ST-LINK MCO input, That's why I decided to use the HSI originally. Do you agree, or did I miss
Good catch! Unfortunately, it is still incorrect, it should be 72 MHz, not -Nucleo_64.menu.pnum.NUCLEO_F302R8.build.f_cpu=8000000L Incidentally, I noticed the same wrong 8 MHz value for NUCLEO_F303RE (should
Ouch, I surely meant to put 16 KByte RAM in there, no idea how it ended up
Right, I wasn't sure about the uart emulation. The STM32F302R8 has 3 Should I also remove the #define TIMER_UART_EMULATED TIM17 ? And I'll enable some TIM17 pins in PeripheralPins.c. I notived that
Oh, I see, I totally missed that, thanks for fixing.
Ok. I have pushed an updated branch to the pull request, with the Let me know what you think,
|
Nice shot too ;) |
I've updated my branch with your update. |
Agree. Interesting that the STM32F302R8 isn't able to run at the full 72 MHz from the HSI.
Thanks, looks good now I think! |
Corrected. |
Merged thanks #147 |
This pull request implements support for NUCLEO-F302R8.
The NUCLEO-F302R8 is similar to NUCLEO-F303RE, however a few pins are swapped, and the MCU has less flash/ram and peripherals.
The support was created following https://github.com/stm32duino/wiki/wiki/Add-a-new-variant-(board)
The PeripheralPins.c was generated from stm32cube files. The other files were edited from F303RE. Things were checked against board user manual and MCU datasheet.
Apart from boards.txt and variants/NUCLEO_F302R8/, there is a small fix in spi_com.c to support STM32's without SPI1 (the STM32F302R8 has only SPI2 and SPI3).