| Electronic Components Datasheet Search |
|
AN1810 Datasheet(PDF) 6 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1810 Datasheet(HTML) 6 Page - STMicroelectronics |
|
6 / 8 page ![]() 6/8 STR71x BSPI COMMUNICATION WITH M25P10-A SERIAL FLASH 1) Configuration of BSPI1 as a master, 2) Erase M25 SPI flash sector0, 3) Transmission of several bytes from Master to M25 SPI flash, 4) Read data already written to the M25 SPI flash. 4.2.1 Flowchart The flowchart of the application is given below. BEGIN /* Send Read status register instruction */ M25_InstructionSend(M25_RDSR); /* wait until all the sector is erased */ while((M25_DataReceive()&M25_WIP)); /* Initialize STR71x BSPI device */ InitBSPIFlash (); Chip_Select_M25_DISABLE; Chip_Select_M25_ENABLE; Read status register Chip Select pin driven High / Low Send a write enable instruction /* Send a write enable instruction to the memory */ M25_InstructionSend(M25_WREN); Memory sector0 erase /* Erase sector0 from the memory */ M25_SectorErase(M25_Sector0); Initialization { ... /* Send a write enable instruction to the memory */ M25_InstructionSend(M25_WREN); Send a write enable instruction Verify that all the data sent is programmed /* Send Read status register instruction */ M25_InstructionSend(M25_RDSR); /* Wait until all the data sent is programmed */ while((M25_DataReceive()&M25_WIP)); /* Send page program instruction */ M25_InstructionSend(M25_PP); /* wait until all the data is sent */ for (i=0;i<BufferSize;i++) /* Send data to the memory */ M25_DataSend(SendBuffer [i]); Send PP instruction to the flash memory Send data to the flash memory A /*Initialize the STR71x BSPI1 & erase the corresponding sector memory to be used.*/ /* Write data to the memory and wait until all the data is programmed*/ |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |