熱門(mén): 51單片機(jī) | 24小時(shí)必答區(qū) | 單片機(jī)教程 | 單片機(jī)DIY制作 | STM32 | Cortex M3 | 模數(shù)電子 | 電子DIY制作 | 音響/功放 | 拆機(jī)樂(lè)園 | Arduino | 嵌入式OS | 程序設(shè)計(jì)
![]() |
學(xué)習(xí)一下,看x5045能不能借用 |
缺資料收藏了,STM32硬件SPI驅(qū)動(dòng)試試 |
不錯(cuò)不錯(cuò),好東西. |
好東西,贊一個(gè) |
感謝分享!。。。 |
不錯(cuò) 學(xué)習(xí)了 謝謝哦 |
感謝分享。。 |
好,下載測(cè)試![]() |
下載看看 正好在做430與AT45的程序![]() |
謝謝! |
下載了,看看我會(huì)不會(huì)用 |
好資料 學(xué)習(xí)一下 |
hao,henhao |
好東西啊,贊一個(gè) |
AT45DB161D 擦除算法:// 1 Chip = 16 Sectors = 512 Blocks = 4096 Pages // 1 Sector = 32 Blocks = 256 Pages // 1 Block = 8 Pages //------------------------------------------------------------------------------ // Pm ... Pn [Bm ... Bn] [Sm ... Sn] [Bm ... Bn] Pm ... Pn //------------------------------------------------------------------------------ // Caller must make dwAddress in Page boundary // Example : AT45_ErasePages(247*512, 1+1*8+1*256+1*8+1); // void AT45_ErasePages(u32 dwAddress, u32 dwPageCount) { if ( dwPageCount == 0) return; if ( ( dwAddress == 0) && ( dwPageCount >= 4096) ) { AT45_ChipErase(); return; } if ( dwPageCount >= 256 ) { if ( (dwAddress & 0x1FFFF) == 0x00000000 ) // At Sector boundary { while ( dwPageCount >= 256 ) { AT45_SectorErase(dwAddress); dwAddress += 256 * 512; dwPageCount -= 256; } BOOT_AT45_ErasePages(dwAddress, dwPageCount); return; } } if ( dwPageCount >= 8 ) // Erase Blocks until Sector boundary { if ( (dwAddress & 0xFFF) == 0x00000000 ) // At Block boundary { while ( dwPageCount >= 8 ) { if ( (dwAddress & 0x1FFFF) == 0x00000000 ) // At Sector boundary { if ( dwPageCount >= 256 ) { BOOT_AT45_ErasePages(dwAddress, dwPageCount); return; } } AT45_BlockErase(dwAddress); dwAddress += 8 * 512; dwPageCount -= 8; } BOOT_AT45_ErasePages(dwAddress, dwPageCount); return; } } while ( dwPageCount > 0 ) // Erase Pages until Block boundary { if ( (dwAddress & 0xFFF) == 0x00000000 ) // At Block boundary { if ( dwPageCount >= 8 ) { BOOT_AT45_ErasePages(dwAddress, dwPageCount); return; } } AT45_PageErase(dwAddress); dwAddress += 1*512; dwPageCount -= 1; } } |
Powered by 單片機(jī)教程網(wǎng)