
EM358x
Rev. 0.4 5
8.4SPI - Slave Mode .......................................................................................................... 88
8.4.1GPIO Usage ...................................................................................................... 88
8.4.2Set Up and Configuration .................................................................................. 88
8.4.3Operation .......................................................................................................... 89
8.4.4DMA .................................................................................................................. 90
8.4.5Interrupts ........................................................................................................... 90
8.4.6Registers ........................................................................................................... 90
8.5TWI - Two Wire serial Interfaces ................................................................................... 90
8.5.1GPIO Usage ...................................................................................................... 91
8.5.2Set Up and Configuration .................................................................................. 91
8.5.3Constructing Frames ......................................................................................... 91
8.5.4Interrupts ........................................................................................................... 93
8.5.5Registers ........................................................................................................... 94
8.6UART - Universal Asynchronous Receiver / Transmitter .............................................. 97
8.6.1GPIO Usage ...................................................................................................... 97
8.6.2Set Up and Configuration .................................................................................. 97
8.6.3FIFOs ................................................................................................................ 99
8.6.4RTS/CTS Flow control ...................................................................................... 99
8.6.5DMA ................................................................................................................ 100
8.6.6Interrupts ......................................................................................................... 100
8.6.7Registers ......................................................................................................... 102
8.7DMA Channels ............................................................................................................ 106
8.7.1Registers ......................................................................................................... 107
9USB Device ...................................................................................................................... 124
9.1Overview ..................................................................................................................... 124
9.2Host Drivers ................................................................................................................ 124
9.3References ................................................................................................................. 124
9.4GPIO Usage and USB Pin Assignments..................................................................... 124
9.5Application Schematics ............................................................................................... 125
9.6Endpoints .................................................................................................................... 125
9.7Buffers and DMA ........................................................................................................ 126
9.8Set Up and Configuration ............................................................................................ 126
9.9DMA Usage and Transfers ......................................................................................... 128
9.10Enumeration ............................................................................................................. 128
9.11Normal COM Port Operation .................................................................................... 128
9.12Suspend and Resume .............................................................................................. 128
9.13Interrupts .................................................................................................................. 128
9.13.1Registers ......................................................................................................... 129
10General Purpose Timers (TIM1 and TIM2) ..................................................................... 139
10.1Introduction ............................................................................................................... 139
10.2GPIO Usage ............................................................................................................. 140
10.3Timer Functional Description .................................................................................... 141
10.3.1Time-Base Unit ............................................................................................... 141
10.3.2Counter Modes ............................................................................................... 142
10.3.3Clock Selection ............................................................................................... 147
10.3.4Capture/Compare Channels ........................................................................... 150