在线时间0 小时
UID132413
ST金币0
蝴蝶豆0
注册时间2009-6-2
新手上路
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2009-8-10 09:33:21
|
显示全部楼层
a0a.1 0b0c
RE:有没有谁成功用ULINK下载程序到STM32外挂FLASH?
芯片为K8P3215,FSMC现在的情况是,能读不能写。FSMC配置为:
_WDWORD(0xA0000000, 0x00005059); // FSMC config for test
_WDWORD(0xA0000004, 0x10001008); // FSMC config
_WDWORD(0xA0000104, 0x10001008); // FSMC config
写FLASH的如下:
for (i = 0; i < ((sz+1)/2); i++) {
/* Start Program Command */
M32(base_adr + (0x555)*2) = 0x00AA;
M32(base_adr + (0x2AA)*2) = 0x0055;
M32(base_adr + (0x555)*2) = 0x00A0;
M32(adr) = *((unsigned long *) buf);
if (ToggleAlgo(adr)) return (1); /* Wait until Programming completed */
buf += 2;
adr += 2;
} |
|