#define DEBUG_FLASH_BUFF_SIZE 128
void PrintFlashData(uint32_t Addr)
{
unsigned int nFlashBuff[DEBUG_FLASH_BUFF_SIZE];
unsigned int n;
for(n=0;n!=DEBUG_FLASH_BUFF_SIZE;n++)
{
nFlashBuff[n++]=*((uint16_t *)(Addr));
Addr+=2;
}
for(n=0;n!=DEBUG_FLASH_BUFF_SIZE;n++)
{
while(!(USART2->ISR&USART_ISR_TC));
USART2->TDR = ( (unsigned char *)&nFlashBuff[n] )[0];
while(!(USART2->ISR&USART_ISR_TC));
USART2->TDR = ( (unsigned char *)&nFlashBuff[n] )[1];
while(!(USART2->ISR&USART_ISR_TC));
}
}
mian函数就直接
PrintFlashData(0x1FFFF7E8);
拿了2张板.结果是:0x1FFFF7E8+0x20+0x04=1FFFF80C
看图
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>