| Electronic Components Datasheet Search |
|
SH7262 Datasheet(PDF) 37 Page - Renesas Technology Corp |
|
|
|||||||||||||||||||||||||||||
SH7262 Datasheet(HTML) 37 Page - Renesas Technology Corp |
|
37 / 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 37 of 45 3.19 Sample Program Listing "serial_flash.c" (16/19) 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 /* ---- 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.SPLW = 3; /* Access width to the SPDR register: 32-bit */ RSPI0.SPCMD0.BIT.SPB = 3; /* Transfer data length: 32-bit */ RSPI0.SPDCR.BIT.TXDMY = 1; /* Enables to transmit the dummy data */ rd_sz >>= 2; /* Calculates the number of transfers in longword */ while( rd_sz-- ){ while( RSPI0.SPSR.BIT.SPRF == 0){ /* wait */ } *rd++ = RSPI0.SPDR.LONG; } RSPI0.SPDCR.BIT.TXDMY = 0; /* Disables to transmit the dummy data */ io_wait_tx_end(); /* Waits for transfer end */ /* ==== Restores the SPI to default setting ==== */ RSPI0.SPCR.BIT.SPE = 0; RSPI0.SPDCR.BIT.SPLW = 1; /* Access width to the SPDR register: 8-bit */ RSPI0.SPCMD0.BIT.SPB = 7; /* Transfer data length: 8-bit */ } #ifdef SF_USE_DMAC |
|
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 |