| Electronic Components Datasheet Search |
|
SH7262 Datasheet(PDF) 20 Page - Renesas Technology Corp |
|
|
|||||||||||||||||||||||||||||
SH7262 Datasheet(HTML) 20 Page - Renesas Technology Corp |
|
20 / 45 page ![]() SH7262/SH7264 Group High-speed Read/Write Serial Flash Memory Using the Renesas Serial Peripheral Interface REJ06B0889-0100/Rev.1.00 June 2009 Page 20 of 45 3.2 Sample Program Listing "main.c" (2/3) 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 #include <stdio.h> #include "serial_flash.h" /* ==== Macro definition ==== */ #define TOP_ADDRESS 0 /* Start address of serial flash memory */ /* ==== Function prototype declaration ==== */ void main(void); /* ==== Variable definition ==== */ #pragma section LARGE_ONCHIP_RAM static unsigned char data[SF_SECTOR_SIZE]; static unsigned long rbuf[SF_SECTOR_SIZE/sizeof(long)]; #pragma section /*""FUNC COMMENT""************************************************************** * ID : * Outline : Accessing serial flash memory main *------------------------------------------------------------------------------ * Include : "serial_flash.h" *------------------------------------------------------------------------------ * Declaration : void main(void); *------------------------------------------------------------------------------ * Description : Erases, programs, and reads serial flash memory. * : After initializing the RSPI channel 0, erases the entire memory * : array, and writes data from the start address. Reads the * : written data to compare to the provided data. *------------------------------------------------------------------------------ * Argument : void *------------------------------------------------------------------------------ * Return Value : void *------------------------------------------------------------------------------ * Note : None *""FUNC COMMENT END""**********************************************************/ void main(void) { int i, j; unsigned char *p; static unsigned long addr; /* ==== Initializes the RSPI ==== */ sf_init_serial_flash(); /* ==== Unprotects serial flash memory ==== */ sf_protect_ctrl( SF_REQ_UNPROTECT ); |
|
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 |