linfeng zhong
/
HSE_Config
Using HSE as the PLL_CLKSOURCE. Using PLL as the SYS_CLKSOURCE. Using extrenal 8MHz crystal.
Diff: main.cpp
- Revision:
- 0:9096775ac85a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Nov 17 09:19:19 2017 +0000 @@ -0,0 +1,26 @@ +#include "mbed.h" +#include "HSE_Config.h" + +DigitalOut tstPin(PB_8); +DigitalOut tstLED(LED1); +Ticker timer; + +void out_sig() +{ + tstPin = !tstPin; +} + +int main() +{ + uint8_t config_res = HSE_Config(); + + timer.attach_us(&out_sig,50); + printf("Hello World!\r\n"); + while(1) + { + tstLED = !tstLED; + printf("%s\r\n",(config_res?"Success!":"Fail!")); + + wait(1); + } +}