cc2530 Flash Write Operation ~
时间:10-02
整理:3721RD
点击:
osal_int_disable( INTS_ALL );
hal_board_init();
vdd_check();
HalDriverInit();
uint8 buf[12];
osal_memset(buf, 0, sizeof(buf));
HalFlashErase(14);
uint8 wbuf[4] = {0x01, 0x02, 0x03, 0x04};
HalFlashWrite(14*2048, wbuf, 1);
HalFlashRead(14, 0, buf ,12);
while (1) {
buf[0] = 0;
}
when i break at buf[0] = 0 and watch the buf, it's content is 0xff 0xff 0xff 0xff, wha's wrong with it ?
HalFlashWrite(14*2048, wbuf, 1);