Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 2 months ago.
Clock sources and PC14/PC15
Just got a couple of F411RE in replace of my old F401 with pin famed (thanks digitalinout always pushpull at direction change, but this is another story), and sadly saw the only full 16bit port of nucleo is gone(!?!?!), despite the morpho header tells PC14 and PC15 present, in real they are disconnected and used for the 32khz X2. Furthermore i'm reading that the main clock src comes from the MCO of the removable stlink....(!?!?!?) No problem, i can go and finish reading all the pdfs to know why X2 is there for what and how to get back PC14 and PC15, but i would prefer to have known before buy, that's all.
Question relating to:
2 Answers
9 years, 10 months ago.
I know this is digging up old stuff, but what revision is your 411 board? C-01 or C-02? I have an issue where i'm trying to use PC_15 as a DigitalIn and all works well until I init time, from then the pin is allways high. Could you please elaborate any other issues you had with 411 compared to 401 ? Thanks!
Hi, C-02, but i've not used rtc yet, probably your issue is what Peter is referring: set_time() trying to use external osc on PC_15 could leave your digitalin PC_15 in unk state. Not sure, but the first workaround it comes in mind is changing the pin mode after time init, if you are lucky it re-enables the PC_15 as gpio, otherwise it needs a deeper look.
posted by 05 Jan 201510 years, 2 months ago.
PC14 and PC15 are connected to the header. The crystal X2 is only optional. There are small 0 R resistors to switch the signals. SB49 and SB48 are placed - the connection to X2 R34 and R36 are free. You can use the signals.
If you initialize the RTC with set_time() the code try to start the external 32KHz oscillator. This can possible change the status of the pins - ?
Hi, thanks for reply. Maybe some undefine will disable the "try to use X2", but then i'm not sure if the internal LSI is defined correctly for F411, i saw some 40khz instead of 32khz somewhere in the bush of scources, anyway actually i don't need any rtc. I've re-placed the SBxx jumpers to get back PC14 PC15, also got back PD0 disabling HSE from stlink and defaulting to HSI internal 16mhz, the system init sources does try the enalbe the HSE, if fails go with HSI...so all should be ok.......sadly it's not. A compiled binary for 401 works ok in my 411, the same compiled for 411 hangs at system init. Parsed my imprecation list and the issue is in system_stm32f4xx.c
__IO const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
just remove the "IO" and go, otherwise code hangs somewhere at the second clk source try, i mean, there are 3 trys, HSE with clock from 1 pin, HSE with oscilaltor and 2 pins, HSI. If you go directly with the HSI try, no problem, but if you let it try the HSE first, that "IO" makes something bad somewhere. Now, i'm not so expert in c code, i don't know what really changes by adressing that array with IO, should just read the same flash addr but in differ manner?!?!!? Btw i suppose F334 would have same issue.
posted by 25 Sep 2014