/*
stm32f030 chip test program
m0 discovery最小系统测试程序
不需要头文件和库函数,很小巧实用!
作者: 大秦正声,小电子
日期: 2013.9.28
博客: http://yang96381.blog.163.com
邮箱: yang96381@163.com
*/
#define DELAY_COUNT 0x3fFFFF
#define ledoff *(long*)0x4001100c|=0x2000;
#define ledon *(long*)0x4001100c&=0xdfff;
long i;
void Delay( long int Count)
{
for(; Count!= 0;Count--);
}
int main()
{
*(long*)0x40021014=0xe0014;///*(long*)0x40021018=0x11;
*(long*)0x48000800=0x50000;///*(long*)0x40011000=0x11111111;
*(long*)0x4800080c=0x50000;
*(long*)0x20000ff8=0xaaaa5555;
asm("nop");
*(long*)0x48000818=0xffff;
while (1)
{*(long*)0x48000814=0xffff;
Delay(DELAY_COUNT);
*(long*)0x48000814=0x0;
Delay(DELAY_COUNT);
}
} |