按库函数的那三句话编译出来的
904: FLASH->ACR |= FLASH_ACR_PRFTBE;
905:
906: /* Flash 2 wait state */
0x08001370 4A4A LDR r2,[pc,#296] ; @0x0800149C
0x08001372 6812 LDR r2,[r2,#0x00]
0x08001374 F0420210 ORR r2,r2,#0x10
0x08001378 4B48 LDR r3,[pc,#288] ; @0x0800149C
0x0800137A 601A STR r2,[r3,#0x00]
907: FLASH->ACR &= (uint32_t)((uint32_t)~FLASH_ACR_LATENCY);
0x0800137C 461A MOV r2,r3
0x0800137E 6812 LDR r2,[r2,#0x00]
0x08001380 F0220203 BIC r2,r2,#0x03
0x08001384 601A STR r2,[r3,#0x00]
908: FLASH->ACR |= (uint32_t)FLASH_ACR_LATENCY_2;
909:
910: /* HCLK = SYSCLK */
0x08001386 461A MOV r2,r3
0x08001388 6812 LDR r2,[r2,#0x00]
0x0800138A F0420202 ORR r2,r2,#0x02
0x0800138E 601A STR r2,[r3,#0x00]
/*------------------------------------------------------------------------------*/
我自己写的编译出来:
903: FLASH->ACR= (uint32_t)(FLASH_ACR_PRFTBE|FLASH_ACR_LATENCY_2);
904:
905: /* HCLK = SYSCLK */
0x08001370 2212 MOVS r2,#0x12
0x08001372 4B43 LDR r3,[pc,#268] ; @0x08001480
0x08001374 601A STR r2,[r3,#0x00]
/*----------------------------------------------------------------------------------*/
我自己写的编译出来似乎。。。。不过我自己写的就没有HardFault。库函数就HardFault了啊 |