Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

UM0290 Datasheet(PDF) 62 Page - STMicroelectronics

Part # UM0290
Description  This document presents a description
PDF  76 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

UM0290 Datasheet(HTML) 62 Page - STMicroelectronics

Back Button UM0290 Datasheet HTML 58Page - STMicroelectronics UM0290 Datasheet HTML 59Page - STMicroelectronics UM0290 Datasheet HTML 60Page - STMicroelectronics UM0290 Datasheet HTML 61Page - STMicroelectronics UM0290 Datasheet HTML 62Page - STMicroelectronics UM0290 Datasheet HTML 63Page - STMicroelectronics UM0290 Datasheet HTML 64Page - STMicroelectronics UM0290 Datasheet HTML 65Page - STMicroelectronics UM0290 Datasheet HTML 66Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 62 / 76 page
background image
USB voice demos
UM0290
62/76
to configure an isochronous OUT endpoint (see the file usb_prop.c function
STRSpeaker_Reset ()
).
/* Initialize Endpoint 1 */
SetEPType(ENDP1, EP_ISOCHRONOUS);
SetEPDblBuffAddr(ENDP1,ENDP1_BUF0Addr,ENDP1_BUF1Addr);
SetEPDblBuffCount(ENDP1, EP_DBUF_OUT, 22);
ClearDTOG_RX(ENDP1);
ClearDTOG_TX(ENDP1);
ToggleDTOG_TX(ENDP1);
SetEPRxStatus(ENDP1, EP_RX_VALID);
SetEPTxStatus(ENDP1, EP_TX_DIS);
c)
Class Specific Request
This implementation supports only the Mute control. This feature is managed by
the function Mute_command (file usb_prop.c).
d)
Isochronous Data Transfer Management:
As detailed before, the STR7/9 manages the isochronous data transfer using
double buffer mode. So to copy the received data from the PMA to the
Stream_Buffer, we have to manage the swap between the two PMA buffers
(ENDP1_BUF0Addr and ENDP1_BUF1Addr). This swapping access to the PMA
is done according to the buffer usage between the USB IP and the firmware. This
operation is provided by the function EP1_OUT_Callback () (file usb_endp.c).
After the end of the copy process a global variable called IN_Data_Offset is
updated by the number of bytes received and copied in the Stream_Buffer.
e)
Audio Playing Implementation:
To playback the audio samples received from the host, Timer TIM3 is programmed
to generate a 125.5 kHz PWM signal and the TIM0 is programmed to generate an
interrupt at frequency equal to 22 kHz. On each TIM0 interrupt one Audio Stream
is used to update the pulse of the PWM. A global variable (Out_Data_Offset) is
used to point to the next Stream to play in Stream buffer.
Note:
Both “IN_Data_Offset” and “Out_Data_Offset” are initialized to 0 in each Start of frame
interrupt (see file usb_istr.c function SOF_Callback()) to avoid the overflow of the
“Stream_Buffer”.
7.3.3
STR91x USB audio speaker using the DMA
For the STR91x, in order to decrease CPU usage, the Direct Memory Access Controller
(DMAC) can be used to transfer the data from/to the PMA. This section describes the way to
implement all DMA transfer modes in the USB speaker demo.
STR91x USB audio speaker demo using DMA unlinked mode
In this mode the CTR interrupt is not masked or cleared by the DMA. The CPU is interrupted
by both the CTR and DMA terminal count interrupt.
The initial configuration of the DMA is done in the file hw_config.c / .h by the function
DMA_config()
.
The DMA_config() function sets the different values of the DMA_InitStruct structure with
the source and destination addresses and widths, the correct transfer flow controller (USB)



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 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


Datasheet Download

Go To PDF Page


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


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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