6.选择MDK软件IDE界面Flash—Download,此时已经可以成功下载程序了。
7.修改GPIO_IOToggle工程中的main.c文件中main()函数代码如下:
int main(void)
{
/*!< At this stage the microcontroller clock setting is already configured,
this is done through SystemInit() function which is called from startup
file (startup_stm32f30x.s) before to branch to application main.
To reconfigure the default setting of SystemInit() function, refer to
system_stm32f30x.c file
*/
unsigned int i;
/* To achieve GPIO toggling maximum frequency, the following sequence is mandatory.
You can monitor PE14 and PE15 on the scope to measure the output signal.
If you need to fine tune this frequency, you can add more GPIO set/reset
cycles to minimize more the infinite loop timing.
This code needs to be compiled with high speed optimization option. */
while (1)
{
/* Set PE14 and PE15 */
GPIOE->BSRR = BSRR_VAL;