| Electronic Components Datasheet Search |
|
SH7262 Datasheet(PDF) 35 Page - Renesas Technology Corp |
|
|
|||||||||||||||||||||||||||||
SH7262 Datasheet(HTML) 35 Page - Renesas Technology Corp |
|
35 / 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 35 of 45 3.17 Sample Program Listing "serial_flash.c" (14/19) 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 /* ---- Enables the SPI transfer ---- */ RSPI0.SPCR.BIT.SPE = 1; /* ---- MOSI (command, address, dummy) ---- */ RSPI0.SPCMD0.BIT.CPOL= 1; /* RSPCK when idling is 1 */ RSPI0.SPCMD0.BIT.CPHA= 0; /* Outputs data on even (rising) edge */ while(ope_sz--){ RSPI0.SPDR.BYTE = *ope++; /* Command size must be equal or less than 8 bytes */ } io_wait_tx_end(); /* Waits for transfer end */ /* ---- MISO (read data) ---- */ RSPI0.SPCMD0.BIT.CPOL= 0; /* RSPCK when idling is 0 */ RSPI0.SPCMD0.BIT.CPHA= 1; /* Latches data on even (falling) edge */ RSPI0.SPBFCR.BYTE = 0xC0u; /* Resets buffer */ RSPI0.SPBFCR.BYTE = 0x00u; RSPI0.SPDCR.BIT.TXDMY = 1; /* Enables to transmit the dummy data */ while(rd_sz--){ while( RSPI0.SPSR.BIT.SPRF == 0){ /* wait */ } *rd++ = RSPI0.SPDR.BYTE; } RSPI0.SPDCR.BIT.TXDMY = 0; /* Disables to transmit the dummy data */ io_wait_tx_end(); /* Waits for transfer end */ /* ---- SPI transfer end (SSL negation) ---- */ RSPI0.SPCR.BIT.SPE = 0; } |
|
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 |