请问 就是我想给两个地址写数据 然后就会有一个乱码请问怎么回事
const u8 TEXT_Buffer[]={"STM32 FLASH TEST"};
const u8 TEXT_Buffer1[] = {"helloword"};
#define FLASH_SAVE_ADDR 0X08020000
#define FLASH_SAVE_ADDR1 0X08024000
STMFLASH_Write(0X08004000,(u16*)TEXT_Buffer,sizeof(TEXT_Buffer));
delay_ms(2000);
STMFLASH_Write(0X08006000,(u16*)TEXT_Buffer1,sizeof(TEXT_Buffer1));
delay_ms(2000);
STMFLASH_Read(FLASH_SAVE_ADDR,(u16*)datatemp,sizeof(datatemp));
delay_ms(2000);
STMFLASH_Read(FLASH_SAVE_ADDR1,(u16*)datatemp1,sizeof(datatemp1));
while(1)
{
LED1 =!LED1;
delay_ms(500);
//TEST();
u2_printf("%s
",datatemp);
delay_ms(1000);
u2_printf("%s
",datatemp1);
//delay_ms(1000);
}
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
2993048475
一周热门 更多>