is F407 discovery serial pll correct?

Limited support for STM32F4 Discovery, Nucleo and custom F4 boards
Post Reply
holla2040
Posts: 3
Joined: Mon Nov 21, 2016 6:34 pm

is F407 discovery serial pll correct?

Post by holla2040 » Mon Nov 21, 2016 7:01 pm

Hello,

Has anyone got Serial.println on the stm32f4 discovery without USB to work correctly? I'm having a baud rate problem here. I did find this post, http://www.stm32duino.com/viewtopic.php?f=39&t=1219, which says it works but my results are different.

Here's my setup
sketch
#define LED PD12

void setup() {
Serial.begin(115200);
pinMode(LED, OUTPUT);
}

void loop() {
Serial.println(millis());
delay(1000);
digitalWrite(LED, !digitalRead(LED));
}


I'm running arduino 1.6.12 on ubuntu 16.04

pin PA9 (serial1tx) connected to 3.3V ttl serial-usb dongle rx. I verified my setup with an old arduino nano, that works.

using the stm32f4 discovery board, I see garbage on the terminal screen, but I am getting chars once a secong but wrong baud rate.

I poked around and found this posting
https://my.st.com/public/STe2ecommuniti ... tviews=397

which mentions the f407 discovery board uses a 8MHz clock source not 25MHz. I started looking at stm32arduino code
Arduino/hardware/Arduino_STM32/STM32F4/cores/maple/libmaple/rccF2.c. I think function rcc_clk_init2 sets up the PLL, but I'm not very familiar with the arm at this level.

Can someone point me to which PLL register to investigate? CFGR? PLLCFGR?

Thanks,
Craig

Post Reply