Using HSE as the PLL_CLKSOURCE. Using PLL as the SYS_CLKSOURCE. Using extrenal 8MHz crystal.

Dependencies:   mbed

main.cpp

Committer:
Zero_YI
Date:
2017-11-17
Revision:
0:9096775ac85a

File content as of revision 0:9096775ac85a:

#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);
    }
}