| Electronic Components Datasheet Search |
|
AT91SAM7A2-AI Datasheet(PDF) 87 Page - ATMEL Corporation |
|
|
|||||||||||||||||||||||||||||
AT91SAM7A2-AI Datasheet(HTML) 87 Page - ATMEL Corporation |
|
87 / 369 page ![]() 87 PRELIMINARY AT91SAM7A2 6021A–ATARM–07/04 Configuration Steps • Enable PDC clock by writing the PDC bit in PMC_PMSR of the PMC peripheral • Configuration of PDC_PRA: Address of targeted register TX or RX • Configuration of PDC_CR: Flux direction and element size (8-bit, 16-bit, 32-bit) • Configuration of PDC_MR: Address of a memory space to receive or transmit data • Configuration of PDC_TC: Number of transmissions or receptions to do and start PDC PDC Transfer Example Transmission on SPI Assuming the following: • SPI bits per transfer = 10 on NPCS0 (i.e. BITS[3:0] = 0010b in SPI_CRS0) • Number of 10-bit words to transfer: 15 • Address of buffer in internal RAM for 10-bit words to be transmitted 0x00000100 (first 10-bit word is at address 0x00000100, second 10-bit word is at address 0x00000102, …) • SPI clock is enabled (SPI = 1 in SPI_PMSR) • SPI is enabled (SPIENS = 1 in SPI_SR) PDC channel 7 must be configured as follows: • PDC_PRA7 = 0xFFFB4084 (i.e. address of the SPI_TDR register) • PDC_CR7 = 0x00000003 (i.e. 10-bit words cater in 16-bit words so PDC transfer size is a half-word incrementing the address pointer by 2 after each transfer, transfers are done from memory to peripheral so DIR = 1) • PDC_MPR7 = 0x00000100 (address of buffer) • PDC_TCR7 = 0x0000000F (number of 10-bit words to transfer) As soon as the software writes the number of bytes to transfer in the PDC_TCR7 regis- ter, the PDC starts transmitting the 15 10-bit words. When all the 10-bit words have been transferred to the SPI_TDR register, the TEND bit in the SPI_SR register will be set to a logical 1 informing the software that the transfer is completed. The TEND bit in the SPI_SR register can also generate an interrupt if the corresponding bit is set in the SPI_IMR register. Note: If a module is used in reception and transmission, the reception channel must be configured before the transmission channel. Reception on SPI Assuming the following: • SPI bits per transfer = 8 on NPCS0 (i.e. BITS[3:0] = 0000b in SPI_CRS0) • Number of 8-bit words to transfer: 69 SPI RX: Ch6 Reception SPI_SR REND RDRF TX: Ch7 Transmission SPI_SR TEND TDRE Capture CAPT0 Ch8 Reception CAPT0_SR PDCEND DATACAPT Capture CAPT1 Ch9 Reception CAPT1_SR PDCEND DATACAPT Table 36. PDC Transfer Status (Continued) Peripheral PDC Channel Transfer Direction Associated Peripheral Status Register End of Transfer Bit in Status Register Status Bit for PDC_TCRx Decrement (Trigger) |
|
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 |