comparison libs/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/I2S/Interrupt/readme.txt @ 0:c59513fd84fb

Initial commit of STM32 test code.
author Daniel O'Connor <darius@dons.net.au>
date Mon, 03 Oct 2011 21:19:15 +1030
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c59513fd84fb
1 /**
2 @page I2S_Interrupt I2S Interrupt example
3
4 @verbatim
5 ******************** (C) COPYRIGHT 2011 STMicroelectronics *******************
6 * @file I2S/Interrupt/readme.txt
7 * @author MCD Application Team
8 * @version V3.5.0
9 * @date 08-April-2011
10 * @brief Description of the I2S Interrupt example.
11 ******************************************************************************
12 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
13 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
14 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
15 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
16 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
17 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18 ******************************************************************************
19 @endverbatim
20
21 @par Example Description
22
23 This example provides a description of how to set a communication between two
24 SPIs in I2S mode using interrupts and performing a transfer from Master to Slave.
25
26 In the first step, I2S3 is configured as master transmitter and I2S2 as slave
27 reliever and both are in Philips standard configuration with 16bit extended to
28 32 bit data packet and 48KHz audio frequency.
29
30 The I2S3 transmit interrupt and the I2S2 receive interrupt are both enabled. And
31 in these interrupts subroutines, the I2S3_Buffer_Tx is transmitted and the received
32 values are loaded in the I2S2_Buffer_Rx buffer. Only the significant 16 MSBs are
33 sent and received, while the 32 packet remaining 16 LSBs are filled with 0 values
34 and don't generate any interrupt.
35
36 Once the transfer is completed a comparison is done and TransferStatus1 gives the
37 data transfer status where it is PASSED if transmitted and received data are the
38 same otherwise it is FAILED.
39
40 In the second step both peripherals are configured in I2S Philips standard 24 bits
41 data length in 32 bits packets and 16KHz audio frequency. The interrupts are
42 enabled and the transfer is performed from the I2S3 master to the I2S2 slave.
43 The 24 bits are transmitted then the 8 remaining LSBs are filled automatically
44 with 0 values.
45
46 Once the transfer is completed a comparison is done (on the 24 MSBs only, the 8
47 LSBs are replaced by 0) and TransferStatus2 gives the data transfer status where
48 it is PASSED if transmitted and received data are the same otherwise it is FAILED.
49
50 @par Directory contents
51
52 - I2S/Interrupt/stm32f10x_conf.h Library Configuration file
53 - I2S/Interrupt/stm32f10x_it.c Interrupt handlers
54 - I2S/Interrupt/stm32f10x_it.h Header for stm32f10x_it.c
55 - I2S/Interrupt/main.c Main program
56 - I2S/Interrupt/system_stm32f10x.c STM32F10x system source file
57
58 @par Hardware and Software environment
59
60 - This example runs on STM32F10x High-Density, XL-Density and Connectivity Line
61 Devices.
62
63 - This example has been tested with STMicroelectronics STM3210E-EVAL (High-Density
64 and XL-Density) and STM3210C-EVAL (Connectivity Line) evaluation boards
65 and can be easily tailored to any other supported device and development board.
66
67 - STM3210C-EVAL Set-up
68 - Connect I2S2 WS (PB.12) pin to I2S3 WS (PA.04) pin
69 - Connect I2S2 CK (PB.13) pin to I2S3 CK (PC.10) pin
70 - Connect I2S2 SD (PB.15) pin to I2S3 SD (PC.12) pin
71
72 - STM3210E-EVAL Set-up
73 - Connect I2S2 WS (PB.12) pin to I2S3 WS (PA.15) pin
74 - Connect I2S2 CK (PB.13) pin to I2S3 CK (PB.03) pin
75 - Connect I2S2 SD (PB.15) pin to I2S3 SD (PB.05) pin
76
77 Since some SPI3/I2S3 pins are shared with JTAG pins (SPI3_NSS/I2S3_WS with JTDI
78 and SPI3_SCK/I2S3_CK with JTDO), they are not controlled by the I/O controller
79 and are reserved for JTAG usage (after each Reset).
80 For this purpose prior to configure the SPI3/I2S3 pins:
81 - For STM32F10x High-Density devices, the user has to disable the JTAG and use
82 the SWD interface (when debugging the application), or disable both JTAG/SWD
83 interfaces (for standalone application).
84 - For STM32F10x Connectivity Line devices, the user can use the solution above
85 (SWD or disable both JTAG and SWD), or it is possible to remap the SPI3 pins
86 on {PC10, PC11, PC12, PA4} GPIO pins in order to avoid the conflict with JTAG
87 pins (and it is possible in this case to use JTAG interface). This remap is
88 used for STM3210C-EVAL evaluation boards in this example.
89
90 @par How to use it ?
91
92 In order to make the program work, you must do the following :
93 - Copy all source files from this example folder to the template folder under
94 Project\STM32F10x_StdPeriph_Template
95 - Open your preferred toolchain
96 - Rebuild all files and load your image into target memory
97 - Run the example
98
99 @note
100 - Low-density Value line devices are STM32F100xx microcontrollers where the
101 Flash memory density ranges between 16 and 32 Kbytes.
102 - Low-density devices are STM32F101xx, STM32F102xx and STM32F103xx
103 microcontrollers where the Flash memory density ranges between 16 and 32 Kbytes.
104 - Medium-density Value line devices are STM32F100xx microcontrollers where
105 the Flash memory density ranges between 64 and 128 Kbytes.
106 - Medium-density devices are STM32F101xx, STM32F102xx and STM32F103xx
107 microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes.
108 - High-density Value line devices are STM32F100xx microcontrollers where
109 the Flash memory density ranges between 256 and 512 Kbytes.
110 - High-density devices are STM32F101xx and STM32F103xx microcontrollers where
111 the Flash memory density ranges between 256 and 512 Kbytes.
112 - XL-density devices are STM32F101xx and STM32F103xx microcontrollers where
113 the Flash memory density ranges between 512 and 1024 Kbytes.
114 - Connectivity line devices are STM32F105xx and STM32F107xx microcontrollers.
115
116 * <h3><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h3>
117 */