ARM GAS /tmp/ccApM0GN.s page 1 1 .cpu cortex-m0plus 2 .eabi_attribute 20, 1 3 .eabi_attribute 21, 1 4 .eabi_attribute 23, 3 5 .eabi_attribute 24, 1 6 .eabi_attribute 25, 1 7 .eabi_attribute 26, 1 8 .eabi_attribute 30, 1 9 .eabi_attribute 34, 0 10 .eabi_attribute 18, 4 11 .file "stm32l0xx_hal_spi.c" 12 .text 13 .Ltext0: 14 .cfi_sections .debug_frame 15 .section .text.SPI_WaitOnFlagUntilTimeout,"ax",%progbits 16 .align 1 17 .syntax unified 18 .code 16 19 .thumb_func 20 .fpu softvfp 22 SPI_WaitOnFlagUntilTimeout: 23 .LFB77: 24 .file 1 "./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c" 1:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 2:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ****************************************************************************** 3:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @file stm32l0xx_hal_spi.c 4:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @author MCD Application Team 5:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief SPI HAL module driver. 6:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * 7:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * This file provides firmware functions to manage the following 8:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * functionalities of the Serial Peripheral Interface (SPI) peripheral: 9:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * + Initialization and de-initialization functions 10:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * + IO operation functions 11:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * + Peripheral Control functions 12:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * + Peripheral State functions 13:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** @verbatim 14:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ============================================================================== 15:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ##### How to use this driver ##### 16:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ============================================================================== 17:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** [..] 18:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** The SPI HAL driver can be used as follows: 19:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 20:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (#) Declare a SPI_HandleTypeDef handle structure, for example: 21:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_HandleTypeDef hspi; 22:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 23:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (#)Initialize the SPI low level resources by implementing the HAL_SPI_MspInit ()API: 24:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (##) Enable the SPIx interface clock 25:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (##) SPI pins configuration 26:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (+++) Enable the clock for the SPI GPIOs 27:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (+++) Configure these SPI pins as alternate function push-pull 28:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (##) NVIC configuration if you need to use interrupt process 29:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (+++) Configure the SPIx interrupt priority 30:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (+++) Enable the NVIC SPI IRQ handle 31:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (##) DMA Configuration if you need to use DMA process 32:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (+++) Declare a DMA_HandleTypeDef handle structure for the transmit or receive Channe 33:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (+++) Enable the DMAx clock 34:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (+++) Configure the DMA handle parameters ARM GAS /tmp/ccApM0GN.s page 2 35:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (+++) Configure the DMA Tx or Rx Channel 36:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (+++) Associate the initilalized hdma_tx(or _rx) handle to the hspi DMA Tx (or Rx) ha 37:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (+++) Configure the priority and enable the NVIC for the transfer complete interrupt 38:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 39:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (#) Program the Mode, Direction , Data size, Baudrate Prescaler, NSS 40:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** management, Clock polarity and phase, FirstBit and CRC configuration in the hspi Init str 41:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 42:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (#) Initialize the SPI registers by calling the HAL_SPI_Init() API: 43:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) This API configures also the low level Hardware GPIO, CLOCK, CORTEX...etc) 44:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** by calling the customed HAL_SPI_MspInit() API. 45:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** [..] 46:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** Circular mode restriction: 47:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (#) The DMA circular mode cannot be used when the SPI is configured in these modes: 48:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (##) Master 2Lines RxOnly 49:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (##) Master 1Line Rx 50:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (#) The CRC feature is not managed when the DMA circular mode is enabled 51:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (#) When the SPI DMA Pause/Stop features are used, we must use the following APIs 52:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** the HAL_SPI_DMAPause()/ HAL_SPI_DMAStop() only under the SPI callbacks 53:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 54:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** @note 55:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (#) TX/RX processes are HAL_SPI_TransmitReceive(), HAL_SPI_TransmitReceive_IT() and HAL_SPI_Tran 56:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (#) RX processes are HAL_SPI_Receive(), HAL_SPI_Receive_IT() and HAL_SPI_Receive_DMA() 57:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (#) TX processes are HAL_SPI_Transmit(), HAL_SPI_Transmit_IT() and HAL_SPI_Transmit_DMA() 58:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 59:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** @endverbatim 60:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ****************************************************************************** 61:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @attention 62:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * 63:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** *

© COPYRIGHT(c) 2016 STMicroelectronics

64:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * 65:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * Redistribution and use in source and binary forms, with or without modification, 66:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * are permitted provided that the following conditions are met: 67:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * 1. Redistributions of source code must retain the above copyright notice, 68:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * this list of conditions and the following disclaimer. 69:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * 2. Redistributions in binary form must reproduce the above copyright notice, 70:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * this list of conditions and the following disclaimer in the documentation 71:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * and/or other materials provided with the distribution. 72:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * 3. Neither the name of STMicroelectronics nor the names of its contributors 73:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * may be used to endorse or promote products derived from this software 74:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * without specific prior written permission. 75:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * 76:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 77:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 78:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 79:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 80:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 81:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 82:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 83:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 84:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 85:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 86:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * 87:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ****************************************************************************** 88:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 89:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 90:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* 91:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** Additional Table: ARM GAS /tmp/ccApM0GN.s page 3 92:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 93:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** Using the HAL it is not possible to reach all supported SPI frequency with the differents SPI M 94:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** the following table resume the max SPI frequency reached with data size 8bits/16bits, 95:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** according to frequency used on APBx Peripheral Clock (fPCLK) used by the SPI instance : 96:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 97:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** DataSize = SPI_DATASIZE_8BIT: 98:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** +----------------------------------------------------------------------------------------------+ 99:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | | | 2Lines Fullduplex | 2Lines RxOnly | 1Line | 100:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | Process | Tranfert mode |---------------------|----------------------|----------------------| 101:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | | | Master | Slave | Master | Slave | Master | Slave | 102:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** |==============================================================================================| 103:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | T | Polling | Fpclk/4 | Fpclk/8 | NA | NA | NA | NA | 104:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | X |----------------|----------|----------|-----------|----------|-----------|----------| 105:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | / | Interrupt | Fpclk/64 | Fpclk/64 | NA | NA | NA | NA | 106:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | R |----------------|----------|----------|-----------|----------|-----------|----------| 107:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | X | DMA | Fpclk/2 | Fpclk/4 | NA | NA | NA | NA | 108:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** |=========|================|==========|==========|===========|==========|===========|==========| 109:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | | Polling | Fpclk/2 | Fpclk/8 | Fpclk/8 | Fpclk/8 | Fpclk/8 | Fpclk/8 | 110:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | |----------------|----------|----------|-----------|----------|-----------|----------| 111:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | R | Interrupt | Fpclk/64 | Fpclk/32 | Fpclk/32 | Fpclk/16 | Fpclk/32 | Fpclk/32 | 112:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | X |----------------|----------|----------|-----------|----------|-----------|----------| 113:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | | DMA | Fpclk/2 | Fpclk/2 | Fpclk/16 | Fpclk/2 | Fpclk/16 | Fpclk/2 | 114:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** |=========|================|==========|==========|===========|==========|===========|==========| 115:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | | Polling | Fpclk/8 | Fpclk/8 | NA | NA | Fpclk/4 | Fpclk/16 | 116:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | |----------------|----------|----------|-----------|----------|-----------|----------| 117:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | T | Interrupt | Fpclk/8 | Fpclk/32 | NA | NA | Fpclk/8 | Fpclk/16 | 118:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | X |----------------|----------|----------|-----------|----------|-----------|----------| 119:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | | DMA | Fpclk/2 | Fpclk/4 | NA | NA | Fpclk/2 | Fpclk/2 | 120:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** +----------------------------------------------------------------------------------------------+ 121:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 122:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** DataSize = SPI_DATASIZE_16BIT: 123:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** +---------------------------------------------------------------------------------------------- 124:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | | | 2Lines Fullduplex | 2Lines RxOnly | 1Line | 125:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | Process | Tranfert mode |---------------------|----------------------|----------------------| 126:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | | | Master | Slave | Master | Slave | Master | Slave | 127:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** |==============================================================================================| 128:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | T | Polling | Fpclk/4 | Fpclk/8 | NA | NA | NA | NA | 129:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | X |----------------|----------|----------|-----------|----------|-----------|----------| 130:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | / | Interrupt | Fpclk/32 | Fpclk/16 | NA | NA | NA | NA | 131:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | R |----------------|----------|----------|-----------|----------|-----------|----------| 132:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | X | DMA | Fpclk/2 | Fpclk/4 | NA | NA | NA | NA | 133:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** |=========|================|==========|==========|===========|==========|===========|==========| 134:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | | Polling | Fpclk/2 | Fpclk/4 | Fpclk/8 | Fpclk/4 | Fpclk/2 | Fpclk/8 | 135:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | |----------------|----------|----------|-----------|----------|-----------|----------| 136:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | R | Interrupt | Fpclk/32 | Fpclk/8 | Fpclk/16 | Fpclk/16 | Fpclk/16 | Fpclk/8 | 137:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | X |----------------|----------|----------|-----------|----------|-----------|----------| 138:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | | DMA | Fpclk/2 | Fpclk/2 | Fpclk/8 | Fpclk/2 | Fpclk/8 | Fpclk/2 | 139:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** |=========|================|==========|==========|===========|==========|===========|==========| 140:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | | Polling | Fpclk/4 | Fpclk/4 | NA | NA | Fpclk/4 | Fpclk/8 | 141:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | |----------------|----------|----------|-----------|----------|-----------|----------| 142:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | T | Interrupt | Fpclk/4 | Fpclk/16 | NA | NA | Fpclk/8 | Fpclk/8 | 143:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | X |----------------|----------|----------|-----------|----------|-----------|----------| 144:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** | | DMA | Fpclk/2 | Fpclk/4 | NA | NA | Fpclk/2 | Fpclk/2 | 145:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** +----------------------------------------------------------------------------------------------+ 146:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** @note The max SPI frequency depend on SPI data size (8bits, 16bits), 147:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI mode(2 Lines fullduplex, 2 lines RxOnly, 1 line TX/RX) and Process mode (Polling, IT, D 148:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ ARM GAS /tmp/ccApM0GN.s page 4 149:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 150:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Includes ------------------------------------------------------------------*/ 151:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** #include "stm32l0xx_hal.h" 152:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 153:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** @addtogroup STM32L0xx_HAL_Driver 154:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @{ 155:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 156:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 157:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** #ifdef HAL_SPI_MODULE_ENABLED 158:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 159:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** @addtogroup SPI 160:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief SPI HAL module driver 161:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @{ 162:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 163:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 164:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Private typedef -----------------------------------------------------------*/ 165:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Private define ------------------------------------------------------------*/ 166:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** @addtogroup SPI_Private 167:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @{ 168:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 169:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** #define SPI_TIMEOUT_VALUE 10U 170:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 171:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Private macro -------------------------------------------------------------*/ 172:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Private variables ---------------------------------------------------------*/ 173:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Private function prototypes -----------------------------------------------*/ 174:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 175:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_TxCloseIRQHandler(SPI_HandleTypeDef *hspi); 176:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_TxISR(SPI_HandleTypeDef *hspi); 177:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_RxCloseIRQHandler(SPI_HandleTypeDef *hspi); 178:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_2LinesRxISR(SPI_HandleTypeDef *hspi); 179:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_RxISR(SPI_HandleTypeDef *hspi); 180:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_DMATransmitCplt(DMA_HandleTypeDef *hdma); 181:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_DMAReceiveCplt(DMA_HandleTypeDef *hdma); 182:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_DMATransmitReceiveCplt(DMA_HandleTypeDef *hdma); 183:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_DMAHalfTransmitCplt(DMA_HandleTypeDef *hdma); 184:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_DMAHalfReceiveCplt(DMA_HandleTypeDef *hdma); 185:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_DMAHalfTransmitReceiveCplt(DMA_HandleTypeDef *hdma); 186:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_DMAError(DMA_HandleTypeDef *hdma); 187:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static HAL_StatusTypeDef SPI_WaitOnFlagUntilTimeout(SPI_HandleTypeDef *hspi, uint32_t Flag, FlagSta 188:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 189:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @} 190:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 191:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 192:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Exported functions ---------------------------------------------------------*/ 193:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 194:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** @addtogroup SPI_Exported_Functions SPI Exported Functions 195:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @{ 196:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 197:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 198:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** @addtogroup SPI_Exported_Functions_Group1 Initialization and de-initialization functions 199:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Initialization and Configuration functions 200:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * 201:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** @verbatim 202:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** =============================================================================== 203:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ##### Initialization and de-initialization functions ##### 204:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** =============================================================================== 205:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** [..] This subsection provides a set of functions allowing to initialize and ARM GAS /tmp/ccApM0GN.s page 5 206:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** de-initialiaze the SPIx peripheral: 207:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 208:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (+) User must implement HAL_SPI_MspInit() function in which he configures 209:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** all related peripherals resources (CLOCK, GPIO, DMA, IT and NVIC ). 210:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 211:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (+) Call the function HAL_SPI_Init() to configure the selected device with 212:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** the selected configuration: 213:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) Mode 214:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) Direction 215:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) Data Size 216:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) Clock Polarity and Phase 217:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) NSS Management 218:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) BaudRate Prescaler 219:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) FirstBit 220:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) TIMode 221:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) CRC Calculation 222:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) CRC Polynomial if CRC enabled 223:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 224:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (+) Call the function HAL_SPI_DeInit() to restore the default configuration 225:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** of the selected SPIx periperal. 226:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 227:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** @endverbatim 228:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @{ 229:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 230:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 231:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 232:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Initializes the SPI according to the specified parameters 233:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * in the SPI_InitTypeDef and create the associated handle. 234:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 235:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 236:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval HAL status 237:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 238:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_StatusTypeDef HAL_SPI_Init(SPI_HandleTypeDef *hspi) 239:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 240:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check the SPI handle allocation */ 241:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi == NULL) 242:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 243:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_ERROR; 244:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 245:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 246:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check the parameters */ 247:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** assert_param(IS_SPI_ALL_INSTANCE(hspi->Instance)); 248:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** assert_param(IS_SPI_MODE(hspi->Init.Mode)); 249:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** assert_param(IS_SPI_DIRECTION_MODE(hspi->Init.Direction)); 250:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** assert_param(IS_SPI_DATASIZE(hspi->Init.DataSize)); 251:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** assert_param(IS_SPI_CPOL(hspi->Init.CLKPolarity)); 252:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** assert_param(IS_SPI_CPHA(hspi->Init.CLKPhase)); 253:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** assert_param(IS_SPI_NSS(hspi->Init.NSS)); 254:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** assert_param(IS_SPI_BAUDRATE_PRESCALER(hspi->Init.BaudRatePrescaler)); 255:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** assert_param(IS_SPI_FIRST_BIT(hspi->Init.FirstBit)); 256:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** assert_param(IS_SPI_TIMODE(hspi->Init.TIMode)); 257:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** assert_param(IS_SPI_CRC_CALCULATION(hspi->Init.CRCCalculation)); 258:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** assert_param(IS_SPI_CRC_POLYNOMIAL(hspi->Init.CRCPolynomial)); 259:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 260:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->State == HAL_SPI_STATE_RESET) 261:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 262:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Allocate lock resource and initialize it */ ARM GAS /tmp/ccApM0GN.s page 6 263:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->Lock = HAL_UNLOCKED; 264:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 265:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Init the low level hardware : GPIO, CLOCK, NVIC... */ 266:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_MspInit(hspi); 267:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 268:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 269:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_BUSY; 270:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 271:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disble the selected SPI peripheral */ 272:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_DISABLE(hspi); 273:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 274:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /*----------------------- SPIx CR1 & CR2 Configuration ---------------------*/ 275:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Configure : SPI Mode, Communication Mode, Data size, Clock polarity and phase, NSS management, 276:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** Communication speed, First bit and CRC calculation state */ 277:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** WRITE_REG(hspi->Instance->CR1, (hspi->Init.Mode | hspi->Init.Direction | hspi->Init.DataSize | 278:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->Init.CLKPolarity | hspi->Init.CLKPhase | (hspi->Init.NSS & 279:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->Init.BaudRatePrescaler | hspi->Init.FirstBit | hspi->Init. 280:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 281:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Configure : NSS management */ 282:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** WRITE_REG(hspi->Instance->CR2, (((hspi->Init.NSS >> 16U) & SPI_CR2_SSOE) | hspi->Init.TIMode)); 283:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 284:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /*---------------------------- SPIx CRCPOLY Configuration ------------------*/ 285:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Configure : CRC Polynomial */ 286:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** WRITE_REG(hspi->Instance->CRCPR, hspi->Init.CRCPolynomial); 287:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 288:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** #if !defined(STM32L011xx) && !defined(STM32L021xx) && !defined(STM32L031xx) && !defined(STM32L041xx 289:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Activate the SPI mode (Make sure that I2SMOD bit in I2SCFGR register is reset) */ 290:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** CLEAR_BIT(hspi->Instance->I2SCFGR, SPI_I2SCFGR_I2SMOD); 291:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** #endif 292:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 293:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->ErrorCode = HAL_SPI_ERROR_NONE; 294:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_READY; 295:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 296:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_OK; 297:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 298:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 299:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 300:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief DeInitializes the SPI peripheral 301:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 302:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 303:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval HAL status 304:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 305:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_StatusTypeDef HAL_SPI_DeInit(SPI_HandleTypeDef *hspi) 306:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 307:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check the SPI handle allocation */ 308:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi == NULL) 309:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 310:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_ERROR; 311:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 312:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 313:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_BUSY; 314:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 315:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disable the SPI Peripheral Clock */ 316:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_DISABLE(hspi); 317:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 318:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* DeInit the low level hardware: GPIO, CLOCK, NVIC... */ 319:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_MspDeInit(hspi); ARM GAS /tmp/ccApM0GN.s page 7 320:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 321:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->ErrorCode = HAL_SPI_ERROR_NONE; 322:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_RESET; 323:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 324:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Release Lock */ 325:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 326:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 327:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_OK; 328:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 329:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 330:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 331:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief SPI MSP Init 332:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 333:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 334:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval None 335:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 336:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __weak void HAL_SPI_MspInit(SPI_HandleTypeDef *hspi) 337:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 338:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Prevent unused argument(s) compilation warning */ 339:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** UNUSED(hspi); 340:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 341:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* NOTE : This function Should not be modified, when the callback is needed, 342:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** the HAL_SPI_MspInit could be implenetd in the user file 343:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 344:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 345:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 346:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 347:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief SPI MSP DeInit 348:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 349:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 350:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval None 351:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 352:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __weak void HAL_SPI_MspDeInit(SPI_HandleTypeDef *hspi) 353:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 354:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Prevent unused argument(s) compilation warning */ 355:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** UNUSED(hspi); 356:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 357:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* NOTE : This function Should not be modified, when the callback is needed, 358:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** the HAL_SPI_MspDeInit could be implenetd in the user file 359:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 360:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 361:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 362:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 363:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @} 364:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 365:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 366:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** @addtogroup SPI_Exported_Functions_Group2 367:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Data transfers functions 368:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * 369:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** @verbatim 370:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ============================================================================== 371:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ##### IO operation functions ##### 372:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** =============================================================================== 373:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** This subsection provides a set of functions allowing to manage the SPI 374:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** data transfers. 375:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 376:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** [..] The SPI supports master and slave mode : ARM GAS /tmp/ccApM0GN.s page 8 377:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 378:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (#) There are two modes of transfer: 379:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) Blocking mode: The communication is performed in polling mode. 380:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** The HAL status of all data processing is returned by the same function 381:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** after finishing transfer. 382:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) No-Blocking mode: The communication is performed using Interrupts 383:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** or DMA, These APIs return the HAL status. 384:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** The end of the data processing will be indicated through the 385:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** dedicated SPI IRQ when using Interrupt mode or the DMA IRQ when 386:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** using DMA mode. 387:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** The HAL_SPI_TxCpltCallback(), HAL_SPI_RxCpltCallback() and HAL_SPI_TxRxCpltCallback() us 388:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** will be executed respectivelly at the end of the transmit or Receive process 389:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** The HAL_SPI_ErrorCallback()user callback will be executed when a communication error is 390:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 391:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (#) Blocking mode APIs are : 392:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) HAL_SPI_Transmit()in 1Line (simplex) and 2Lines (full duplex) mode 393:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) HAL_SPI_Receive() in 1Line (simplex) and 2Lines (full duplex) mode 394:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) HAL_SPI_TransmitReceive() in full duplex mode 395:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 396:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (#) Non Blocking mode API's with Interrupt are : 397:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) HAL_SPI_Transmit_IT()in 1Line (simplex) and 2Lines (full duplex) mode 398:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) HAL_SPI_Receive_IT() in 1Line (simplex) and 2Lines (full duplex) mode 399:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) HAL_SPI_TransmitReceive_IT()in full duplex mode 400:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) HAL_SPI_IRQHandler() 401:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 402:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (#) Non Blocking mode functions with DMA are : 403:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) HAL_SPI_Transmit_DMA()in 1Line (simplex) and 2Lines (full duplex) mode 404:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) HAL_SPI_Receive_DMA() in 1Line (simplex) and 2Lines (full duplex) mode 405:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) HAL_SPI_TransmitReceive_DMA() in full duplex mode 406:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 407:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (#) A set of Transfer Complete Callbacks are provided in non Blocking mode: 408:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) HAL_SPI_TxCpltCallback() 409:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) HAL_SPI_RxCpltCallback() 410:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) HAL_SPI_TxRxCpltCallback() 411:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) HAL_SPI_TxHalfCpltCallback() 412:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) HAL_SPI_RxHalfCpltCallback() 413:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) HAL_SPI_TxRxHalfCpltCallback() 414:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (++) HAL_SPI_ErrorCallback() 415:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 416:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** @endverbatim 417:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @{ 418:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 419:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 420:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 421:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Transmit an amount of data in blocking mode 422:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 423:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 424:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param pData: pointer to data buffer 425:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param Size: amount of data to be sent 426:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param Timeout: Timeout duration 427:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval HAL status 428:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 429:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_StatusTypeDef HAL_SPI_Transmit(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size, uint32_t 430:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 431:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 432:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->State == HAL_SPI_STATE_READY) 433:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { ARM GAS /tmp/ccApM0GN.s page 9 434:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((pData == NULL ) || (Size == 0U)) 435:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 436:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_ERROR; 437:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 438:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 439:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check the parameters */ 440:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** assert_param(IS_SPI_DIRECTION_2LINES_OR_1LINE(hspi->Init.Direction)); 441:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 442:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Locked */ 443:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_LOCK(hspi); 444:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 445:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Configure communication */ 446:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_BUSY_TX; 447:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->ErrorCode = HAL_SPI_ERROR_NONE; 448:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 449:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr = pData; 450:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferSize = Size; 451:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = Size; 452:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 453:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /*Init field not used in handle to zero */ 454:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxISR = 0U; 455:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxISR = 0U; 456:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr = NULL; 457:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferSize = 0U; 458:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = 0U; 459:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 460:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Reset CRC Calculation */ 461:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 462:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 463:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_RESET_CRC(hspi); 464:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 465:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 466:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.Direction == SPI_DIRECTION_1LINE) 467:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 468:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Configure communication direction : 1Line */ 469:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_1LINE_TX(hspi); 470:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 471:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 472:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if the SPI is already enabled */ 473:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->Instance->CR1 &SPI_CR1_SPE) != SPI_CR1_SPE) 474:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 475:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable SPI peripheral */ 476:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_ENABLE(hspi); 477:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 478:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 479:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Transmit data in 8 Bit mode */ 480:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.DataSize == SPI_DATASIZE_8BIT) 481:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 482:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->Init.Mode == SPI_MODE_SLAVE)|| (hspi->TxXferCount == 0x01U)) 483:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 484:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->Instance->DR = (*hspi->pTxBuffPtr++); 485:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount--; 486:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 487:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 488:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** while(hspi->TxXferCount > 0U) 489:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 490:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until TXE flag is set to send data */ ARM GAS /tmp/ccApM0GN.s page 10 491:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_TXE, RESET, Timeout) != HAL_OK) 492:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 493:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 494:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 495:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->Instance->DR = (*hspi->pTxBuffPtr++); 496:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount--; 497:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 498:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable CRC Transmission */ 499:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 500:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 501:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->Instance->CR1, SPI_CR1_CRCNEXT); 502:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 503:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 504:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Transmit data in 16 Bit mode */ 505:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 506:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 507:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->Init.Mode == SPI_MODE_SLAVE) || (hspi->TxXferCount == 0x01U)) 508:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 509:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->Instance->DR = *((uint16_t*)hspi->pTxBuffPtr); 510:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr+=2U; 511:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount--; 512:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 513:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 514:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** while(hspi->TxXferCount > 0U) 515:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 516:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until TXE flag is set to send data */ 517:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_TXE, RESET, Timeout) != HAL_OK) 518:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 519:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 520:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 521:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->Instance->DR = *((uint16_t*)hspi->pTxBuffPtr); 522:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr+=2U; 523:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount--; 524:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 525:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable CRC Transmission */ 526:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 527:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 528:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->Instance->CR1, SPI_CR1_CRCNEXT); 529:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 530:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 531:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 532:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until TXE flag is set to send data */ 533:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_TXE, RESET, Timeout) != HAL_OK) 534:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 535:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_FLAG); 536:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 537:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 538:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 539:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until Busy flag is reset before disabling SPI */ 540:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_BSY, SET, Timeout) != HAL_OK) 541:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 542:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_FLAG); 543:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 544:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 545:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 546:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Clear OVERUN flag in 2 Lines communication mode because received is not read */ 547:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.Direction == SPI_DIRECTION_2LINES) ARM GAS /tmp/ccApM0GN.s page 11 548:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 549:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_CLEAR_OVRFLAG(hspi); 550:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 551:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 552:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_READY; 553:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 554:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ 555:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 556:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 557:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_OK; 558:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 559:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 560:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 561:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_BUSY; 562:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 563:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 564:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 565:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 566:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Receive an amount of data in blocking mode 567:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 568:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 569:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param pData: pointer to data buffer 570:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param Size: amount of data to be sent 571:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param Timeout: Timeout duration 572:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval HAL status 573:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 574:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_StatusTypeDef HAL_SPI_Receive(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size, uint32_t 575:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 576:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __IO uint16_t tmpreg = 0U; 577:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 578:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->State == HAL_SPI_STATE_READY) 579:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 580:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((pData == NULL ) || (Size == 0U)) 581:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 582:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_ERROR; 583:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 584:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 585:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Locked */ 586:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_LOCK(hspi); 587:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 588:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Configure communication */ 589:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_BUSY_RX; 590:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->ErrorCode = HAL_SPI_ERROR_NONE; 591:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 592:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr = pData; 593:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferSize = Size; 594:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = Size; 595:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 596:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /*Init field not used in handle to zero */ 597:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxISR = 0U; 598:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxISR = 0U; 599:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr = NULL; 600:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferSize = 0U; 601:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = 0U; 602:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 603:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Configure communication direction : 1Line */ 604:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.Direction == SPI_DIRECTION_1LINE) ARM GAS /tmp/ccApM0GN.s page 12 605:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 606:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_1LINE_RX(hspi); 607:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 608:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 609:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Reset CRC Calculation */ 610:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 611:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 612:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_RESET_CRC(hspi); 613:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 614:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 615:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->Init.Mode == SPI_MODE_MASTER) && (hspi->Init.Direction == SPI_DIRECTION_2LINES)) 616:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 617:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ 618:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 619:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 620:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Call transmit-receive function to send Dummy data on Tx line and generate clock on CLK lin 621:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_SPI_TransmitReceive(hspi, pData, pData, Size, Timeout); 622:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 623:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 624:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if the SPI is already enabled */ 625:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->Instance->CR1 &SPI_CR1_SPE) != SPI_CR1_SPE) 626:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 627:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable SPI peripheral */ 628:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_ENABLE(hspi); 629:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 630:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 631:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Receive data in 8 Bit mode */ 632:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.DataSize == SPI_DATASIZE_8BIT) 633:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 634:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** while(hspi->RxXferCount > 1U) 635:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 636:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until RXNE flag is set */ 637:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_RXNE, RESET, Timeout) != HAL_OK) 638:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 639:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 640:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 641:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 642:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (*hspi->pRxBuffPtr++) = hspi->Instance->DR; 643:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount--; 644:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 645:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable CRC Reception */ 646:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 647:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 648:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->Instance->CR1, SPI_CR1_CRCNEXT); 649:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 650:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 651:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Receive data in 16 Bit mode */ 652:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 653:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 654:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** while(hspi->RxXferCount > 1U) 655:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 656:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until RXNE flag is set to read data */ 657:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_RXNE, RESET, Timeout) != HAL_OK) 658:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 659:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 660:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 661:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ARM GAS /tmp/ccApM0GN.s page 13 662:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** *((uint16_t*)hspi->pRxBuffPtr) = hspi->Instance->DR; 663:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr+=2U; 664:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount--; 665:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 666:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable CRC Reception */ 667:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 668:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 669:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->Instance->CR1, SPI_CR1_CRCNEXT); 670:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 671:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 672:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 673:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until RXNE flag is set */ 674:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_RXNE, RESET, Timeout) != HAL_OK) 675:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 676:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 677:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 678:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 679:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Receive last data in 8 Bit mode */ 680:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.DataSize == SPI_DATASIZE_8BIT) 681:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 682:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (*hspi->pRxBuffPtr++) = hspi->Instance->DR; 683:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 684:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Receive last data in 16 Bit mode */ 685:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 686:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 687:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** *((uint16_t*)hspi->pRxBuffPtr) = hspi->Instance->DR; 688:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr+=2U; 689:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 690:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount--; 691:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 692:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* If CRC computation is enabled */ 693:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 694:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 695:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until RXNE flag is set: CRC Received */ 696:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_RXNE, RESET, Timeout) != HAL_OK) 697:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 698:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_CRC); 699:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 700:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 701:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 702:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Read CRC to clear RXNE flag */ 703:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** tmpreg = hspi->Instance->DR; 704:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** UNUSED(tmpreg); /* avoid warning on tmpreg affectation with stupid compiler */ 705:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 706:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 707:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->Init.Mode == SPI_MODE_MASTER)&&((hspi->Init.Direction == SPI_DIRECTION_1LINE)||(hspi- 708:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 709:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disable SPI peripheral */ 710:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_DISABLE(hspi); 711:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 712:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 713:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_READY; 714:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 715:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if CRC error occurred */ 716:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) && (__HAL_SPI_GET_FLAG(hspi, SPI_FL 717:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 718:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_CRC); ARM GAS /tmp/ccApM0GN.s page 14 719:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 720:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Reset CRC Calculation */ 721:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_RESET_CRC(hspi); 722:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 723:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ 724:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 725:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 726:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_ERROR; 727:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 728:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 729:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ 730:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 731:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 732:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_OK; 733:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 734:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 735:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 736:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_BUSY; 737:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 738:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 739:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 740:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 741:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Transmit and Receive an amount of data in blocking mode 742:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 743:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 744:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param pTxData: pointer to transmission data buffer 745:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param pRxData: pointer to reception data buffer to be 746:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param Size: amount of data to be sent 747:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param Timeout: Timeout duration 748:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval HAL status 749:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 750:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_StatusTypeDef HAL_SPI_TransmitReceive(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxDa 751:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 752:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __IO uint16_t tmpreg = 0U; 753:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 754:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->State == HAL_SPI_STATE_READY) || (hspi->State == HAL_SPI_STATE_BUSY_RX)) 755:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 756:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((pTxData == NULL ) || (pRxData == NULL ) || (Size == 0U)) 757:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 758:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_ERROR; 759:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 760:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 761:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check the parameters */ 762:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** assert_param(IS_SPI_DIRECTION_2LINES(hspi->Init.Direction)); 763:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 764:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Locked */ 765:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_LOCK(hspi); 766:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 767:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Don't overwrite in case of HAL_SPI_STATE_BUSY_RX */ 768:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->State == HAL_SPI_STATE_READY) 769:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 770:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_BUSY_TX_RX; 771:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 772:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 773:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Configure communication */ 774:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->ErrorCode = HAL_SPI_ERROR_NONE; 775:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ARM GAS /tmp/ccApM0GN.s page 15 776:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr = pRxData; 777:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferSize = Size; 778:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = Size; 779:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 780:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr = pTxData; 781:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferSize = Size; 782:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = Size; 783:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 784:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /*Init field not used in handle to zero */ 785:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxISR = 0U; 786:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxISR = 0U; 787:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 788:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Reset CRC Calculation */ 789:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 790:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 791:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_RESET_CRC(hspi); 792:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 793:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 794:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if the SPI is already enabled */ 795:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->Instance->CR1 &SPI_CR1_SPE) != SPI_CR1_SPE) 796:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 797:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable SPI peripheral */ 798:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_ENABLE(hspi); 799:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 800:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 801:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Transmit and Receive data in 16 Bit mode */ 802:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.DataSize == SPI_DATASIZE_16BIT) 803:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 804:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->Init.Mode == SPI_MODE_SLAVE) || ((hspi->Init.Mode == SPI_MODE_MASTER) && (hspi->TxX 805:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 806:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->Instance->DR = *((uint16_t*)hspi->pTxBuffPtr); 807:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr+=2U; 808:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount--; 809:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 810:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->TxXferCount == 0U) 811:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 812:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable CRC Transmission */ 813:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 814:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 815:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->Instance->CR1, SPI_CR1_CRCNEXT); 816:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 817:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 818:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until RXNE flag is set */ 819:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_RXNE, RESET, Timeout) != HAL_OK) 820:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 821:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 822:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 823:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 824:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** *((uint16_t*)hspi->pRxBuffPtr) = hspi->Instance->DR; 825:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr+=2U; 826:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount--; 827:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 828:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 829:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 830:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** while(hspi->TxXferCount > 0U) 831:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 832:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until TXE flag is set to send data */ ARM GAS /tmp/ccApM0GN.s page 16 833:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_TXE, RESET, Timeout) != HAL_OK) 834:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 835:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 836:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 837:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 838:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->Instance->DR = *((uint16_t*)hspi->pTxBuffPtr); 839:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr+=2U; 840:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount--; 841:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 842:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable CRC Transmission */ 843:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->TxXferCount == 0U) && (hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE)) 844:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 845:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->Instance->CR1, SPI_CR1_CRCNEXT); 846:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 847:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 848:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until RXNE flag is set */ 849:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_RXNE, RESET, Timeout) != HAL_OK) 850:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 851:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 852:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 853:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 854:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** *((uint16_t*)hspi->pRxBuffPtr) = hspi->Instance->DR; 855:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr+=2U; 856:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount--; 857:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 858:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Receive the last byte */ 859:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.Mode == SPI_MODE_SLAVE) 860:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 861:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until RXNE flag is set */ 862:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_RXNE, RESET, Timeout) != HAL_OK) 863:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 864:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 865:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 866:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 867:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** *((uint16_t*)hspi->pRxBuffPtr) = hspi->Instance->DR; 868:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr+=2U; 869:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount--; 870:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 871:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 872:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 873:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Transmit and Receive data in 8 Bit mode */ 874:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 875:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 876:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->Init.Mode == SPI_MODE_SLAVE) || ((hspi->Init.Mode == SPI_MODE_MASTER) && (hspi->TxX 877:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 878:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->Instance->DR = (*hspi->pTxBuffPtr++); 879:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount--; 880:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 881:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->TxXferCount == 0U) 882:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 883:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable CRC Transmission */ 884:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 885:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 886:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->Instance->CR1, SPI_CR1_CRCNEXT); 887:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 888:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 889:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until RXNE flag is set */ ARM GAS /tmp/ccApM0GN.s page 17 890:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_RXNE, RESET, Timeout) != HAL_OK) 891:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 892:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 893:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 894:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 895:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (*hspi->pRxBuffPtr) = hspi->Instance->DR; 896:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount--; 897:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 898:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 899:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 900:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** while(hspi->TxXferCount > 0U) 901:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 902:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until TXE flag is set to send data */ 903:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_TXE, RESET, Timeout) != HAL_OK) 904:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 905:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 906:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 907:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 908:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->Instance->DR = (*hspi->pTxBuffPtr++); 909:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount--; 910:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 911:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable CRC Transmission */ 912:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->TxXferCount == 0U) && (hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE)) 913:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 914:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->Instance->CR1, SPI_CR1_CRCNEXT); 915:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 916:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 917:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until RXNE flag is set */ 918:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_RXNE, RESET, Timeout) != HAL_OK) 919:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 920:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 921:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 922:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 923:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (*hspi->pRxBuffPtr++) = hspi->Instance->DR; 924:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount--; 925:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 926:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.Mode == SPI_MODE_SLAVE) 927:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 928:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until RXNE flag is set */ 929:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_RXNE, RESET, Timeout) != HAL_OK) 930:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 931:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 932:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 933:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 934:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (*hspi->pRxBuffPtr++) = hspi->Instance->DR; 935:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount--; 936:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 937:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 938:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 939:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 940:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Read CRC from DR to close CRC calculation process */ 941:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 942:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 943:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until RXNE flag is set */ 944:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_RXNE, RESET, Timeout) != HAL_OK) 945:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 946:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_CRC); ARM GAS /tmp/ccApM0GN.s page 18 947:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 948:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 949:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Read CRC */ 950:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** tmpreg = hspi->Instance->DR; 951:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** UNUSED(tmpreg); /* avoid warning on tmpreg affectation with stupid compiler */ 952:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 953:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 954:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until Busy flag is reset before disabling SPI */ 955:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_BSY, SET, Timeout) != HAL_OK) 956:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 957:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_FLAG); 958:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 959:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 960:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 961:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_READY; 962:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 963:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if CRC error occurred */ 964:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) && (__HAL_SPI_GET_FLAG(hspi, SPI_FL 965:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 966:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_CRC); 967:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 968:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_RESET_CRC(hspi); 969:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 970:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ 971:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 972:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 973:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_ERROR; 974:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 975:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 976:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ 977:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 978:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 979:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_OK; 980:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 981:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 982:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 983:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_BUSY; 984:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 985:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 986:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 987:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 988:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Transmit an amount of data in no-blocking mode with Interrupt 989:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 990:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 991:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param pData: pointer to data buffer 992:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param Size: amount of data to be sent 993:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval HAL status 994:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 995:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_StatusTypeDef HAL_SPI_Transmit_IT(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size) 996:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 997:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->State == HAL_SPI_STATE_READY) 998:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 999:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((pData == NULL) || (Size == 0U)) 1000:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1001:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_ERROR; 1002:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1003:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ARM GAS /tmp/ccApM0GN.s page 19 1004:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check the parameters */ 1005:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** assert_param(IS_SPI_DIRECTION_2LINES_OR_1LINE(hspi->Init.Direction)); 1006:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1007:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Locked */ 1008:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_LOCK(hspi); 1009:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1010:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Configure communication */ 1011:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_BUSY_TX; 1012:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->ErrorCode = HAL_SPI_ERROR_NONE; 1013:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1014:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxISR = &SPI_TxISR; 1015:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr = pData; 1016:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferSize = Size; 1017:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = Size; 1018:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1019:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /*Init field not used in handle to zero */ 1020:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxISR = 0U; 1021:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr = NULL; 1022:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferSize = 0U; 1023:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = 0U; 1024:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1025:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Configure communication direction : 1Line */ 1026:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.Direction == SPI_DIRECTION_1LINE) 1027:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1028:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_1LINE_TX(hspi); 1029:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1030:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1031:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Reset CRC Calculation */ 1032:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 1033:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1034:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_RESET_CRC(hspi); 1035:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1036:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1037:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if (hspi->Init.Direction == SPI_DIRECTION_2LINES) 1038:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1039:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_ENABLE_IT(hspi, (SPI_IT_TXE)); 1040:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1041:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 1042:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1043:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable TXE and ERR interrupt */ 1044:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_ENABLE_IT(hspi, (SPI_IT_TXE | SPI_IT_ERR)); 1045:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1046:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ 1047:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 1048:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1049:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if the SPI is already enabled */ 1050:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->Instance->CR1 &SPI_CR1_SPE) != SPI_CR1_SPE) 1051:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1052:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable SPI peripheral */ 1053:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_ENABLE(hspi); 1054:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1055:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1056:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_OK; 1057:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1058:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 1059:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1060:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_BUSY; ARM GAS /tmp/ccApM0GN.s page 20 1061:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1062:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1063:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1064:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1065:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Receive an amount of data in no-blocking mode with Interrupt 1066:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 1067:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 1068:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param pData: pointer to data buffer 1069:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param Size: amount of data to be sent 1070:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval HAL status 1071:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1072:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_StatusTypeDef HAL_SPI_Receive_IT(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size) 1073:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1074:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->State == HAL_SPI_STATE_READY) 1075:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1076:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((pData == NULL) || (Size == 0U)) 1077:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1078:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_ERROR; 1079:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1080:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1081:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Locked */ 1082:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_LOCK(hspi); 1083:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1084:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Configure communication */ 1085:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_BUSY_RX; 1086:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->ErrorCode = HAL_SPI_ERROR_NONE; 1087:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1088:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxISR = &SPI_RxISR; 1089:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr = pData; 1090:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferSize = Size; 1091:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = Size ; 1092:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1093:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /*Init field not used in handle to zero */ 1094:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxISR = 0U; 1095:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr = NULL; 1096:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferSize = 0U; 1097:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = 0U; 1098:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1099:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Configure communication direction : 1Line */ 1100:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.Direction == SPI_DIRECTION_1LINE) 1101:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1102:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_1LINE_RX(hspi); 1103:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1104:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else if((hspi->Init.Direction == SPI_DIRECTION_2LINES) && (hspi->Init.Mode == SPI_MODE_MASTER)) 1105:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1106:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ 1107:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 1108:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1109:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Call transmit-receive function to send Dummy data on Tx line and generate clock on CLK lin 1110:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_SPI_TransmitReceive_IT(hspi, pData, pData, Size); 1111:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1112:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1113:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Reset CRC Calculation */ 1114:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 1115:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1116:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_RESET_CRC(hspi); 1117:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } ARM GAS /tmp/ccApM0GN.s page 21 1118:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1119:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable TXE and ERR interrupt */ 1120:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_ENABLE_IT(hspi, (SPI_IT_RXNE | SPI_IT_ERR)); 1121:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1122:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ 1123:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 1124:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1125:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Note : The SPI must be enabled after unlocking current process 1126:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** to avoid the risk of SPI interrupt handle execution before current 1127:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** process unlock */ 1128:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1129:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if the SPI is already enabled */ 1130:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->Instance->CR1 &SPI_CR1_SPE) != SPI_CR1_SPE) 1131:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1132:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable SPI peripheral */ 1133:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_ENABLE(hspi); 1134:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1135:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1136:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_OK; 1137:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1138:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 1139:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1140:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_BUSY; 1141:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1142:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1143:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1144:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1145:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Transmit and Receive an amount of data in no-blocking mode with Interrupt 1146:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 1147:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 1148:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param pTxData: pointer to transmission data buffer 1149:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param pRxData: pointer to reception data buffer to be 1150:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param Size: amount of data to be sent 1151:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval HAL status 1152:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1153:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_StatusTypeDef HAL_SPI_TransmitReceive_IT(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pR 1154:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1155:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1156:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->State == HAL_SPI_STATE_READY) || \ 1157:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ((hspi->Init.Mode == SPI_MODE_MASTER) && (hspi->Init.Direction == SPI_DIRECTION_2LINES) && (hs 1158:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1159:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((pTxData == NULL ) || (pRxData == NULL ) || (Size == 0U)) 1160:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1161:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_ERROR; 1162:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1163:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1164:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check the parameters */ 1165:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** assert_param(IS_SPI_DIRECTION_2LINES(hspi->Init.Direction)); 1166:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1167:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process locked */ 1168:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_LOCK(hspi); 1169:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1170:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Don't overwrite in case of HAL_SPI_STATE_BUSY_RX */ 1171:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->State != HAL_SPI_STATE_BUSY_RX) 1172:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1173:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_BUSY_TX_RX; 1174:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } ARM GAS /tmp/ccApM0GN.s page 22 1175:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1176:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Configure communication */ 1177:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->ErrorCode = HAL_SPI_ERROR_NONE; 1178:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1179:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxISR = &SPI_TxISR; 1180:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr = pTxData; 1181:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferSize = Size; 1182:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = Size; 1183:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1184:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxISR = &SPI_2LinesRxISR; 1185:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr = pRxData; 1186:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferSize = Size; 1187:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = Size; 1188:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1189:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Reset CRC Calculation */ 1190:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 1191:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1192:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_RESET_CRC(hspi); 1193:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1194:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1195:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable TXE, RXNE and ERR interrupt */ 1196:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_ENABLE_IT(hspi, (SPI_IT_TXE | SPI_IT_RXNE | SPI_IT_ERR)); 1197:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1198:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ 1199:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 1200:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1201:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if the SPI is already enabled */ 1202:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->Instance->CR1 &SPI_CR1_SPE) != SPI_CR1_SPE) 1203:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1204:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable SPI peripheral */ 1205:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_ENABLE(hspi); 1206:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1207:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1208:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_OK; 1209:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1210:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 1211:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1212:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_BUSY; 1213:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1214:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1215:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1216:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1217:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Transmit an amount of data in no-blocking mode with DMA 1218:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 1219:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 1220:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param pData: pointer to data buffer 1221:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param Size: amount of data to be sent 1222:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval HAL status 1223:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1224:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_StatusTypeDef HAL_SPI_Transmit_DMA(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size) 1225:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1226:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->State == HAL_SPI_STATE_READY) 1227:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1228:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((pData == NULL) || (Size == 0U)) 1229:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1230:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ 1231:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); ARM GAS /tmp/ccApM0GN.s page 23 1232:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_ERROR; 1233:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1234:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1235:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check the parameters */ 1236:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** assert_param(IS_SPI_DIRECTION_2LINES_OR_1LINE(hspi->Init.Direction)); 1237:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1238:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Locked */ 1239:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_LOCK(hspi); 1240:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1241:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Configure communication */ 1242:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_BUSY_TX; 1243:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->ErrorCode = HAL_SPI_ERROR_NONE; 1244:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1245:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr = (uint8_t*)pData; 1246:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferSize = Size; 1247:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = Size; 1248:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1249:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /*Init field not used in handle to zero */ 1250:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxISR = 0U; 1251:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxISR = 0U; 1252:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1253:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr = NULL; 1254:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferSize = 0U; 1255:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = 0U; 1256:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1257:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Configure communication direction : 1Line */ 1258:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.Direction == SPI_DIRECTION_1LINE) 1259:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1260:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_1LINE_TX(hspi); 1261:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1262:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1263:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Reset CRC Calculation */ 1264:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 1265:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1266:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_RESET_CRC(hspi); 1267:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1268:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1269:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Set the SPI TxDMA Half transfer complete callback */ 1270:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmatx->XferHalfCpltCallback = SPI_DMAHalfTransmitCplt; 1271:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1272:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Set the SPI TxDMA transfer complete callback */ 1273:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmatx->XferCpltCallback = SPI_DMATransmitCplt; 1274:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1275:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Set the DMA error callback */ 1276:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmatx->XferErrorCallback = SPI_DMAError; 1277:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1278:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Reset content of SPI RxDMA descriptor */ 1279:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmarx->XferHalfCpltCallback = (void (*)(DMA_HandleTypeDef *))NULL; 1280:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmarx->XferCpltCallback = (void (*)(DMA_HandleTypeDef *))NULL; 1281:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmarx->XferErrorCallback = (void (*)(DMA_HandleTypeDef *))NULL; 1282:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1283:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable the Tx DMA Channel */ 1284:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_DMA_Start_IT(hspi->hdmatx, (uint32_t)hspi->pTxBuffPtr, (uint32_t)&hspi->Instance->DR, hspi- 1285:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1286:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable Tx DMA Request */ 1287:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->Instance->CR2, SPI_CR2_TXDMAEN); 1288:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ARM GAS /tmp/ccApM0GN.s page 24 1289:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ 1290:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 1291:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1292:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if the SPI is already enabled */ 1293:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->Instance->CR1 &SPI_CR1_SPE) != SPI_CR1_SPE) 1294:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1295:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable SPI peripheral */ 1296:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_ENABLE(hspi); 1297:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1298:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1299:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_OK; 1300:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1301:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 1302:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1303:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ 1304:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 1305:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_BUSY; 1306:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1307:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1308:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1309:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1310:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Receive an amount of data in no-blocking mode with DMA 1311:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 1312:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 1313:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param pData: pointer to data buffer 1314:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @note When the CRC feature is enabled the pData Length must be Size + 1. 1315:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param Size: amount of data to be sent 1316:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval HAL status 1317:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1318:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_StatusTypeDef HAL_SPI_Receive_DMA(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size) 1319:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1320:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->State == HAL_SPI_STATE_READY) 1321:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1322:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((pData == NULL) || (Size == 0U)) 1323:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1324:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ 1325:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 1326:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_ERROR; 1327:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1328:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1329:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Locked */ 1330:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_LOCK(hspi); 1331:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1332:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Configure communication */ 1333:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_BUSY_RX; 1334:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->ErrorCode = HAL_SPI_ERROR_NONE; 1335:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1336:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr = (uint8_t*)pData; 1337:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferSize = Size; 1338:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = Size; 1339:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1340:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /*Init field not used in handle to zero */ 1341:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxISR = 0U; 1342:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxISR = 0U; 1343:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1344:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr = NULL; 1345:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferSize = 0U; ARM GAS /tmp/ccApM0GN.s page 25 1346:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = 0U; 1347:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1348:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Configure communication direction : 1Line */ 1349:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.Direction == SPI_DIRECTION_1LINE) 1350:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1351:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_1LINE_RX(hspi); 1352:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1353:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else if((hspi->Init.Direction == SPI_DIRECTION_2LINES)&&(hspi->Init.Mode == SPI_MODE_MASTER)) 1354:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1355:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ 1356:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 1357:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1358:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Call transmit-receive function to send Dummy data on Tx line and generate clock on CLK lin 1359:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_SPI_TransmitReceive_DMA(hspi, pData, pData, Size); 1360:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1361:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1362:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Reset CRC Calculation */ 1363:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 1364:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1365:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_RESET_CRC(hspi); 1366:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1367:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1368:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Set the SPI RxDMA Half transfer complete callback */ 1369:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmarx->XferHalfCpltCallback = SPI_DMAHalfReceiveCplt; 1370:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1371:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Set the SPI Rx DMA transfer complete callback */ 1372:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmarx->XferCpltCallback = SPI_DMAReceiveCplt; 1373:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1374:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Set the DMA error callback */ 1375:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmarx->XferErrorCallback = SPI_DMAError; 1376:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1377:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Reset content of SPI TxDMA descriptor */ 1378:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmatx->XferHalfCpltCallback = (void (*)(DMA_HandleTypeDef *))NULL; 1379:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmatx->XferCpltCallback = (void (*)(DMA_HandleTypeDef *))NULL; 1380:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmatx->XferErrorCallback = (void (*)(DMA_HandleTypeDef *))NULL; 1381:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1382:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable the Rx DMA Channel */ 1383:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_DMA_Start_IT(hspi->hdmarx, (uint32_t)&hspi->Instance->DR, (uint32_t)hspi->pRxBuffPtr, hspi- 1384:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1385:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable Rx DMA Request */ 1386:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->Instance->CR2, SPI_CR2_RXDMAEN); 1387:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1388:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ 1389:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 1390:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1391:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if the SPI is already enabled */ 1392:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->Instance->CR1 &SPI_CR1_SPE) != SPI_CR1_SPE) 1393:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1394:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable SPI peripheral */ 1395:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_ENABLE(hspi); 1396:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1397:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1398:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_OK; 1399:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1400:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 1401:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1402:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ ARM GAS /tmp/ccApM0GN.s page 26 1403:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 1404:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_BUSY; 1405:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1406:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1407:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1408:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1409:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Transmit and Receive an amount of data in no-blocking mode with DMA 1410:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 1411:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 1412:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param pTxData: pointer to transmission data buffer 1413:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param pRxData: pointer to reception data buffer 1414:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @note When the CRC feature is enabled the pRxData Length must be Size + 1 1415:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param Size: amount of data to be sent 1416:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval HAL status 1417:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1418:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_StatusTypeDef HAL_SPI_TransmitReceive_DMA(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *p 1419:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1420:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->State == HAL_SPI_STATE_READY) || \ 1421:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ((hspi->Init.Mode == SPI_MODE_MASTER) && (hspi->Init.Direction == SPI_DIRECTION_2LINES) && (hs 1422:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1423:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((pTxData == NULL ) || (pRxData == NULL ) || (Size == 0U)) 1424:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1425:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_ERROR; 1426:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1427:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1428:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check the parameters */ 1429:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** assert_param(IS_SPI_DIRECTION_2LINES(hspi->Init.Direction)); 1430:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1431:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process locked */ 1432:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_LOCK(hspi); 1433:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1434:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Don't overwrite in case of HAL_SPI_STATE_BUSY_RX */ 1435:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->State != HAL_SPI_STATE_BUSY_RX) 1436:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1437:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_BUSY_TX_RX; 1438:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1439:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1440:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Configure communication */ 1441:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->ErrorCode = HAL_SPI_ERROR_NONE; 1442:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1443:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr = (uint8_t*)pTxData; 1444:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferSize = Size; 1445:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = Size; 1446:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1447:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr = (uint8_t*)pRxData; 1448:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferSize = Size; 1449:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = Size; 1450:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1451:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /*Init field not used in handle to zero */ 1452:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxISR = 0U; 1453:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxISR = 0U; 1454:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1455:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Reset CRC Calculation */ 1456:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 1457:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1458:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_RESET_CRC(hspi); 1459:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } ARM GAS /tmp/ccApM0GN.s page 27 1460:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1461:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if we are in Rx only or in Rx/Tx Mode and configure the DMA transfer complete callback 1462:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->State == HAL_SPI_STATE_BUSY_RX) 1463:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1464:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Set the SPI Rx DMA Half transfer complete callback */ 1465:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmarx->XferHalfCpltCallback = SPI_DMAHalfReceiveCplt; 1466:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1467:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmarx->XferCpltCallback = SPI_DMAReceiveCplt; 1468:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1469:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 1470:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1471:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Set the SPI Tx/Rx DMA Half transfer complete callback */ 1472:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmarx->XferHalfCpltCallback = SPI_DMAHalfTransmitReceiveCplt; 1473:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1474:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmarx->XferCpltCallback = SPI_DMATransmitReceiveCplt; 1475:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1476:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1477:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Set the DMA error callback */ 1478:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmarx->XferErrorCallback = SPI_DMAError; 1479:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1480:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable the Rx DMA Channel */ 1481:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_DMA_Start_IT(hspi->hdmarx, (uint32_t)&hspi->Instance->DR, (uint32_t)hspi->pRxBuffPtr, hspi- 1482:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1483:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable Rx DMA Request */ 1484:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->Instance->CR2, SPI_CR2_RXDMAEN); 1485:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1486:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Set the SPI Tx DMA transfer complete callback as NULL because the communication closing 1487:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** is performed in DMA reception complete callback */ 1488:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmatx->XferHalfCpltCallback = (void (*)(DMA_HandleTypeDef *))NULL; 1489:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmatx->XferCpltCallback = (void (*)(DMA_HandleTypeDef *))NULL; 1490:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1491:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Set the DMA error callback */ 1492:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmatx->XferErrorCallback = SPI_DMAError; 1493:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1494:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable the Tx DMA Channel */ 1495:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_DMA_Start_IT(hspi->hdmatx, (uint32_t)hspi->pTxBuffPtr, (uint32_t)&hspi->Instance->DR, hspi- 1496:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1497:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if the SPI is already enabled */ 1498:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->Instance->CR1 & SPI_CR1_SPE) != SPI_CR1_SPE) 1499:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1500:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable SPI peripheral */ 1501:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_ENABLE(hspi); 1502:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1503:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1504:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable Tx DMA Request */ 1505:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->Instance->CR2, SPI_CR2_TXDMAEN); 1506:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1507:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ 1508:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 1509:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1510:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_OK; 1511:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1512:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 1513:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1514:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_BUSY; 1515:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1516:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } ARM GAS /tmp/ccApM0GN.s page 28 1517:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1518:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1519:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1520:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Pauses the DMA Transfer. 1521:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 1522:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for the specified SPI module. 1523:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval HAL status 1524:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1525:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_StatusTypeDef HAL_SPI_DMAPause(SPI_HandleTypeDef *hspi) 1526:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1527:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Locked */ 1528:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_LOCK(hspi); 1529:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1530:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disable the SPI DMA Tx & Rx requests */ 1531:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** CLEAR_BIT(hspi->Instance->CR2, SPI_CR2_TXDMAEN); 1532:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** CLEAR_BIT(hspi->Instance->CR2, SPI_CR2_RXDMAEN); 1533:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1534:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ 1535:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 1536:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1537:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_OK; 1538:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1539:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1540:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1541:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Resumes the DMA Transfer. 1542:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 1543:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for the specified SPI module. 1544:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval HAL status 1545:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1546:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_StatusTypeDef HAL_SPI_DMAResume(SPI_HandleTypeDef *hspi) 1547:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1548:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Locked */ 1549:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_LOCK(hspi); 1550:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1551:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable the SPI DMA Tx & Rx requests */ 1552:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->Instance->CR2, SPI_CR2_TXDMAEN); 1553:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->Instance->CR2, SPI_CR2_RXDMAEN); 1554:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1555:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ 1556:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 1557:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1558:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_OK; 1559:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1560:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1561:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1562:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Stops the DMA Transfer. 1563:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 1564:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for the specified SPI module. 1565:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval HAL status 1566:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1567:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_StatusTypeDef HAL_SPI_DMAStop(SPI_HandleTypeDef *hspi) 1568:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1569:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* The Lock is not implemented on this API to allow the user application 1570:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** to call the HAL SPI API under callbacks HAL_SPI_TxCpltCallback() or HAL_SPI_RxCpltCallback() o 1571:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** when calling HAL_DMA_Abort() API the DMA TX/RX Transfer complete interrupt is generated 1572:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** and the correspond call back is executed HAL_SPI_TxCpltCallback() or HAL_SPI_RxCpltCallback() 1573:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ ARM GAS /tmp/ccApM0GN.s page 29 1574:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1575:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Abort the SPI DMA tx Channel */ 1576:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->hdmatx != NULL) 1577:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1578:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_DMA_Abort(hspi->hdmatx); 1579:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1580:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Abort the SPI DMA rx Channel */ 1581:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->hdmarx != NULL) 1582:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1583:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_DMA_Abort(hspi->hdmarx); 1584:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1585:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1586:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disable the SPI DMA Tx & Rx requests */ 1587:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** CLEAR_BIT(hspi->Instance->CR2, SPI_CR2_TXDMAEN); 1588:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** CLEAR_BIT(hspi->Instance->CR2, SPI_CR2_RXDMAEN); 1589:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1590:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_READY; 1591:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1592:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_OK; 1593:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1594:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1595:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1596:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief This function handles SPI interrupt request. 1597:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 1598:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 1599:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval HAL status 1600:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1601:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** void HAL_SPI_IRQHandler(SPI_HandleTypeDef *hspi) 1602:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1603:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* SPI in mode Receiver and Overrun not occurred ---------------------------*/ 1604:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((__HAL_SPI_GET_IT_SOURCE(hspi, SPI_IT_RXNE) != RESET) && (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_RX 1605:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1606:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxISR(hspi); 1607:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return; 1608:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1609:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1610:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* SPI in mode Tramitter ---------------------------------------------------*/ 1611:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((__HAL_SPI_GET_IT_SOURCE(hspi, SPI_IT_TXE) != RESET) && (__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_TXE 1612:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1613:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxISR(hspi); 1614:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return; 1615:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1616:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1617:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(__HAL_SPI_GET_IT_SOURCE(hspi, SPI_IT_ERR) != RESET) 1618:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1619:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* SPI CRC error interrupt occurred ---------------------------------------*/ 1620:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_CRCERR) != RESET) 1621:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1622:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_CRC); 1623:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_CLEAR_CRCERRFLAG(hspi); 1624:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1625:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* SPI Mode Fault error interrupt occurred --------------------------------*/ 1626:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_MODF) != RESET) 1627:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1628:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_MODF); 1629:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_CLEAR_MODFFLAG(hspi); 1630:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } ARM GAS /tmp/ccApM0GN.s page 30 1631:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1632:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* SPI Overrun error interrupt occurred -----------------------------------*/ 1633:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_OVR) != RESET) 1634:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1635:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->State != HAL_SPI_STATE_BUSY_TX) 1636:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1637:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_OVR); 1638:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_CLEAR_OVRFLAG(hspi); 1639:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1640:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1641:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1642:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* SPI Frame error interrupt occurred -------------------------------------*/ 1643:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_FRE) != RESET) 1644:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1645:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_FRE); 1646:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_CLEAR_FREFLAG(hspi); 1647:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1648:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1649:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Call the Error call Back in case of Errors */ 1650:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->ErrorCode!=HAL_SPI_ERROR_NONE) 1651:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1652:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_DISABLE_IT(hspi, SPI_IT_RXNE | SPI_IT_TXE | SPI_IT_ERR); 1653:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_READY; 1654:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_ErrorCallback(hspi); 1655:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1656:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1657:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1658:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1659:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1660:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Tx Transfer completed callbacks 1661:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 1662:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 1663:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval None 1664:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1665:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __weak void HAL_SPI_TxCpltCallback(SPI_HandleTypeDef *hspi) 1666:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1667:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Prevent unused argument(s) compilation warning */ 1668:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** UNUSED(hspi); 1669:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1670:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* NOTE : This function Should not be modified, when the callback is needed, 1671:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** the HAL_SPI_TxCpltCallback could be implenetd in the user file 1672:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1673:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1674:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1675:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1676:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Rx Transfer completed callbacks 1677:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 1678:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 1679:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval None 1680:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1681:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __weak void HAL_SPI_RxCpltCallback(SPI_HandleTypeDef *hspi) 1682:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1683:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Prevent unused argument(s) compilation warning */ 1684:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** UNUSED(hspi); 1685:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1686:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* NOTE : This function Should not be modified, when the callback is needed, 1687:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** the HAL_SPI_RxCpltCallback() could be implenetd in the user file ARM GAS /tmp/ccApM0GN.s page 31 1688:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1689:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1690:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1691:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1692:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Tx and Rx Transfer completed callbacks 1693:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 1694:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 1695:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval None 1696:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1697:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __weak void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi) 1698:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1699:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Prevent unused argument(s) compilation warning */ 1700:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** UNUSED(hspi); 1701:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1702:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* NOTE : This function Should not be modified, when the callback is needed, 1703:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** the HAL_SPI_TxRxCpltCallback() could be implenetd in the user file 1704:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1705:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1706:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1707:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1708:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Tx Half Transfer completed callbacks 1709:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 1710:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 1711:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval None 1712:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1713:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __weak void HAL_SPI_TxHalfCpltCallback(SPI_HandleTypeDef *hspi) 1714:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1715:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Prevent unused argument(s) compilation warning */ 1716:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** UNUSED(hspi); 1717:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1718:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* NOTE : This function Should not be modified, when the callback is needed, 1719:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** the HAL_SPI_TxHalfCpltCallback could be implenetd in the user file 1720:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1721:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1722:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1723:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1724:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Rx Half Transfer completed callbacks 1725:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 1726:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 1727:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval None 1728:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1729:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __weak void HAL_SPI_RxHalfCpltCallback(SPI_HandleTypeDef *hspi) 1730:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1731:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Prevent unused argument(s) compilation warning */ 1732:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** UNUSED(hspi); 1733:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1734:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* NOTE : This function Should not be modified, when the callback is needed, 1735:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** the HAL_SPI_RxHalfCpltCallback() could be implenetd in the user file 1736:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1737:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1738:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1739:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1740:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Tx and Rx Transfer completed callbacks 1741:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 1742:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 1743:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval None 1744:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ ARM GAS /tmp/ccApM0GN.s page 32 1745:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __weak void HAL_SPI_TxRxHalfCpltCallback(SPI_HandleTypeDef *hspi) 1746:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1747:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Prevent unused argument(s) compilation warning */ 1748:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** UNUSED(hspi); 1749:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1750:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* NOTE : This function Should not be modified, when the callback is needed, 1751:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** the HAL_SPI_TxRxHalfCpltCallback() could be implenetd in the user file 1752:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1753:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1754:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1755:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1756:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief SPI error callbacks 1757:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 1758:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 1759:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval None 1760:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1761:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __weak void HAL_SPI_ErrorCallback(SPI_HandleTypeDef *hspi) 1762:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1763:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Prevent unused argument(s) compilation warning */ 1764:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** UNUSED(hspi); 1765:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1766:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* NOTE : - This function Should not be modified, when the callback is needed, 1767:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** the HAL_SPI_ErrorCallback() could be implenetd in the user file. 1768:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** - The ErrorCode parameter in the hspi handle is updated by the SPI processes 1769:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** and user can use HAL_SPI_GetError() API to check the latest error occurred. 1770:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1771:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1772:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1773:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1774:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @} 1775:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1776:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1777:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** @addtogroup SPI_Exported_Functions_Group3 Peripheral State and Errors functions 1778:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief SPI control functions 1779:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * 1780:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** @verbatim 1781:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** =============================================================================== 1782:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ##### Peripheral State and Errors functions ##### 1783:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** =============================================================================== 1784:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** [..] 1785:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** This subsection provides a set of functions allowing to control the SPI. 1786:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (+) HAL_SPI_GetState() API can be helpful to check in run-time the state of the SPI peripheral 1787:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (+) HAL_SPI_GetError() check in run-time Errors occurring during communication 1788:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** @endverbatim 1789:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @{ 1790:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1791:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1792:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1793:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Return the SPI state 1794:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 1795:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 1796:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval SPI state 1797:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1798:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_StateTypeDef HAL_SPI_GetState(SPI_HandleTypeDef *hspi) 1799:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1800:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return hspi->State; 1801:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } ARM GAS /tmp/ccApM0GN.s page 33 1802:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1803:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1804:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Return the SPI error code 1805:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 1806:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 1807:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval SPI Error Code 1808:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1809:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** uint32_t HAL_SPI_GetError(SPI_HandleTypeDef *hspi) 1810:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1811:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return hspi->ErrorCode; 1812:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1813:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1814:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1815:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @} 1816:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1817:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1818:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1819:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @} 1820:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1821:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1822:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1823:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1824:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** @addtogroup SPI_Private 1825:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @{ 1826:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1827:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1828:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1829:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1830:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Interrupt Handler to close Tx transfer 1831:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 1832:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 1833:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval void 1834:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1835:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_TxCloseIRQHandler(SPI_HandleTypeDef *hspi) 1836:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1837:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until TXE flag is set to send data */ 1838:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_TXE, RESET, SPI_TIMEOUT_VALUE) != HAL_OK) 1839:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1840:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_FLAG); 1841:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1842:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1843:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disable TXE interrupt */ 1844:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_DISABLE_IT(hspi, (SPI_IT_TXE)); 1845:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1846:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disable ERR interrupt if Receive process is finished */ 1847:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(__HAL_SPI_GET_IT_SOURCE(hspi, SPI_IT_RXNE) == RESET) 1848:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1849:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_DISABLE_IT(hspi, (SPI_IT_ERR)); 1850:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1851:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until Busy flag is reset before disabling SPI */ 1852:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_BSY, SET, SPI_TIMEOUT_VALUE) != HAL_OK) 1853:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1854:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_FLAG); 1855:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1856:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1857:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Clear OVERUN flag in 2 Lines communication mode because received is not read */ 1858:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.Direction == SPI_DIRECTION_2LINES) ARM GAS /tmp/ccApM0GN.s page 34 1859:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1860:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_CLEAR_OVRFLAG(hspi); 1861:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1862:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1863:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if Errors has been detected during transfer */ 1864:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->ErrorCode == HAL_SPI_ERROR_NONE) 1865:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1866:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if we are in Tx or in Rx/Tx Mode */ 1867:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->State == HAL_SPI_STATE_BUSY_TX_RX) 1868:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1869:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Set state to READY before run the Callback Complete */ 1870:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_READY; 1871:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_TxRxCpltCallback(hspi); 1872:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1873:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 1874:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1875:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Set state to READY before run the Callback Complete */ 1876:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_READY; 1877:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_TxCpltCallback(hspi); 1878:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1879:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1880:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 1881:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1882:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Set state to READY before run the Callback Complete */ 1883:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_READY; 1884:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Call Error call back in case of Error */ 1885:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_ErrorCallback(hspi); 1886:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1887:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1888:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1889:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1890:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1891:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Interrupt Handler to transmit amount of data in no-blocking mode 1892:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 1893:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 1894:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval void 1895:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1896:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_TxISR(SPI_HandleTypeDef *hspi) 1897:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1898:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Transmit data in 8 Bit mode */ 1899:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.DataSize == SPI_DATASIZE_8BIT) 1900:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1901:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->Instance->DR = (*hspi->pTxBuffPtr++); 1902:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1903:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Transmit data in 16 Bit mode */ 1904:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 1905:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1906:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->Instance->DR = *((uint16_t*)hspi->pTxBuffPtr); 1907:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr+=2U; 1908:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1909:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount--; 1910:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1911:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->TxXferCount == 0U) 1912:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1913:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 1914:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1915:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* calculate and transfer CRC on Tx line */ ARM GAS /tmp/ccApM0GN.s page 35 1916:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->Instance->CR1, SPI_CR1_CRCNEXT); 1917:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1918:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_TxCloseIRQHandler(hspi); 1919:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1920:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1921:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1922:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 1923:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Interrupt Handler to close Rx transfer 1924:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 1925:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 1926:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval void 1927:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 1928:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_RxCloseIRQHandler(SPI_HandleTypeDef *hspi) 1929:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1930:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __IO uint16_t tmpreg = 0U; 1931:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1932:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 1933:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1934:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until RXNE flag is set to read CRC data */ 1935:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_RXNE, RESET, SPI_TIMEOUT_VALUE) != HAL_OK) 1936:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1937:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_FLAG); 1938:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1939:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1940:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Read CRC to reset RXNE flag */ 1941:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** tmpreg = hspi->Instance->DR; 1942:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** UNUSED(tmpreg); /* avoid warning on tmpreg affectation with some compiler */ 1943:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1944:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until RXNE flag is reset */ 1945:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_RXNE, SET, SPI_TIMEOUT_VALUE) != HAL_OK) 1946:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1947:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_FLAG); 1948:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1949:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1950:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if CRC error occurred */ 1951:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_CRCERR) != RESET) 1952:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1953:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_CRC); 1954:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1955:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Reset CRC Calculation */ 1956:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_RESET_CRC(hspi); 1957:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1958:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1959:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1960:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disable RXNE interrupt */ 1961:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_DISABLE_IT(hspi, (SPI_IT_RXNE)); 1962:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1963:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* if Transmit process is finished */ 1964:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(__HAL_SPI_GET_IT_SOURCE(hspi, SPI_IT_TXE) == RESET) 1965:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1966:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disable ERR interrupt */ 1967:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_DISABLE_IT(hspi, (SPI_IT_ERR)); 1968:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1969:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->Init.Mode == SPI_MODE_MASTER)&&((hspi->Init.Direction == SPI_DIRECTION_1LINE)||(hspi- 1970:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1971:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disable SPI peripheral */ 1972:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_DISABLE(hspi); ARM GAS /tmp/ccApM0GN.s page 36 1973:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1974:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1975:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if Errors has been detected during transfer */ 1976:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->ErrorCode == HAL_SPI_ERROR_NONE) 1977:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1978:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if we are in Rx or in Rx/Tx Mode */ 1979:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->State == HAL_SPI_STATE_BUSY_TX_RX) 1980:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1981:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Set state to READY before run the Callback Complete */ 1982:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_READY; 1983:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_TxRxCpltCallback(hspi); 1984:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1985:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 1986:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1987:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Set state to READY before run the Callback Complete */ 1988:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_READY; 1989:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_RxCpltCallback(hspi); 1990:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1991:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1992:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 1993:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1994:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Set state to READY before run the Callback Complete */ 1995:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_READY; 1996:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Call Error call back in case of Error */ 1997:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_ErrorCallback(hspi); 1998:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1999:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2000:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2001:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2002:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 2003:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Interrupt Handler to receive amount of data in 2Lines mode 2004:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 2005:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 2006:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval void 2007:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 2008:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_2LinesRxISR(SPI_HandleTypeDef *hspi) 2009:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2010:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Receive data in 8 Bit mode */ 2011:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.DataSize == SPI_DATASIZE_8BIT) 2012:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2013:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (*hspi->pRxBuffPtr++) = hspi->Instance->DR; 2014:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2015:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Receive data in 16 Bit mode */ 2016:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 2017:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2018:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** *((uint16_t*)hspi->pRxBuffPtr) = hspi->Instance->DR; 2019:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr+=2U; 2020:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2021:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount--; 2022:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2023:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->RxXferCount==0U) 2024:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2025:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_RxCloseIRQHandler(hspi); 2026:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2027:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2028:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2029:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** ARM GAS /tmp/ccApM0GN.s page 37 2030:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief Interrupt Handler to receive amount of data in no-blocking mode 2031:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 2032:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 2033:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval void 2034:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 2035:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_RxISR(SPI_HandleTypeDef *hspi) 2036:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2037:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Receive data in 8 Bit mode */ 2038:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.DataSize == SPI_DATASIZE_8BIT) 2039:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2040:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** (*hspi->pRxBuffPtr++) = hspi->Instance->DR; 2041:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2042:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Receive data in 16 Bit mode */ 2043:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 2044:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2045:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** *((uint16_t*)hspi->pRxBuffPtr) = hspi->Instance->DR; 2046:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr+=2U; 2047:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2048:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount--; 2049:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2050:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Enable CRC Transmission */ 2051:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->RxXferCount == 1U) && (hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE)) 2052:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2053:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Set CRC Next to calculate CRC on Rx side */ 2054:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->Instance->CR1, SPI_CR1_CRCNEXT); 2055:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2056:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2057:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->RxXferCount == 0U) 2058:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2059:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_RxCloseIRQHandler(hspi); 2060:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2061:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2062:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2063:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 2064:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief DMA SPI transmit process complete callback 2065:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hdma: pointer to a DMA_HandleTypeDef structure that contains 2066:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for the specified DMA module. 2067:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval None 2068:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 2069:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_DMATransmitCplt(DMA_HandleTypeDef *hdma) 2070:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2071:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_HandleTypeDef* hspi = ( SPI_HandleTypeDef* )((DMA_HandleTypeDef* )hdma)->Parent; 2072:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2073:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2074:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* DMA Normal Mode */ 2075:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hdma->Instance->CCR & DMA_CCR_CIRC) == 0U) 2076:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2077:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until TXE flag is set to send data */ 2078:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_TXE, RESET, SPI_TIMEOUT_VALUE) != HAL_OK) 2079:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2080:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_FLAG); 2081:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2082:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2083:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disable Tx DMA Request */ 2084:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** CLEAR_BIT(hspi->Instance->CR2, SPI_CR2_TXDMAEN); 2085:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2086:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until Busy flag is reset before disabling SPI */ ARM GAS /tmp/ccApM0GN.s page 38 2087:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_BSY, SET, SPI_TIMEOUT_VALUE) != HAL_OK) 2088:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2089:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_FLAG); 2090:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2091:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2092:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = 0U; 2093:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_READY; 2094:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2095:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2096:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Clear OVERUN flag in 2 Lines communication mode because received is not read */ 2097:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.Direction == SPI_DIRECTION_2LINES) 2098:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2099:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_CLEAR_OVRFLAG(hspi); 2100:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2101:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2102:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if Errors has been detected during transfer */ 2103:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->ErrorCode != HAL_SPI_ERROR_NONE) 2104:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2105:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_ErrorCallback(hspi); 2106:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2107:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 2108:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2109:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_TxCpltCallback(hspi); 2110:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2111:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2112:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2113:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 2114:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief DMA SPI receive process complete callback 2115:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hdma: pointer to a DMA_HandleTypeDef structure that contains 2116:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for the specified DMA module. 2117:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval None 2118:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 2119:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_DMAReceiveCplt(DMA_HandleTypeDef *hdma) 2120:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2121:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __IO uint16_t tmpreg = 0U; 2122:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2123:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_HandleTypeDef* hspi = ( SPI_HandleTypeDef* )((DMA_HandleTypeDef* )hdma)->Parent; 2124:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2125:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* DMA Normal mode */ 2126:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hdma->Instance->CCR & DMA_CCR_CIRC) == 0U) 2127:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2128:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disable Rx DMA Request */ 2129:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** CLEAR_BIT(hspi->Instance->CR2, SPI_CR2_RXDMAEN); 2130:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2131:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disable Tx DMA Request (done by default to handle the case Master RX direction 2 lines) */ 2132:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** CLEAR_BIT(hspi->Instance->CR2, SPI_CR2_TXDMAEN); 2133:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2134:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* CRC Calculation handling */ 2135:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 2136:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2137:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until RXNE flag is set (CRC ready) */ 2138:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_RXNE, RESET, SPI_TIMEOUT_VALUE) != HAL_OK) 2139:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2140:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_FLAG); 2141:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2142:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2143:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Read CRC */ ARM GAS /tmp/ccApM0GN.s page 39 2144:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** tmpreg = hspi->Instance->DR; 2145:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** UNUSED(tmpreg); /* avoid warning on tmpreg affectation with some compiler */ 2146:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2147:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until RXNE flag is reset */ 2148:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_RXNE, SET, SPI_TIMEOUT_VALUE) != HAL_OK) 2149:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2150:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_FLAG); 2151:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2152:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2153:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if CRC error occurred */ 2154:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_CRCERR) != RESET) 2155:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2156:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_CRC); 2157:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_CLEAR_CRCERRFLAG(hspi); 2158:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2159:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2160:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2161:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->Init.Mode == SPI_MODE_MASTER)&&((hspi->Init.Direction == SPI_DIRECTION_1LINE)||(hspi- 2162:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2163:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disable SPI peripheral */ 2164:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_DISABLE(hspi); 2165:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2166:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2167:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = 0U; 2168:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_READY; 2169:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2170:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if Errors has been detected during transfer */ 2171:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->ErrorCode != HAL_SPI_ERROR_NONE) 2172:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2173:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_ErrorCallback(hspi); 2174:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2175:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 2176:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2177:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_RxCpltCallback(hspi); 2178:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2179:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2180:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 2181:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2182:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_RxCpltCallback(hspi); 2183:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2184:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2185:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2186:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 2187:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief DMA SPI transmit receive process complete callback 2188:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hdma: pointer to a DMA_HandleTypeDef structure that contains 2189:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for the specified DMA module. 2190:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval None 2191:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 2192:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_DMATransmitReceiveCplt(DMA_HandleTypeDef *hdma) 2193:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2194:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __IO uint16_t tmpreg = 0U; 2195:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2196:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_HandleTypeDef* hspi = ( SPI_HandleTypeDef* )((DMA_HandleTypeDef* )hdma)->Parent; 2197:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hdma->Instance->CCR & DMA_CCR_CIRC) == 0U) 2198:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2199:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* CRC Calculation handling */ 2200:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) ARM GAS /tmp/ccApM0GN.s page 40 2201:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2202:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if CRC is done on going (RXNE flag set) */ 2203:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_RXNE, SET, SPI_TIMEOUT_VALUE) == HAL_OK) 2204:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2205:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until RXNE flag is set to send data */ 2206:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_RXNE, RESET, SPI_TIMEOUT_VALUE) != HAL_OK) 2207:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2208:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_FLAG); 2209:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2210:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2211:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Read CRC */ 2212:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** tmpreg = hspi->Instance->DR; 2213:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** UNUSED(tmpreg); /* avoid warning on tmpreg affectation with some compiler */ 2214:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2215:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if CRC error occurred */ 2216:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(__HAL_SPI_GET_FLAG(hspi, SPI_FLAG_CRCERR) != RESET) 2217:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2218:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_CRC); 2219:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_CLEAR_CRCERRFLAG(hspi); 2220:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2221:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2222:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2223:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until TXE flag is set to send data */ 2224:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_TXE, RESET, SPI_TIMEOUT_VALUE) != HAL_OK) 2225:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2226:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_FLAG); 2227:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2228:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2229:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disable Tx DMA Request */ 2230:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** CLEAR_BIT(hspi->Instance->CR2, SPI_CR2_TXDMAEN); 2231:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2232:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until Busy flag is reset before disabling SPI */ 2233:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(SPI_WaitOnFlagUntilTimeout(hspi, SPI_FLAG_BSY, SET, SPI_TIMEOUT_VALUE) != HAL_OK) 2234:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2235:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_FLAG); 2236:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2237:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2238:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disable Rx DMA Request */ 2239:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** CLEAR_BIT(hspi->Instance->CR2, SPI_CR2_RXDMAEN); 2240:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2241:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = 0U; 2242:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = 0U; 2243:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2244:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_READY; 2245:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2246:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check if Errors has been detected during transfer */ 2247:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->ErrorCode != HAL_SPI_ERROR_NONE) 2248:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2249:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_ErrorCallback(hspi); 2250:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2251:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 2252:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2253:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_TxRxCpltCallback(hspi); 2254:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2255:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2256:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 2257:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { ARM GAS /tmp/ccApM0GN.s page 41 2258:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_TxRxCpltCallback(hspi); 2259:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2260:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2261:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2262:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 2263:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief DMA SPI half transmit process complete callback 2264:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hdma: pointer to a DMA_HandleTypeDef structure that contains 2265:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for the specified DMA module. 2266:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval None 2267:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 2268:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_DMAHalfTransmitCplt(DMA_HandleTypeDef *hdma) 2269:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2270:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_HandleTypeDef* hspi = ( SPI_HandleTypeDef* )((DMA_HandleTypeDef* )hdma)->Parent; 2271:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2272:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_TxHalfCpltCallback(hspi); 2273:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2274:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2275:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 2276:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief DMA SPI half receive process complete callback 2277:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hdma: pointer to a DMA_HandleTypeDef structure that contains 2278:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for the specified DMA module. 2279:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval None 2280:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 2281:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_DMAHalfReceiveCplt(DMA_HandleTypeDef *hdma) 2282:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2283:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_HandleTypeDef* hspi = ( SPI_HandleTypeDef* )((DMA_HandleTypeDef* )hdma)->Parent; 2284:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2285:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_RxHalfCpltCallback(hspi); 2286:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2287:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2288:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 2289:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief DMA SPI Half transmit receive process complete callback 2290:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hdma: pointer to a DMA_HandleTypeDef structure that contains 2291:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for the specified DMA module. 2292:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval None 2293:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 2294:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_DMAHalfTransmitReceiveCplt(DMA_HandleTypeDef *hdma) 2295:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2296:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_HandleTypeDef* hspi = ( SPI_HandleTypeDef* )((DMA_HandleTypeDef* )hdma)->Parent; 2297:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2298:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_TxRxHalfCpltCallback(hspi); 2299:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2300:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2301:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 2302:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief DMA SPI communication error callback 2303:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hdma: pointer to a DMA_HandleTypeDef structure that contains 2304:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for the specified DMA module. 2305:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval None 2306:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 2307:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static void SPI_DMAError(DMA_HandleTypeDef *hdma) 2308:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2309:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_HandleTypeDef* hspi = (SPI_HandleTypeDef* )((DMA_HandleTypeDef* )hdma)->Parent; 2310:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = 0U; 2311:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = 0U; 2312:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State= HAL_SPI_STATE_READY; 2313:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_DMA); 2314:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_ErrorCallback(hspi); ARM GAS /tmp/ccApM0GN.s page 42 2315:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2316:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2317:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /** 2318:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @brief This function handles SPI Communication Timeout. 2319:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param hspi: pointer to a SPI_HandleTypeDef structure that contains 2320:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * the configuration information for SPI module. 2321:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param Flag: SPI flag to check 2322:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param Status: Flag status to check: RESET or set 2323:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @param Timeout: Timeout duration 2324:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** * @retval HAL status 2325:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** */ 2326:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** static HAL_StatusTypeDef SPI_WaitOnFlagUntilTimeout(SPI_HandleTypeDef *hspi, uint32_t Flag, FlagSta 2327:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 25 .loc 1 2327 0 26 .cfi_startproc 27 @ args = 0, pretend = 0, frame = 0 28 @ frame_needed = 0, uses_anonymous_args = 0 29 .LVL0: 30 0000 F0B5 push {r4, r5, r6, r7, lr} 31 .LCFI0: 32 .cfi_def_cfa_offset 20 33 .cfi_offset 4, -20 34 .cfi_offset 5, -16 35 .cfi_offset 6, -12 36 .cfi_offset 7, -8 37 .cfi_offset 14, -4 38 0002 C646 mov lr, r8 39 0004 00B5 push {lr} 40 .LCFI1: 41 .cfi_def_cfa_offset 24 42 .cfi_offset 8, -24 43 0006 0600 movs r6, r0 44 0008 0C00 movs r4, r1 45 000a 1700 movs r7, r2 46 000c 1D00 movs r5, r3 47 .LVL1: 2328:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** uint32_t tickstart = 0U; 2329:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2330:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Get tick */ 2331:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** tickstart = HAL_GetTick(); 48 .loc 1 2331 0 49 000e FFF7FEFF bl HAL_GetTick 50 .LVL2: 51 0012 8046 mov r8, r0 52 .LVL3: 2332:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2333:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Wait until flag is set */ 2334:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(Status == RESET) 53 .loc 1 2334 0 54 0014 002F cmp r7, #0 55 0016 31D0 beq .L4 56 .LVL4: 57 .L9: 2335:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2336:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** while(__HAL_SPI_GET_FLAG(hspi, Flag) == RESET) 2337:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2338:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(Timeout != HAL_MAX_DELAY) ARM GAS /tmp/ccApM0GN.s page 43 2339:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2340:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((Timeout == 0U) || ((HAL_GetTick() - tickstart ) > Timeout)) 2341:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2342:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disable the SPI and reset the CRC: the CRC value should be cleared 2343:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** on both master and slave sides in order to resynchronize the master 2344:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** and slave for their respective CRC calculation */ 2345:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2346:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disable TXE, RXNE and ERR interrupts for the interrupt process */ 2347:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_DISABLE_IT(hspi, (uint32_t)(SPI_IT_TXE | SPI_IT_RXNE | SPI_IT_ERR)); 2348:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2349:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disable SPI peripheral */ 2350:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_DISABLE(hspi); 2351:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2352:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Reset CRC Calculation */ 2353:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 2354:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2355:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_RESET_CRC(hspi); 2356:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2357:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2358:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State= HAL_SPI_STATE_READY; 2359:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2360:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ 2361:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 2362:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2363:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 2364:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2365:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2366:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2367:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2368:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** else 2369:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2370:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** while(__HAL_SPI_GET_FLAG(hspi, Flag) != RESET) 58 .loc 1 2370 0 59 0018 3368 ldr r3, [r6] 60 001a 9B68 ldr r3, [r3, #8] 61 001c 2340 ands r3, r4 62 001e A342 cmp r3, r4 63 0020 62D1 bne .L13 2371:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2372:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(Timeout != HAL_MAX_DELAY) 64 .loc 1 2372 0 65 0022 6B1C adds r3, r5, #1 66 0024 F8D0 beq .L9 2373:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2374:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((Timeout == 0U) || ((HAL_GetTick() - tickstart ) > Timeout)) 67 .loc 1 2374 0 68 0026 002D cmp r5, #0 69 0028 05D0 beq .L10 70 .loc 1 2374 0 is_stmt 0 discriminator 1 71 002a FFF7FEFF bl HAL_GetTick 72 .LVL5: 73 002e 4346 mov r3, r8 74 0030 C01A subs r0, r0, r3 75 0032 A842 cmp r0, r5 76 0034 F0D9 bls .L9 77 .L10: 2375:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { ARM GAS /tmp/ccApM0GN.s page 44 2376:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disable the SPI and reset the CRC: the CRC value should be cleared 2377:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** on both master and slave sides in order to resynchronize the master 2378:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** and slave for their respective CRC calculation */ 2379:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2380:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disable TXE, RXNE and ERR interrupts for the interrupt process */ 2381:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_DISABLE_IT(hspi, (uint32_t)(SPI_IT_TXE | SPI_IT_RXNE | SPI_IT_ERR)); 78 .loc 1 2381 0 is_stmt 1 79 0036 3268 ldr r2, [r6] 80 0038 5368 ldr r3, [r2, #4] 81 003a E021 movs r1, #224 82 003c 8B43 bics r3, r1 83 003e 5360 str r3, [r2, #4] 2382:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2383:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Disable SPI peripheral */ 2384:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_DISABLE(hspi); 84 .loc 1 2384 0 85 0040 3268 ldr r2, [r6] 86 0042 1368 ldr r3, [r2] 87 0044 A039 subs r1, r1, #160 88 0046 8B43 bics r3, r1 89 0048 1360 str r3, [r2] 2385:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2386:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Reset CRC Calculation */ 2387:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) 90 .loc 1 2387 0 91 004a 8023 movs r3, #128 92 004c 9B01 lsls r3, r3, #6 93 004e B26A ldr r2, [r6, #40] 94 0050 9A42 cmp r2, r3 95 0052 3DD0 beq .L14 96 .L11: 2388:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2389:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_RESET_CRC(hspi); 2390:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2391:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2392:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State= HAL_SPI_STATE_READY; 97 .loc 1 2392 0 98 0054 5123 movs r3, #81 99 0056 0122 movs r2, #1 100 0058 F254 strb r2, [r6, r3] 2393:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2394:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Unlocked */ 2395:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_UNLOCK(hspi); 101 .loc 1 2395 0 102 005a 013B subs r3, r3, #1 103 005c 0022 movs r2, #0 104 005e F254 strb r2, [r6, r3] 2396:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2397:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 105 .loc 1 2397 0 106 0060 0320 movs r0, #3 107 0062 32E0 b .L7 108 .L16: 2355:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 109 .loc 1 2355 0 110 0064 3268 ldr r2, [r6] 111 0066 1368 ldr r3, [r2] ARM GAS /tmp/ccApM0GN.s page 45 112 0068 2049 ldr r1, .L17 113 006a 0B40 ands r3, r1 114 006c 1360 str r3, [r2] 115 006e 3268 ldr r2, [r6] 116 0070 1168 ldr r1, [r2] 117 0072 8023 movs r3, #128 118 0074 9B01 lsls r3, r3, #6 119 0076 0B43 orrs r3, r1 120 0078 1360 str r3, [r2] 121 007a 1DE0 b .L6 122 .L4: 2336:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 123 .loc 1 2336 0 124 007c 3368 ldr r3, [r6] 125 007e 9B68 ldr r3, [r3, #8] 126 0080 2340 ands r3, r4 127 0082 A342 cmp r3, r4 128 0084 20D0 beq .L15 2338:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 129 .loc 1 2338 0 130 0086 6B1C adds r3, r5, #1 131 0088 F8D0 beq .L4 2340:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 132 .loc 1 2340 0 133 008a 002D cmp r5, #0 134 008c 05D0 beq .L5 2340:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 135 .loc 1 2340 0 is_stmt 0 discriminator 1 136 008e FFF7FEFF bl HAL_GetTick 137 .LVL6: 138 0092 4346 mov r3, r8 139 0094 C01A subs r0, r0, r3 140 0096 A842 cmp r0, r5 141 0098 F0D9 bls .L4 142 .L5: 2347:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 143 .loc 1 2347 0 is_stmt 1 144 009a 3268 ldr r2, [r6] 145 009c 5368 ldr r3, [r2, #4] 146 009e E021 movs r1, #224 147 00a0 8B43 bics r3, r1 148 00a2 5360 str r3, [r2, #4] 2350:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 149 .loc 1 2350 0 150 00a4 3268 ldr r2, [r6] 151 00a6 1368 ldr r3, [r2] 152 00a8 A039 subs r1, r1, #160 153 00aa 8B43 bics r3, r1 154 00ac 1360 str r3, [r2] 2353:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 155 .loc 1 2353 0 156 00ae 8023 movs r3, #128 157 00b0 9B01 lsls r3, r3, #6 158 00b2 B26A ldr r2, [r6, #40] 159 00b4 9A42 cmp r2, r3 160 00b6 D5D0 beq .L16 161 .L6: ARM GAS /tmp/ccApM0GN.s page 46 2358:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 162 .loc 1 2358 0 163 00b8 5123 movs r3, #81 164 00ba 0122 movs r2, #1 165 00bc F254 strb r2, [r6, r3] 2361:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 166 .loc 1 2361 0 167 00be 013B subs r3, r3, #1 168 00c0 0022 movs r2, #0 169 00c2 F254 strb r2, [r6, r3] 2363:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 170 .loc 1 2363 0 171 00c4 0320 movs r0, #3 172 00c6 00E0 b .L7 173 .L15: 2398:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2399:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2400:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2401:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2402:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_OK; 174 .loc 1 2402 0 175 00c8 0020 movs r0, #0 176 .L7: 2403:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 177 .loc 1 2403 0 178 @ sp needed 179 .LVL7: 180 .LVL8: 181 .LVL9: 182 .LVL10: 183 00ca 04BC pop {r2} 184 00cc 9046 mov r8, r2 185 00ce F0BD pop {r4, r5, r6, r7, pc} 186 .LVL11: 187 .L14: 2389:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 188 .loc 1 2389 0 189 00d0 3268 ldr r2, [r6] 190 00d2 1368 ldr r3, [r2] 191 00d4 0549 ldr r1, .L17 192 00d6 0B40 ands r3, r1 193 00d8 1360 str r3, [r2] 194 00da 3268 ldr r2, [r6] 195 00dc 1168 ldr r1, [r2] 196 00de 8023 movs r3, #128 197 00e0 9B01 lsls r3, r3, #6 198 00e2 0B43 orrs r3, r1 199 00e4 1360 str r3, [r2] 200 00e6 B5E7 b .L11 201 .L13: 2402:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 202 .loc 1 2402 0 203 00e8 0020 movs r0, #0 204 00ea EEE7 b .L7 205 .L18: 206 .align 2 207 .L17: ARM GAS /tmp/ccApM0GN.s page 47 208 00ec FFDFFFFF .word -8193 209 .cfi_endproc 210 .LFE77: 212 .section .text.HAL_SPI_MspInit,"ax",%progbits 213 .align 1 214 .weak HAL_SPI_MspInit 215 .syntax unified 216 .code 16 217 .thumb_func 218 .fpu softvfp 220 HAL_SPI_MspInit: 221 .LFB41: 337:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Prevent unused argument(s) compilation warning */ 222 .loc 1 337 0 223 .cfi_startproc 224 @ args = 0, pretend = 0, frame = 0 225 @ frame_needed = 0, uses_anonymous_args = 0 226 @ link register save eliminated. 227 .LVL12: 344:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 228 .loc 1 344 0 229 @ sp needed 230 0000 7047 bx lr 231 .cfi_endproc 232 .LFE41: 234 .section .text.HAL_SPI_Init,"ax",%progbits 235 .align 1 236 .global HAL_SPI_Init 237 .syntax unified 238 .code 16 239 .thumb_func 240 .fpu softvfp 242 HAL_SPI_Init: 243 .LFB39: 239:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check the SPI handle allocation */ 244 .loc 1 239 0 245 .cfi_startproc 246 @ args = 0, pretend = 0, frame = 0 247 @ frame_needed = 0, uses_anonymous_args = 0 248 .LVL13: 249 0000 10B5 push {r4, lr} 250 .LCFI2: 251 .cfi_def_cfa_offset 8 252 .cfi_offset 4, -8 253 .cfi_offset 14, -4 254 0002 041E subs r4, r0, #0 241:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 255 .loc 1 241 0 256 0004 3CD0 beq .L23 260:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 257 .loc 1 260 0 258 0006 5123 movs r3, #81 259 0008 C35C ldrb r3, [r0, r3] 260 000a 002B cmp r3, #0 261 000c 32D0 beq .L24 262 .LVL14: 263 .L22: ARM GAS /tmp/ccApM0GN.s page 48 269:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 264 .loc 1 269 0 265 000e 5122 movs r2, #81 266 0010 0223 movs r3, #2 267 0012 A354 strb r3, [r4, r2] 272:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 268 .loc 1 272 0 269 0014 2168 ldr r1, [r4] 270 0016 0B68 ldr r3, [r1] 271 0018 4020 movs r0, #64 272 001a 8343 bics r3, r0 273 001c 0B60 str r3, [r1] 277:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->Init.CLKPolarity | hspi->Init.CLKPhase | (hspi->Init.NSS & 274 .loc 1 277 0 275 001e 6368 ldr r3, [r4, #4] 276 0020 A168 ldr r1, [r4, #8] 277 0022 0B43 orrs r3, r1 278 0024 E168 ldr r1, [r4, #12] 279 0026 0B43 orrs r3, r1 280 0028 2169 ldr r1, [r4, #16] 281 002a 0B43 orrs r3, r1 282 002c 6169 ldr r1, [r4, #20] 283 002e 0B43 orrs r3, r1 284 0030 8021 movs r1, #128 285 0032 8900 lsls r1, r1, #2 286 0034 A069 ldr r0, [r4, #24] 287 0036 0140 ands r1, r0 288 0038 0B43 orrs r3, r1 289 003a E169 ldr r1, [r4, #28] 290 003c 0B43 orrs r3, r1 291 003e 216A ldr r1, [r4, #32] 292 0040 0B43 orrs r3, r1 293 0042 2168 ldr r1, [r4] 294 0044 A06A ldr r0, [r4, #40] 295 0046 0343 orrs r3, r0 296 0048 0B60 str r3, [r1] 282:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 297 .loc 1 282 0 298 004a 618B ldrh r1, [r4, #26] 299 004c 0423 movs r3, #4 300 004e 0B40 ands r3, r1 301 0050 2168 ldr r1, [r4] 302 0052 606A ldr r0, [r4, #36] 303 0054 0343 orrs r3, r0 304 0056 4B60 str r3, [r1, #4] 286:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 305 .loc 1 286 0 306 0058 2368 ldr r3, [r4] 307 005a E16A ldr r1, [r4, #44] 308 005c 1961 str r1, [r3, #16] 290:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** #endif 309 .loc 1 290 0 310 005e 2168 ldr r1, [r4] 311 0060 CB69 ldr r3, [r1, #28] 312 0062 0848 ldr r0, .L25 313 0064 0340 ands r3, r0 314 0066 CB61 str r3, [r1, #28] ARM GAS /tmp/ccApM0GN.s page 49 293:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_READY; 315 .loc 1 293 0 316 0068 0023 movs r3, #0 317 006a 6365 str r3, [r4, #84] 294:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 318 .loc 1 294 0 319 006c 0133 adds r3, r3, #1 320 006e A354 strb r3, [r4, r2] 296:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 321 .loc 1 296 0 322 0070 0020 movs r0, #0 323 .L21: 297:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 324 .loc 1 297 0 325 @ sp needed 326 .LVL15: 327 0072 10BD pop {r4, pc} 328 .LVL16: 329 .L24: 263:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 330 .loc 1 263 0 331 0074 5033 adds r3, r3, #80 332 0076 0022 movs r2, #0 333 0078 C254 strb r2, [r0, r3] 266:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 334 .loc 1 266 0 335 007a FFF7FEFF bl HAL_SPI_MspInit 336 .LVL17: 337 007e C6E7 b .L22 338 .LVL18: 339 .L23: 243:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 340 .loc 1 243 0 341 0080 0120 movs r0, #1 342 .LVL19: 343 0082 F6E7 b .L21 344 .L26: 345 .align 2 346 .L25: 347 0084 FFF7FFFF .word -2049 348 .cfi_endproc 349 .LFE39: 351 .section .text.HAL_SPI_MspDeInit,"ax",%progbits 352 .align 1 353 .weak HAL_SPI_MspDeInit 354 .syntax unified 355 .code 16 356 .thumb_func 357 .fpu softvfp 359 HAL_SPI_MspDeInit: 360 .LFB42: 353:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Prevent unused argument(s) compilation warning */ 361 .loc 1 353 0 362 .cfi_startproc 363 @ args = 0, pretend = 0, frame = 0 364 @ frame_needed = 0, uses_anonymous_args = 0 365 @ link register save eliminated. ARM GAS /tmp/ccApM0GN.s page 50 366 .LVL20: 360:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 367 .loc 1 360 0 368 @ sp needed 369 0000 7047 bx lr 370 .cfi_endproc 371 .LFE42: 373 .section .text.HAL_SPI_DeInit,"ax",%progbits 374 .align 1 375 .global HAL_SPI_DeInit 376 .syntax unified 377 .code 16 378 .thumb_func 379 .fpu softvfp 381 HAL_SPI_DeInit: 382 .LFB40: 306:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Check the SPI handle allocation */ 383 .loc 1 306 0 384 .cfi_startproc 385 @ args = 0, pretend = 0, frame = 0 386 @ frame_needed = 0, uses_anonymous_args = 0 387 .LVL21: 388 0000 70B5 push {r4, r5, r6, lr} 389 .LCFI3: 390 .cfi_def_cfa_offset 16 391 .cfi_offset 4, -16 392 .cfi_offset 5, -12 393 .cfi_offset 6, -8 394 .cfi_offset 14, -4 395 0002 041E subs r4, r0, #0 308:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 396 .loc 1 308 0 397 0004 10D0 beq .L30 313:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 398 .loc 1 313 0 399 0006 5125 movs r5, #81 400 0008 0223 movs r3, #2 401 000a 4355 strb r3, [r0, r5] 316:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 402 .loc 1 316 0 403 000c 0268 ldr r2, [r0] 404 000e 1368 ldr r3, [r2] 405 0010 4021 movs r1, #64 406 0012 8B43 bics r3, r1 407 0014 1360 str r3, [r2] 319:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 408 .loc 1 319 0 409 0016 FFF7FEFF bl HAL_SPI_MspDeInit 410 .LVL22: 321:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_RESET; 411 .loc 1 321 0 412 001a 0023 movs r3, #0 413 001c 6365 str r3, [r4, #84] 322:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 414 .loc 1 322 0 415 001e 6355 strb r3, [r4, r5] 325:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ARM GAS /tmp/ccApM0GN.s page 51 416 .loc 1 325 0 417 0020 5022 movs r2, #80 418 0022 A354 strb r3, [r4, r2] 327:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 419 .loc 1 327 0 420 0024 0020 movs r0, #0 421 .L29: 328:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 422 .loc 1 328 0 423 @ sp needed 424 .LVL23: 425 0026 70BD pop {r4, r5, r6, pc} 426 .LVL24: 427 .L30: 310:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 428 .loc 1 310 0 429 0028 0120 movs r0, #1 430 .LVL25: 431 002a FCE7 b .L29 432 .cfi_endproc 433 .LFE40: 435 .section .text.HAL_SPI_Transmit,"ax",%progbits 436 .align 1 437 .global HAL_SPI_Transmit 438 .syntax unified 439 .code 16 440 .thumb_func 441 .fpu softvfp 443 HAL_SPI_Transmit: 444 .LFB43: 430:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 445 .loc 1 430 0 446 .cfi_startproc 447 @ args = 0, pretend = 0, frame = 8 448 @ frame_needed = 0, uses_anonymous_args = 0 449 .LVL26: 450 0000 30B5 push {r4, r5, lr} 451 .LCFI4: 452 .cfi_def_cfa_offset 12 453 .cfi_offset 4, -12 454 .cfi_offset 5, -8 455 .cfi_offset 14, -4 456 0002 83B0 sub sp, sp, #12 457 .LCFI5: 458 .cfi_def_cfa_offset 24 459 0004 0400 movs r4, r0 460 0006 1D00 movs r5, r3 432:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 461 .loc 1 432 0 462 0008 5123 movs r3, #81 463 .LVL27: 464 000a C35C ldrb r3, [r0, r3] 465 000c 012B cmp r3, #1 466 000e 00D0 beq .LCB412 467 0010 D9E0 b .L49 @long jump 468 .LCB412: 434:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { ARM GAS /tmp/ccApM0GN.s page 52 469 .loc 1 434 0 470 0012 0029 cmp r1, #0 471 0014 00D1 bne .LCB414 472 0016 D9E0 b .L50 @long jump 473 .LCB414: 434:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 474 .loc 1 434 0 is_stmt 0 discriminator 1 475 0018 002A cmp r2, #0 476 001a 00D1 bne .LCB416 477 001c D8E0 b .L51 @long jump 478 .LCB416: 443:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 479 .loc 1 443 0 is_stmt 1 480 001e 4F33 adds r3, r3, #79 481 0020 C35C ldrb r3, [r0, r3] 482 0022 012B cmp r3, #1 483 0024 00D1 bne .LCB420 484 0026 D5E0 b .L52 @long jump 485 .LCB420: 443:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 486 .loc 1 443 0 is_stmt 0 discriminator 2 487 0028 5023 movs r3, #80 488 002a 0120 movs r0, #1 489 .LVL28: 490 002c E054 strb r0, [r4, r3] 446:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->ErrorCode = HAL_SPI_ERROR_NONE; 491 .loc 1 446 0 is_stmt 1 discriminator 2 492 002e 0133 adds r3, r3, #1 493 0030 1130 adds r0, r0, #17 494 0032 E054 strb r0, [r4, r3] 447:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 495 .loc 1 447 0 discriminator 2 496 0034 0023 movs r3, #0 497 0036 6365 str r3, [r4, #84] 449:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferSize = Size; 498 .loc 1 449 0 discriminator 2 499 0038 2163 str r1, [r4, #48] 450:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = Size; 500 .loc 1 450 0 discriminator 2 501 003a A286 strh r2, [r4, #52] 451:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 502 .loc 1 451 0 discriminator 2 503 003c E286 strh r2, [r4, #54] 454:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxISR = 0U; 504 .loc 1 454 0 discriminator 2 505 003e E364 str r3, [r4, #76] 455:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr = NULL; 506 .loc 1 455 0 discriminator 2 507 0040 A364 str r3, [r4, #72] 456:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferSize = 0U; 508 .loc 1 456 0 discriminator 2 509 0042 A363 str r3, [r4, #56] 457:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = 0U; 510 .loc 1 457 0 discriminator 2 511 0044 A387 strh r3, [r4, #60] 458:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 512 .loc 1 458 0 discriminator 2 ARM GAS /tmp/ccApM0GN.s page 53 513 0046 E387 strh r3, [r4, #62] 461:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 514 .loc 1 461 0 discriminator 2 515 0048 8023 movs r3, #128 516 004a 9B01 lsls r3, r3, #6 517 004c A26A ldr r2, [r4, #40] 518 .LVL29: 519 004e 9A42 cmp r2, r3 520 0050 38D0 beq .L55 521 .LVL30: 522 .L33: 466:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 523 .loc 1 466 0 524 0052 8023 movs r3, #128 525 0054 1B02 lsls r3, r3, #8 526 0056 A268 ldr r2, [r4, #8] 527 0058 9A42 cmp r2, r3 528 005a 3FD0 beq .L56 529 .L34: 473:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 530 .loc 1 473 0 531 005c 2368 ldr r3, [r4] 532 005e 1A68 ldr r2, [r3] 533 0060 5206 lsls r2, r2, #25 534 0062 03D4 bmi .L35 476:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 535 .loc 1 476 0 536 0064 1A68 ldr r2, [r3] 537 0066 4021 movs r1, #64 538 0068 0A43 orrs r2, r1 539 006a 1A60 str r2, [r3] 540 .L35: 480:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 541 .loc 1 480 0 542 006c E368 ldr r3, [r4, #12] 543 006e 002B cmp r3, #0 544 0070 67D1 bne .L36 482:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 545 .loc 1 482 0 546 0072 6368 ldr r3, [r4, #4] 547 0074 002B cmp r3, #0 548 0076 03D0 beq .L37 482:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 549 .loc 1 482 0 is_stmt 0 discriminator 1 550 0078 E38E ldrh r3, [r4, #54] 551 007a 9BB2 uxth r3, r3 552 007c 012B cmp r3, #1 553 007e 09D1 bne .L39 554 .L37: 484:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount--; 555 .loc 1 484 0 is_stmt 1 556 0080 236B ldr r3, [r4, #48] 557 0082 5A1C adds r2, r3, #1 558 0084 2263 str r2, [r4, #48] 559 0086 2268 ldr r2, [r4] 560 0088 1B78 ldrb r3, [r3] 561 008a D360 str r3, [r2, #12] ARM GAS /tmp/ccApM0GN.s page 54 485:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 562 .loc 1 485 0 563 008c E38E ldrh r3, [r4, #54] 564 008e 013B subs r3, r3, #1 565 0090 9BB2 uxth r3, r3 566 0092 E386 strh r3, [r4, #54] 567 .L39: 488:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 568 .loc 1 488 0 569 0094 E38E ldrh r3, [r4, #54] 570 0096 9BB2 uxth r3, r3 571 0098 002B cmp r3, #0 572 009a 26D0 beq .L57 491:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 573 .loc 1 491 0 574 009c 2B00 movs r3, r5 575 009e 0022 movs r2, #0 576 00a0 0221 movs r1, #2 577 00a2 2000 movs r0, r4 578 00a4 FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 579 .LVL31: 580 00a8 0028 cmp r0, #0 581 00aa 00D0 beq .LCB505 582 00ac 94E0 b .L53 @long jump 583 .LCB505: 495:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount--; 584 .loc 1 495 0 585 00ae 236B ldr r3, [r4, #48] 586 00b0 5A1C adds r2, r3, #1 587 00b2 2263 str r2, [r4, #48] 588 00b4 2268 ldr r2, [r4] 589 00b6 1B78 ldrb r3, [r3] 590 00b8 D360 str r3, [r2, #12] 496:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 591 .loc 1 496 0 592 00ba E38E ldrh r3, [r4, #54] 593 00bc 013B subs r3, r3, #1 594 00be 9BB2 uxth r3, r3 595 00c0 E386 strh r3, [r4, #54] 596 00c2 E7E7 b .L39 597 .LVL32: 598 .L55: 463:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 599 .loc 1 463 0 600 00c4 2268 ldr r2, [r4] 601 00c6 1368 ldr r3, [r2] 602 00c8 4549 ldr r1, .L62 603 .LVL33: 604 00ca 0B40 ands r3, r1 605 00cc 1360 str r3, [r2] 606 .LVL34: 607 00ce 2268 ldr r2, [r4] 608 00d0 1168 ldr r1, [r2] 609 00d2 8023 movs r3, #128 610 00d4 9B01 lsls r3, r3, #6 611 00d6 0B43 orrs r3, r1 612 00d8 1360 str r3, [r2] ARM GAS /tmp/ccApM0GN.s page 55 613 00da BAE7 b .L33 614 .L56: 469:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 615 .loc 1 469 0 616 00dc 2268 ldr r2, [r4] 617 00de 1168 ldr r1, [r2] 618 00e0 8023 movs r3, #128 619 00e2 DB01 lsls r3, r3, #7 620 00e4 0B43 orrs r3, r1 621 00e6 1360 str r3, [r2] 622 00e8 B8E7 b .L34 623 .L57: 499:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 624 .loc 1 499 0 625 00ea 8023 movs r3, #128 626 00ec 9B01 lsls r3, r3, #6 627 00ee A26A ldr r2, [r4, #40] 628 00f0 9A42 cmp r2, r3 629 00f2 1FD0 beq .L58 630 .L41: 533:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 631 .loc 1 533 0 632 00f4 2B00 movs r3, r5 633 00f6 0022 movs r2, #0 634 00f8 0221 movs r1, #2 635 00fa 2000 movs r0, r4 636 00fc FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 637 .LVL35: 638 0100 0028 cmp r0, #0 639 0102 54D1 bne .L59 540:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 640 .loc 1 540 0 641 0104 2B00 movs r3, r5 642 0106 0122 movs r2, #1 643 0108 8021 movs r1, #128 644 010a 2000 movs r0, r4 645 010c FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 646 .LVL36: 647 0110 0028 cmp r0, #0 648 0112 52D1 bne .L60 547:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 649 .loc 1 547 0 650 0114 A368 ldr r3, [r4, #8] 651 0116 002B cmp r3, #0 652 0118 05D1 bne .L48 653 .LBB2: 549:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 654 .loc 1 549 0 655 011a 2368 ldr r3, [r4] 656 011c DA68 ldr r2, [r3, #12] 657 011e 0192 str r2, [sp, #4] 658 0120 9B68 ldr r3, [r3, #8] 659 0122 0193 str r3, [sp, #4] 660 0124 019B ldr r3, [sp, #4] 661 .L48: 662 .LBE2: 552:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ARM GAS /tmp/ccApM0GN.s page 56 663 .loc 1 552 0 664 0126 5123 movs r3, #81 665 0128 0122 movs r2, #1 666 012a E254 strb r2, [r4, r3] 555:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 667 .loc 1 555 0 668 012c 013B subs r3, r3, #1 669 012e 0022 movs r2, #0 670 0130 E254 strb r2, [r4, r3] 557:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 671 .loc 1 557 0 672 0132 49E0 b .L32 673 .L58: 501:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 674 .loc 1 501 0 675 0134 2268 ldr r2, [r4] 676 0136 1168 ldr r1, [r2] 677 0138 8023 movs r3, #128 678 013a 5B01 lsls r3, r3, #5 679 013c 0B43 orrs r3, r1 680 013e 1360 str r3, [r2] 681 0140 D8E7 b .L41 682 .L36: 507:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 683 .loc 1 507 0 684 0142 6368 ldr r3, [r4, #4] 685 0144 002B cmp r3, #0 686 0146 03D0 beq .L42 507:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 687 .loc 1 507 0 is_stmt 0 discriminator 1 688 0148 E38E ldrh r3, [r4, #54] 689 014a 9BB2 uxth r3, r3 690 014c 012B cmp r3, #1 691 014e 0AD1 bne .L44 692 .L42: 509:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr+=2U; 693 .loc 1 509 0 is_stmt 1 694 0150 2368 ldr r3, [r4] 695 0152 226B ldr r2, [r4, #48] 696 0154 1288 ldrh r2, [r2] 697 0156 DA60 str r2, [r3, #12] 510:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount--; 698 .loc 1 510 0 699 0158 236B ldr r3, [r4, #48] 700 015a 0233 adds r3, r3, #2 701 015c 2363 str r3, [r4, #48] 511:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 702 .loc 1 511 0 703 015e E38E ldrh r3, [r4, #54] 704 0160 013B subs r3, r3, #1 705 0162 9BB2 uxth r3, r3 706 0164 E386 strh r3, [r4, #54] 707 .L44: 514:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 708 .loc 1 514 0 709 0166 E38E ldrh r3, [r4, #54] 710 0168 9BB2 uxth r3, r3 ARM GAS /tmp/ccApM0GN.s page 57 711 016a 002B cmp r3, #0 712 016c 13D0 beq .L61 517:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 713 .loc 1 517 0 714 016e 2B00 movs r3, r5 715 0170 0022 movs r2, #0 716 0172 0221 movs r1, #2 717 0174 2000 movs r0, r4 718 0176 FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 719 .LVL37: 720 017a 0028 cmp r0, #0 721 017c 2ED1 bne .L54 521:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr+=2U; 722 .loc 1 521 0 723 017e 2368 ldr r3, [r4] 724 0180 226B ldr r2, [r4, #48] 725 0182 1288 ldrh r2, [r2] 726 0184 DA60 str r2, [r3, #12] 522:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount--; 727 .loc 1 522 0 728 0186 236B ldr r3, [r4, #48] 729 0188 0233 adds r3, r3, #2 730 018a 2363 str r3, [r4, #48] 523:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 731 .loc 1 523 0 732 018c E38E ldrh r3, [r4, #54] 733 018e 013B subs r3, r3, #1 734 0190 9BB2 uxth r3, r3 735 0192 E386 strh r3, [r4, #54] 736 0194 E7E7 b .L44 737 .L61: 526:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 738 .loc 1 526 0 739 0196 8023 movs r3, #128 740 0198 9B01 lsls r3, r3, #6 741 019a A26A ldr r2, [r4, #40] 742 019c 9A42 cmp r2, r3 743 019e A9D1 bne .L41 528:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 744 .loc 1 528 0 745 01a0 2268 ldr r2, [r4] 746 01a2 1168 ldr r1, [r2] 747 01a4 8023 movs r3, #128 748 01a6 5B01 lsls r3, r3, #5 749 01a8 0B43 orrs r3, r1 750 01aa 1360 str r3, [r2] 751 01ac A2E7 b .L41 752 .L59: 535:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 753 .loc 1 535 0 754 01ae 636D ldr r3, [r4, #84] 755 01b0 2022 movs r2, #32 756 01b2 1343 orrs r3, r2 757 01b4 6365 str r3, [r4, #84] 536:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 758 .loc 1 536 0 759 01b6 0320 movs r0, #3 ARM GAS /tmp/ccApM0GN.s page 58 760 01b8 06E0 b .L32 761 .L60: 542:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 762 .loc 1 542 0 763 01ba 636D ldr r3, [r4, #84] 764 01bc 2022 movs r2, #32 765 01be 1343 orrs r3, r2 766 01c0 6365 str r3, [r4, #84] 543:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 767 .loc 1 543 0 768 01c2 0320 movs r0, #3 769 01c4 00E0 b .L32 770 .LVL38: 771 .L49: 561:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 772 .loc 1 561 0 773 01c6 0220 movs r0, #2 774 .LVL39: 775 .L32: 563:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 776 .loc 1 563 0 777 01c8 03B0 add sp, sp, #12 778 @ sp needed 779 .LVL40: 780 .LVL41: 781 01ca 30BD pop {r4, r5, pc} 782 .LVL42: 783 .L50: 436:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 784 .loc 1 436 0 785 01cc 0120 movs r0, #1 786 .LVL43: 787 01ce FBE7 b .L32 788 .LVL44: 789 .L51: 790 01d0 0120 movs r0, #1 791 .LVL45: 792 01d2 F9E7 b .L32 793 .LVL46: 794 .L52: 443:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 795 .loc 1 443 0 796 01d4 0220 movs r0, #2 797 .LVL47: 798 01d6 F7E7 b .L32 799 .LVL48: 800 .L53: 493:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 801 .loc 1 493 0 802 01d8 0320 movs r0, #3 803 01da F5E7 b .L32 804 .L54: 519:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 805 .loc 1 519 0 806 01dc 0320 movs r0, #3 807 01de F3E7 b .L32 808 .L63: ARM GAS /tmp/ccApM0GN.s page 59 809 .align 2 810 .L62: 811 01e0 FFDFFFFF .word -8193 812 .cfi_endproc 813 .LFE43: 815 .section .text.HAL_SPI_TransmitReceive,"ax",%progbits 816 .align 1 817 .global HAL_SPI_TransmitReceive 818 .syntax unified 819 .code 16 820 .thumb_func 821 .fpu softvfp 823 HAL_SPI_TransmitReceive: 824 .LFB45: 751:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __IO uint16_t tmpreg = 0U; 825 .loc 1 751 0 826 .cfi_startproc 827 @ args = 4, pretend = 0, frame = 8 828 @ frame_needed = 0, uses_anonymous_args = 0 829 .LVL49: 830 0000 30B5 push {r4, r5, lr} 831 .LCFI6: 832 .cfi_def_cfa_offset 12 833 .cfi_offset 4, -12 834 .cfi_offset 5, -8 835 .cfi_offset 14, -4 836 0002 83B0 sub sp, sp, #12 837 .LCFI7: 838 .cfi_def_cfa_offset 24 839 0004 0400 movs r4, r0 752:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 840 .loc 1 752 0 841 0006 6846 mov r0, sp 842 .LVL50: 843 0008 0025 movs r5, #0 844 000a C580 strh r5, [r0, #6] 754:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 845 .loc 1 754 0 846 000c 5120 movs r0, #81 847 000e 205C ldrb r0, [r4, r0] 848 0010 0128 cmp r0, #1 849 0012 04D0 beq .L65 754:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 850 .loc 1 754 0 is_stmt 0 discriminator 1 851 0014 5120 movs r0, #81 852 0016 205C ldrb r0, [r4, r0] 853 0018 2228 cmp r0, #34 854 001a 00D0 beq .LCB812 855 001c A8E1 b .L88 @long jump 856 .LCB812: 857 .L65: 756:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 858 .loc 1 756 0 is_stmt 1 859 001e 0029 cmp r1, #0 860 0020 00D1 bne .LCB815 861 0022 A8E1 b .L89 @long jump 862 .LCB815: ARM GAS /tmp/ccApM0GN.s page 60 756:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 863 .loc 1 756 0 is_stmt 0 discriminator 1 864 0024 002A cmp r2, #0 865 0026 00D1 bne .LCB817 866 0028 A7E1 b .L90 @long jump 867 .LCB817: 756:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 868 .loc 1 756 0 discriminator 2 869 002a 002B cmp r3, #0 870 002c 00D1 bne .LCB819 871 002e A6E1 b .L91 @long jump 872 .LCB819: 765:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 873 .loc 1 765 0 is_stmt 1 874 0030 5020 movs r0, #80 875 0032 205C ldrb r0, [r4, r0] 876 0034 0128 cmp r0, #1 877 0036 00D1 bne .LCB823 878 0038 A3E1 b .L92 @long jump 879 .LCB823: 765:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 880 .loc 1 765 0 is_stmt 0 discriminator 2 881 003a 5020 movs r0, #80 882 003c 0125 movs r5, #1 883 003e 2554 strb r5, [r4, r0] 768:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 884 .loc 1 768 0 is_stmt 1 discriminator 2 885 0040 0130 adds r0, r0, #1 886 0042 205C ldrb r0, [r4, r0] 887 0044 0128 cmp r0, #1 888 0046 68D0 beq .L101 889 .L67: 774:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 890 .loc 1 774 0 891 0048 0020 movs r0, #0 892 004a 6065 str r0, [r4, #84] 776:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferSize = Size; 893 .loc 1 776 0 894 004c A263 str r2, [r4, #56] 777:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = Size; 895 .loc 1 777 0 896 004e A387 strh r3, [r4, #60] 778:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 897 .loc 1 778 0 898 0050 E387 strh r3, [r4, #62] 780:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferSize = Size; 899 .loc 1 780 0 900 0052 2163 str r1, [r4, #48] 781:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = Size; 901 .loc 1 781 0 902 0054 A386 strh r3, [r4, #52] 782:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 903 .loc 1 782 0 904 0056 E386 strh r3, [r4, #54] 785:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxISR = 0U; 905 .loc 1 785 0 906 0058 A064 str r0, [r4, #72] ARM GAS /tmp/ccApM0GN.s page 61 786:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 907 .loc 1 786 0 908 005a E064 str r0, [r4, #76] 789:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 909 .loc 1 789 0 910 005c 8023 movs r3, #128 911 .LVL51: 912 005e 9B01 lsls r3, r3, #6 913 0060 A26A ldr r2, [r4, #40] 914 .LVL52: 915 0062 9A42 cmp r2, r3 916 0064 5DD0 beq .L102 917 .LVL53: 918 .L68: 795:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 919 .loc 1 795 0 920 0066 2368 ldr r3, [r4] 921 0068 1A68 ldr r2, [r3] 922 006a 5206 lsls r2, r2, #25 923 006c 03D4 bmi .L69 798:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 924 .loc 1 798 0 925 006e 1A68 ldr r2, [r3] 926 0070 4021 movs r1, #64 927 0072 0A43 orrs r2, r1 928 0074 1A60 str r2, [r3] 929 .L69: 802:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 930 .loc 1 802 0 931 0076 8023 movs r3, #128 932 0078 1B01 lsls r3, r3, #4 933 007a E268 ldr r2, [r4, #12] 934 007c 9A42 cmp r2, r3 935 007e 5CD0 beq .L103 876:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 936 .loc 1 876 0 937 0080 6368 ldr r3, [r4, #4] 938 0082 002B cmp r3, #0 939 0084 07D0 beq .L78 876:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 940 .loc 1 876 0 is_stmt 0 discriminator 1 941 0086 8222 movs r2, #130 942 0088 5200 lsls r2, r2, #1 943 008a 9342 cmp r3, r2 944 008c 0DD1 bne .L79 876:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 945 .loc 1 876 0 discriminator 2 946 008e E38E ldrh r3, [r4, #54] 947 0090 9BB2 uxth r3, r3 948 0092 012B cmp r3, #1 949 0094 09D1 bne .L79 950 .L78: 878:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount--; 951 .loc 1 878 0 is_stmt 1 952 0096 236B ldr r3, [r4, #48] 953 0098 5A1C adds r2, r3, #1 954 009a 2263 str r2, [r4, #48] ARM GAS /tmp/ccApM0GN.s page 62 955 009c 2268 ldr r2, [r4] 956 009e 1B78 ldrb r3, [r3] 957 00a0 D360 str r3, [r2, #12] 879:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 958 .loc 1 879 0 959 00a2 E38E ldrh r3, [r4, #54] 960 00a4 013B subs r3, r3, #1 961 00a6 9BB2 uxth r3, r3 962 00a8 E386 strh r3, [r4, #54] 963 .L79: 881:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 964 .loc 1 881 0 965 00aa E38E ldrh r3, [r4, #54] 966 00ac 9BB2 uxth r3, r3 967 00ae 002B cmp r3, #0 968 00b0 00D0 beq .LCB902 969 00b2 ECE0 b .L80 @long jump 970 .LCB902: 884:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 971 .loc 1 884 0 972 00b4 8023 movs r3, #128 973 00b6 9B01 lsls r3, r3, #6 974 00b8 A26A ldr r2, [r4, #40] 975 00ba 9A42 cmp r2, r3 976 00bc 00D1 bne .LCB908 977 00be CCE0 b .L104 @long jump 978 .LCB908: 979 .L81: 890:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 980 .loc 1 890 0 981 00c0 069B ldr r3, [sp, #24] 982 00c2 0022 movs r2, #0 983 00c4 0121 movs r1, #1 984 00c6 2000 movs r0, r4 985 00c8 FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 986 .LVL54: 987 00cc 0028 cmp r0, #0 988 00ce 00D0 beq .LCB917 989 00d0 61E1 b .L97 @long jump 990 .LCB917: 895:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount--; 991 .loc 1 895 0 992 00d2 2368 ldr r3, [r4] 993 00d4 DB68 ldr r3, [r3, #12] 994 00d6 A26B ldr r2, [r4, #56] 995 00d8 1370 strb r3, [r2] 896:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 996 .loc 1 896 0 997 00da E38F ldrh r3, [r4, #62] 998 00dc 013B subs r3, r3, #1 999 00de 9BB2 uxth r3, r3 1000 00e0 E387 strh r3, [r4, #62] 1001 .L75: 941:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1002 .loc 1 941 0 1003 00e2 8023 movs r3, #128 1004 00e4 9B01 lsls r3, r3, #6 ARM GAS /tmp/ccApM0GN.s page 63 1005 00e6 A26A ldr r2, [r4, #40] 1006 00e8 9A42 cmp r2, r3 1007 00ea 00D1 bne .LCB936 1008 00ec 0DE1 b .L105 @long jump 1009 .LCB936: 1010 .L84: 955:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1011 .loc 1 955 0 1012 00ee 069B ldr r3, [sp, #24] 1013 00f0 0122 movs r2, #1 1014 00f2 8021 movs r1, #128 1015 00f4 2000 movs r0, r4 1016 00f6 FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 1017 .LVL55: 1018 00fa 0028 cmp r0, #0 1019 00fc 00D0 beq .LCB945 1020 00fe 19E1 b .L106 @long jump 1021 .LCB945: 961:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1022 .loc 1 961 0 1023 0100 5123 movs r3, #81 1024 0102 0122 movs r2, #1 1025 0104 E254 strb r2, [r4, r3] 964:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1026 .loc 1 964 0 1027 0106 8023 movs r3, #128 1028 0108 9B01 lsls r3, r3, #6 1029 010a A26A ldr r2, [r4, #40] 1030 010c 9A42 cmp r2, r3 1031 010e 00D1 bne .LCB954 1032 0110 16E1 b .L107 @long jump 1033 .LCB954: 1034 .L87: 977:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1035 .loc 1 977 0 1036 0112 5023 movs r3, #80 1037 0114 0022 movs r2, #0 1038 0116 E254 strb r2, [r4, r3] 979:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1039 .loc 1 979 0 1040 0118 2BE1 b .L66 1041 .LVL56: 1042 .L101: 770:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1043 .loc 1 770 0 1044 011a 5030 adds r0, r0, #80 1045 011c 3135 adds r5, r5, #49 1046 011e 2554 strb r5, [r4, r0] 1047 0120 92E7 b .L67 1048 .LVL57: 1049 .L102: 791:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1050 .loc 1 791 0 1051 0122 2268 ldr r2, [r4] 1052 0124 1368 ldr r3, [r2] 1053 0126 A049 ldr r1, .L112 1054 .LVL58: ARM GAS /tmp/ccApM0GN.s page 64 1055 0128 0B40 ands r3, r1 1056 012a 1360 str r3, [r2] 1057 .LVL59: 1058 012c 2268 ldr r2, [r4] 1059 012e 1168 ldr r1, [r2] 1060 0130 8023 movs r3, #128 1061 0132 9B01 lsls r3, r3, #6 1062 0134 0B43 orrs r3, r1 1063 0136 1360 str r3, [r2] 1064 0138 95E7 b .L68 1065 .L103: 804:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1066 .loc 1 804 0 1067 013a 6368 ldr r3, [r4, #4] 1068 013c 002B cmp r3, #0 1069 013e 07D0 beq .L71 804:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1070 .loc 1 804 0 is_stmt 0 discriminator 1 1071 0140 8222 movs r2, #130 1072 0142 5200 lsls r2, r2, #1 1073 0144 9342 cmp r3, r2 1074 0146 0ED1 bne .L72 804:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1075 .loc 1 804 0 discriminator 2 1076 0148 E38E ldrh r3, [r4, #54] 1077 014a 9BB2 uxth r3, r3 1078 014c 012B cmp r3, #1 1079 014e 0AD1 bne .L72 1080 .L71: 806:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr+=2U; 1081 .loc 1 806 0 is_stmt 1 1082 0150 2368 ldr r3, [r4] 1083 0152 226B ldr r2, [r4, #48] 1084 0154 1288 ldrh r2, [r2] 1085 0156 DA60 str r2, [r3, #12] 807:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount--; 1086 .loc 1 807 0 1087 0158 236B ldr r3, [r4, #48] 1088 015a 0233 adds r3, r3, #2 1089 015c 2363 str r3, [r4, #48] 808:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1090 .loc 1 808 0 1091 015e E38E ldrh r3, [r4, #54] 1092 0160 013B subs r3, r3, #1 1093 0162 9BB2 uxth r3, r3 1094 0164 E386 strh r3, [r4, #54] 1095 .L72: 810:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1096 .loc 1 810 0 1097 0166 E38E ldrh r3, [r4, #54] 1098 0168 9BB2 uxth r3, r3 1099 016a 002B cmp r3, #0 1100 016c 34D1 bne .L73 813:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1101 .loc 1 813 0 1102 016e 8023 movs r3, #128 1103 0170 9B01 lsls r3, r3, #6 ARM GAS /tmp/ccApM0GN.s page 65 1104 0172 A26A ldr r2, [r4, #40] 1105 0174 9A42 cmp r2, r3 1106 0176 14D0 beq .L108 1107 .L74: 819:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1108 .loc 1 819 0 1109 0178 069B ldr r3, [sp, #24] 1110 017a 0022 movs r2, #0 1111 017c 0121 movs r1, #1 1112 017e 2000 movs r0, r4 1113 0180 FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 1114 .LVL60: 1115 0184 0028 cmp r0, #0 1116 0186 00D0 beq .LCB1046 1117 0188 FDE0 b .L93 @long jump 1118 .LCB1046: 824:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr+=2U; 1119 .loc 1 824 0 1120 018a 2368 ldr r3, [r4] 1121 018c DB68 ldr r3, [r3, #12] 1122 018e A26B ldr r2, [r4, #56] 1123 0190 1380 strh r3, [r2] 825:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount--; 1124 .loc 1 825 0 1125 0192 A36B ldr r3, [r4, #56] 1126 0194 0233 adds r3, r3, #2 1127 0196 A363 str r3, [r4, #56] 826:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1128 .loc 1 826 0 1129 0198 E38F ldrh r3, [r4, #62] 1130 019a 013B subs r3, r3, #1 1131 019c 9BB2 uxth r3, r3 1132 019e E387 strh r3, [r4, #62] 1133 01a0 9FE7 b .L75 1134 .L108: 815:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1135 .loc 1 815 0 1136 01a2 2268 ldr r2, [r4] 1137 01a4 1168 ldr r1, [r2] 1138 01a6 8023 movs r3, #128 1139 01a8 5B01 lsls r3, r3, #5 1140 01aa 0B43 orrs r3, r1 1141 01ac 1360 str r3, [r2] 1142 01ae E3E7 b .L74 1143 .L76: 849:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1144 .loc 1 849 0 1145 01b0 069B ldr r3, [sp, #24] 1146 01b2 0022 movs r2, #0 1147 01b4 0121 movs r1, #1 1148 01b6 2000 movs r0, r4 1149 01b8 FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 1150 .LVL61: 1151 01bc 0028 cmp r0, #0 1152 01be 00D0 beq .LCB1086 1153 01c0 E5E0 b .L95 @long jump 1154 .LCB1086: ARM GAS /tmp/ccApM0GN.s page 66 854:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr+=2U; 1155 .loc 1 854 0 1156 01c2 2368 ldr r3, [r4] 1157 01c4 DB68 ldr r3, [r3, #12] 1158 01c6 A26B ldr r2, [r4, #56] 1159 01c8 1380 strh r3, [r2] 855:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount--; 1160 .loc 1 855 0 1161 01ca A36B ldr r3, [r4, #56] 1162 01cc 0233 adds r3, r3, #2 1163 01ce A363 str r3, [r4, #56] 856:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1164 .loc 1 856 0 1165 01d0 E38F ldrh r3, [r4, #62] 1166 01d2 013B subs r3, r3, #1 1167 01d4 9BB2 uxth r3, r3 1168 01d6 E387 strh r3, [r4, #62] 1169 .L73: 830:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1170 .loc 1 830 0 1171 01d8 E38E ldrh r3, [r4, #54] 1172 01da 9BB2 uxth r3, r3 1173 01dc 002B cmp r3, #0 1174 01de 23D0 beq .L109 833:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1175 .loc 1 833 0 1176 01e0 069B ldr r3, [sp, #24] 1177 01e2 0022 movs r2, #0 1178 01e4 0221 movs r1, #2 1179 01e6 2000 movs r0, r4 1180 01e8 FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 1181 .LVL62: 1182 01ec 0028 cmp r0, #0 1183 01ee 00D0 beq .LCB1115 1184 01f0 CBE0 b .L94 @long jump 1185 .LCB1115: 838:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr+=2U; 1186 .loc 1 838 0 1187 01f2 2368 ldr r3, [r4] 1188 01f4 226B ldr r2, [r4, #48] 1189 01f6 1288 ldrh r2, [r2] 1190 01f8 DA60 str r2, [r3, #12] 839:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount--; 1191 .loc 1 839 0 1192 01fa 236B ldr r3, [r4, #48] 1193 01fc 0233 adds r3, r3, #2 1194 01fe 2363 str r3, [r4, #48] 840:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1195 .loc 1 840 0 1196 0200 E38E ldrh r3, [r4, #54] 1197 0202 013B subs r3, r3, #1 1198 0204 9BB2 uxth r3, r3 1199 0206 E386 strh r3, [r4, #54] 843:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1200 .loc 1 843 0 1201 0208 E38E ldrh r3, [r4, #54] 1202 020a 9BB2 uxth r3, r3 ARM GAS /tmp/ccApM0GN.s page 67 1203 020c 002B cmp r3, #0 1204 020e CFD1 bne .L76 843:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1205 .loc 1 843 0 is_stmt 0 discriminator 1 1206 0210 8023 movs r3, #128 1207 0212 9B01 lsls r3, r3, #6 1208 0214 A26A ldr r2, [r4, #40] 1209 0216 9A42 cmp r2, r3 1210 0218 CAD1 bne .L76 845:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1211 .loc 1 845 0 is_stmt 1 1212 021a 2268 ldr r2, [r4] 1213 021c 1168 ldr r1, [r2] 1214 021e 8023 movs r3, #128 1215 0220 5B01 lsls r3, r3, #5 1216 0222 0B43 orrs r3, r1 1217 0224 1360 str r3, [r2] 1218 0226 C3E7 b .L76 1219 .L109: 859:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1220 .loc 1 859 0 1221 0228 6368 ldr r3, [r4, #4] 1222 022a 002B cmp r3, #0 1223 022c 00D0 beq .LCB1154 1224 022e 58E7 b .L75 @long jump 1225 .LCB1154: 862:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1226 .loc 1 862 0 1227 0230 069B ldr r3, [sp, #24] 1228 0232 0022 movs r2, #0 1229 0234 0121 movs r1, #1 1230 0236 2000 movs r0, r4 1231 0238 FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 1232 .LVL63: 1233 023c 0028 cmp r0, #0 1234 023e 00D0 beq .LCB1162 1235 0240 A7E0 b .L96 @long jump 1236 .LCB1162: 867:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr+=2U; 1237 .loc 1 867 0 1238 0242 2368 ldr r3, [r4] 1239 0244 DB68 ldr r3, [r3, #12] 1240 0246 A26B ldr r2, [r4, #56] 1241 0248 1380 strh r3, [r2] 868:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount--; 1242 .loc 1 868 0 1243 024a A36B ldr r3, [r4, #56] 1244 024c 0233 adds r3, r3, #2 1245 024e A363 str r3, [r4, #56] 869:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1246 .loc 1 869 0 1247 0250 E38F ldrh r3, [r4, #62] 1248 0252 013B subs r3, r3, #1 1249 0254 9BB2 uxth r3, r3 1250 0256 E387 strh r3, [r4, #62] 1251 0258 43E7 b .L75 1252 .L104: ARM GAS /tmp/ccApM0GN.s page 68 886:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1253 .loc 1 886 0 1254 025a 2268 ldr r2, [r4] 1255 025c 1168 ldr r1, [r2] 1256 025e 8023 movs r3, #128 1257 0260 5B01 lsls r3, r3, #5 1258 0262 0B43 orrs r3, r1 1259 0264 1360 str r3, [r2] 1260 0266 2BE7 b .L81 1261 .L82: 918:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1262 .loc 1 918 0 1263 0268 069B ldr r3, [sp, #24] 1264 026a 0022 movs r2, #0 1265 026c 0121 movs r1, #1 1266 026e 2000 movs r0, r4 1267 0270 FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 1268 .LVL64: 1269 0274 0028 cmp r0, #0 1270 0276 00D0 beq .LCB1202 1271 0278 91E0 b .L99 @long jump 1272 .LCB1202: 923:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount--; 1273 .loc 1 923 0 1274 027a 2368 ldr r3, [r4] 1275 027c DA68 ldr r2, [r3, #12] 1276 027e A36B ldr r3, [r4, #56] 1277 0280 591C adds r1, r3, #1 1278 0282 A163 str r1, [r4, #56] 1279 0284 1A70 strb r2, [r3] 924:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1280 .loc 1 924 0 1281 0286 E38F ldrh r3, [r4, #62] 1282 0288 013B subs r3, r3, #1 1283 028a 9BB2 uxth r3, r3 1284 028c E387 strh r3, [r4, #62] 1285 .L80: 900:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1286 .loc 1 900 0 1287 028e E38E ldrh r3, [r4, #54] 1288 0290 9BB2 uxth r3, r3 1289 0292 002B cmp r3, #0 1290 0294 22D0 beq .L110 903:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1291 .loc 1 903 0 1292 0296 069B ldr r3, [sp, #24] 1293 0298 0022 movs r2, #0 1294 029a 0221 movs r1, #2 1295 029c 2000 movs r0, r4 1296 029e FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 1297 .LVL65: 1298 02a2 0028 cmp r0, #0 1299 02a4 00D0 beq .LCB1228 1300 02a6 78E0 b .L98 @long jump 1301 .LCB1228: 908:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount--; 1302 .loc 1 908 0 ARM GAS /tmp/ccApM0GN.s page 69 1303 02a8 236B ldr r3, [r4, #48] 1304 02aa 5A1C adds r2, r3, #1 1305 02ac 2263 str r2, [r4, #48] 1306 02ae 2268 ldr r2, [r4] 1307 02b0 1B78 ldrb r3, [r3] 1308 02b2 D360 str r3, [r2, #12] 909:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1309 .loc 1 909 0 1310 02b4 E38E ldrh r3, [r4, #54] 1311 02b6 013B subs r3, r3, #1 1312 02b8 9BB2 uxth r3, r3 1313 02ba E386 strh r3, [r4, #54] 912:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1314 .loc 1 912 0 1315 02bc E38E ldrh r3, [r4, #54] 1316 02be 9BB2 uxth r3, r3 1317 02c0 002B cmp r3, #0 1318 02c2 D1D1 bne .L82 912:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1319 .loc 1 912 0 is_stmt 0 discriminator 1 1320 02c4 8023 movs r3, #128 1321 02c6 9B01 lsls r3, r3, #6 1322 02c8 A26A ldr r2, [r4, #40] 1323 02ca 9A42 cmp r2, r3 1324 02cc CCD1 bne .L82 914:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1325 .loc 1 914 0 is_stmt 1 1326 02ce 2268 ldr r2, [r4] 1327 02d0 1168 ldr r1, [r2] 1328 02d2 8023 movs r3, #128 1329 02d4 5B01 lsls r3, r3, #5 1330 02d6 0B43 orrs r3, r1 1331 02d8 1360 str r3, [r2] 1332 02da C5E7 b .L82 1333 .L110: 926:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1334 .loc 1 926 0 1335 02dc 6368 ldr r3, [r4, #4] 1336 02de 002B cmp r3, #0 1337 02e0 00D0 beq .LCB1264 1338 02e2 FEE6 b .L75 @long jump 1339 .LCB1264: 929:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1340 .loc 1 929 0 1341 02e4 069B ldr r3, [sp, #24] 1342 02e6 0022 movs r2, #0 1343 02e8 0121 movs r1, #1 1344 02ea 2000 movs r0, r4 1345 02ec FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 1346 .LVL66: 1347 02f0 0028 cmp r0, #0 1348 02f2 56D1 bne .L100 934:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount--; 1349 .loc 1 934 0 1350 02f4 2368 ldr r3, [r4] 1351 02f6 DA68 ldr r2, [r3, #12] 1352 02f8 A36B ldr r3, [r4, #56] ARM GAS /tmp/ccApM0GN.s page 70 1353 02fa 591C adds r1, r3, #1 1354 02fc A163 str r1, [r4, #56] 1355 02fe 1A70 strb r2, [r3] 935:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1356 .loc 1 935 0 1357 0300 E38F ldrh r3, [r4, #62] 1358 0302 013B subs r3, r3, #1 1359 0304 9BB2 uxth r3, r3 1360 0306 E387 strh r3, [r4, #62] 1361 0308 EBE6 b .L75 1362 .L105: 944:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1363 .loc 1 944 0 1364 030a 069B ldr r3, [sp, #24] 1365 030c 0022 movs r2, #0 1366 030e 0121 movs r1, #1 1367 0310 2000 movs r0, r4 1368 0312 FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 1369 .LVL67: 1370 0316 0028 cmp r0, #0 1371 0318 06D1 bne .L111 950:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** UNUSED(tmpreg); /* avoid warning on tmpreg affectation with stupid compiler */ 1372 .loc 1 950 0 1373 031a 2368 ldr r3, [r4] 1374 031c DB68 ldr r3, [r3, #12] 1375 031e 9BB2 uxth r3, r3 1376 0320 6A46 mov r2, sp 1377 0322 D380 strh r3, [r2, #6] 951:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1378 .loc 1 951 0 1379 0324 D388 ldrh r3, [r2, #6] 1380 0326 E2E6 b .L84 1381 .L111: 946:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 1382 .loc 1 946 0 1383 0328 636D ldr r3, [r4, #84] 1384 032a 0222 movs r2, #2 1385 032c 1343 orrs r3, r2 1386 032e 6365 str r3, [r4, #84] 947:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1387 .loc 1 947 0 1388 0330 0320 movs r0, #3 1389 0332 1EE0 b .L66 1390 .L106: 957:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 1391 .loc 1 957 0 1392 0334 636D ldr r3, [r4, #84] 1393 0336 2022 movs r2, #32 1394 0338 1343 orrs r3, r2 1395 033a 6365 str r3, [r4, #84] 958:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1396 .loc 1 958 0 1397 033c 0320 movs r0, #3 1398 033e 18E0 b .L66 1399 .L107: 964:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1400 .loc 1 964 0 discriminator 1 ARM GAS /tmp/ccApM0GN.s page 71 1401 0340 2368 ldr r3, [r4] 1402 0342 9A68 ldr r2, [r3, #8] 1403 0344 D206 lsls r2, r2, #27 1404 0346 00D4 bmi .LCB1332 1405 0348 E3E6 b .L87 @long jump 1406 .LCB1332: 966:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1407 .loc 1 966 0 1408 034a 626D ldr r2, [r4, #84] 1409 034c 0221 movs r1, #2 1410 034e 0A43 orrs r2, r1 1411 0350 6265 str r2, [r4, #84] 968:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1412 .loc 1 968 0 1413 0352 1A68 ldr r2, [r3] 1414 0354 1449 ldr r1, .L112 1415 0356 0A40 ands r2, r1 1416 0358 1A60 str r2, [r3] 1417 035a 2268 ldr r2, [r4] 1418 035c 1168 ldr r1, [r2] 1419 035e 8023 movs r3, #128 1420 0360 9B01 lsls r3, r3, #6 1421 0362 0B43 orrs r3, r1 1422 0364 1360 str r3, [r2] 971:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1423 .loc 1 971 0 1424 0366 5023 movs r3, #80 1425 0368 0022 movs r2, #0 1426 036a E254 strb r2, [r4, r3] 973:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1427 .loc 1 973 0 1428 036c 0120 movs r0, #1 1429 036e 00E0 b .L66 1430 .LVL68: 1431 .L88: 983:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1432 .loc 1 983 0 1433 0370 0220 movs r0, #2 1434 .LVL69: 1435 .L66: 985:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1436 .loc 1 985 0 1437 0372 03B0 add sp, sp, #12 1438 @ sp needed 1439 .LVL70: 1440 0374 30BD pop {r4, r5, pc} 1441 .LVL71: 1442 .L89: 758:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1443 .loc 1 758 0 1444 0376 0120 movs r0, #1 1445 0378 FBE7 b .L66 1446 .L90: 1447 037a 0120 movs r0, #1 1448 037c F9E7 b .L66 1449 .L91: 1450 037e 0120 movs r0, #1 ARM GAS /tmp/ccApM0GN.s page 72 1451 0380 F7E7 b .L66 1452 .L92: 765:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1453 .loc 1 765 0 1454 0382 0220 movs r0, #2 1455 0384 F5E7 b .L66 1456 .LVL72: 1457 .L93: 821:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1458 .loc 1 821 0 1459 0386 0320 movs r0, #3 1460 0388 F3E7 b .L66 1461 .L94: 835:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1462 .loc 1 835 0 1463 038a 0320 movs r0, #3 1464 038c F1E7 b .L66 1465 .L95: 851:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1466 .loc 1 851 0 1467 038e 0320 movs r0, #3 1468 0390 EFE7 b .L66 1469 .L96: 864:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1470 .loc 1 864 0 1471 0392 0320 movs r0, #3 1472 0394 EDE7 b .L66 1473 .L97: 892:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1474 .loc 1 892 0 1475 0396 0320 movs r0, #3 1476 0398 EBE7 b .L66 1477 .L98: 905:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1478 .loc 1 905 0 1479 039a 0320 movs r0, #3 1480 039c E9E7 b .L66 1481 .L99: 920:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1482 .loc 1 920 0 1483 039e 0320 movs r0, #3 1484 03a0 E7E7 b .L66 1485 .L100: 931:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1486 .loc 1 931 0 1487 03a2 0320 movs r0, #3 1488 03a4 E5E7 b .L66 1489 .L113: 1490 03a6 C046 .align 2 1491 .L112: 1492 03a8 FFDFFFFF .word -8193 1493 .cfi_endproc 1494 .LFE45: 1496 .section .text.HAL_SPI_Receive,"ax",%progbits 1497 .align 1 1498 .global HAL_SPI_Receive 1499 .syntax unified ARM GAS /tmp/ccApM0GN.s page 73 1500 .code 16 1501 .thumb_func 1502 .fpu softvfp 1504 HAL_SPI_Receive: 1505 .LFB44: 575:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __IO uint16_t tmpreg = 0U; 1506 .loc 1 575 0 1507 .cfi_startproc 1508 @ args = 0, pretend = 0, frame = 8 1509 @ frame_needed = 0, uses_anonymous_args = 0 1510 .LVL73: 1511 0000 70B5 push {r4, r5, r6, lr} 1512 .LCFI8: 1513 .cfi_def_cfa_offset 16 1514 .cfi_offset 4, -16 1515 .cfi_offset 5, -12 1516 .cfi_offset 6, -8 1517 .cfi_offset 14, -4 1518 0002 84B0 sub sp, sp, #16 1519 .LCFI9: 1520 .cfi_def_cfa_offset 32 1521 0004 0400 movs r4, r0 1522 0006 1D00 movs r5, r3 576:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1523 .loc 1 576 0 1524 0008 0E23 movs r3, #14 1525 .LVL74: 1526 000a 6B44 add r3, r3, sp 1527 000c 0020 movs r0, #0 1528 .LVL75: 1529 000e 1880 strh r0, [r3] 578:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1530 .loc 1 578 0 1531 0010 5123 movs r3, #81 1532 0012 E35C ldrb r3, [r4, r3] 1533 0014 012B cmp r3, #1 1534 0016 00D0 beq .LCB1492 1535 0018 0EE1 b .L132 @long jump 1536 .LCB1492: 580:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1537 .loc 1 580 0 1538 001a 0029 cmp r1, #0 1539 001c 00D1 bne .LCB1494 1540 001e 0FE1 b .L133 @long jump 1541 .LCB1494: 580:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1542 .loc 1 580 0 is_stmt 0 discriminator 1 1543 0020 002A cmp r2, #0 1544 0022 00D1 bne .LCB1496 1545 0024 0EE1 b .L134 @long jump 1546 .LCB1496: 586:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1547 .loc 1 586 0 is_stmt 1 1548 0026 4F33 adds r3, r3, #79 1549 0028 E35C ldrb r3, [r4, r3] 1550 002a 012B cmp r3, #1 1551 002c 00D1 bne .LCB1500 ARM GAS /tmp/ccApM0GN.s page 74 1552 002e 0BE1 b .L135 @long jump 1553 .LCB1500: 586:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1554 .loc 1 586 0 is_stmt 0 discriminator 2 1555 0030 5023 movs r3, #80 1556 0032 0130 adds r0, r0, #1 1557 0034 E054 strb r0, [r4, r3] 589:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->ErrorCode = HAL_SPI_ERROR_NONE; 1558 .loc 1 589 0 is_stmt 1 discriminator 2 1559 0036 0133 adds r3, r3, #1 1560 0038 2130 adds r0, r0, #33 1561 003a E054 strb r0, [r4, r3] 590:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1562 .loc 1 590 0 discriminator 2 1563 003c 0023 movs r3, #0 1564 003e 6365 str r3, [r4, #84] 592:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferSize = Size; 1565 .loc 1 592 0 discriminator 2 1566 0040 A163 str r1, [r4, #56] 593:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = Size; 1567 .loc 1 593 0 discriminator 2 1568 0042 A287 strh r2, [r4, #60] 594:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1569 .loc 1 594 0 discriminator 2 1570 0044 E287 strh r2, [r4, #62] 597:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxISR = 0U; 1571 .loc 1 597 0 discriminator 2 1572 0046 A364 str r3, [r4, #72] 598:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr = NULL; 1573 .loc 1 598 0 discriminator 2 1574 0048 E364 str r3, [r4, #76] 599:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferSize = 0U; 1575 .loc 1 599 0 discriminator 2 1576 004a 2363 str r3, [r4, #48] 600:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = 0U; 1577 .loc 1 600 0 discriminator 2 1578 004c A386 strh r3, [r4, #52] 601:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1579 .loc 1 601 0 discriminator 2 1580 004e E386 strh r3, [r4, #54] 604:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1581 .loc 1 604 0 discriminator 2 1582 0050 8023 movs r3, #128 1583 0052 1B02 lsls r3, r3, #8 1584 0054 A068 ldr r0, [r4, #8] 1585 0056 9842 cmp r0, r3 1586 0058 2ED0 beq .L139 1587 .L116: 610:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1588 .loc 1 610 0 1589 005a 8023 movs r3, #128 1590 005c 9B01 lsls r3, r3, #6 1591 005e A06A ldr r0, [r4, #40] 1592 0060 9842 cmp r0, r3 1593 0062 2FD0 beq .L140 1594 .L117: 615:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { ARM GAS /tmp/ccApM0GN.s page 75 1595 .loc 1 615 0 1596 0064 8223 movs r3, #130 1597 0066 5B00 lsls r3, r3, #1 1598 0068 6068 ldr r0, [r4, #4] 1599 006a 9842 cmp r0, r3 1600 006c 36D0 beq .L141 1601 .L118: 625:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1602 .loc 1 625 0 1603 006e 2368 ldr r3, [r4] 1604 0070 1A68 ldr r2, [r3] 1605 .LVL76: 1606 0072 5206 lsls r2, r2, #25 1607 0074 03D4 bmi .L119 628:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1608 .loc 1 628 0 1609 0076 1A68 ldr r2, [r3] 1610 0078 4021 movs r1, #64 1611 .LVL77: 1612 007a 0A43 orrs r2, r1 1613 007c 1A60 str r2, [r3] 1614 .L119: 632:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1615 .loc 1 632 0 1616 007e E368 ldr r3, [r4, #12] 1617 0080 002B cmp r3, #0 1618 0082 39D0 beq .L120 1619 .L121: 654:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1620 .loc 1 654 0 1621 0084 E38F ldrh r3, [r4, #62] 1622 0086 9BB2 uxth r3, r3 1623 0088 012B cmp r3, #1 1624 008a 00D8 bhi .LCB1562 1625 008c 84E0 b .L142 @long jump 1626 .LCB1562: 657:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1627 .loc 1 657 0 1628 008e 2B00 movs r3, r5 1629 0090 0022 movs r2, #0 1630 0092 0121 movs r1, #1 1631 0094 2000 movs r0, r4 1632 0096 FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 1633 .LVL78: 1634 009a 0028 cmp r0, #0 1635 009c 00D0 beq .LCB1570 1636 009e D7E0 b .L137 @long jump 1637 .LCB1570: 662:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr+=2U; 1638 .loc 1 662 0 1639 00a0 2368 ldr r3, [r4] 1640 00a2 DB68 ldr r3, [r3, #12] 1641 00a4 A26B ldr r2, [r4, #56] 1642 00a6 1380 strh r3, [r2] 663:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount--; 1643 .loc 1 663 0 1644 00a8 A36B ldr r3, [r4, #56] ARM GAS /tmp/ccApM0GN.s page 76 1645 00aa 0233 adds r3, r3, #2 1646 00ac A363 str r3, [r4, #56] 664:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1647 .loc 1 664 0 1648 00ae E38F ldrh r3, [r4, #62] 1649 00b0 013B subs r3, r3, #1 1650 00b2 9BB2 uxth r3, r3 1651 00b4 E387 strh r3, [r4, #62] 1652 00b6 E5E7 b .L121 1653 .LVL79: 1654 .L139: 606:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1655 .loc 1 606 0 1656 00b8 2068 ldr r0, [r4] 1657 00ba 0368 ldr r3, [r0] 1658 00bc 664E ldr r6, .L149 1659 00be 3340 ands r3, r6 1660 00c0 0360 str r3, [r0] 1661 00c2 CAE7 b .L116 1662 .L140: 612:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1663 .loc 1 612 0 1664 00c4 2068 ldr r0, [r4] 1665 00c6 0368 ldr r3, [r0] 1666 00c8 644E ldr r6, .L149+4 1667 00ca 3340 ands r3, r6 1668 00cc 0360 str r3, [r0] 1669 00ce 2068 ldr r0, [r4] 1670 00d0 0668 ldr r6, [r0] 1671 00d2 8023 movs r3, #128 1672 00d4 9B01 lsls r3, r3, #6 1673 00d6 3343 orrs r3, r6 1674 00d8 0360 str r3, [r0] 1675 00da C3E7 b .L117 1676 .L141: 615:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1677 .loc 1 615 0 discriminator 1 1678 00dc A368 ldr r3, [r4, #8] 1679 00de 002B cmp r3, #0 1680 00e0 C5D1 bne .L118 618:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1681 .loc 1 618 0 1682 00e2 5033 adds r3, r3, #80 1683 00e4 0020 movs r0, #0 1684 00e6 E054 strb r0, [r4, r3] 621:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1685 .loc 1 621 0 1686 00e8 0095 str r5, [sp] 1687 00ea 1300 movs r3, r2 1688 00ec 0A00 movs r2, r1 1689 .LVL80: 1690 00ee 2000 movs r0, r4 1691 00f0 FFF7FEFF bl HAL_SPI_TransmitReceive 1692 .LVL81: 1693 00f4 0600 movs r6, r0 1694 00f6 A0E0 b .L115 1695 .L120: ARM GAS /tmp/ccApM0GN.s page 77 634:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1696 .loc 1 634 0 1697 00f8 E38F ldrh r3, [r4, #62] 1698 00fa 9BB2 uxth r3, r3 1699 00fc 012B cmp r3, #1 1700 00fe 13D9 bls .L143 637:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1701 .loc 1 637 0 1702 0100 2B00 movs r3, r5 1703 0102 0022 movs r2, #0 1704 0104 0121 movs r1, #1 1705 0106 2000 movs r0, r4 1706 0108 FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 1707 .LVL82: 1708 010c 0028 cmp r0, #0 1709 010e 00D0 beq .LCB1653 1710 0110 9CE0 b .L136 @long jump 1711 .LCB1653: 642:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount--; 1712 .loc 1 642 0 1713 0112 2368 ldr r3, [r4] 1714 0114 DA68 ldr r2, [r3, #12] 1715 0116 A36B ldr r3, [r4, #56] 1716 0118 591C adds r1, r3, #1 1717 011a A163 str r1, [r4, #56] 1718 011c 1A70 strb r2, [r3] 643:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1719 .loc 1 643 0 1720 011e E38F ldrh r3, [r4, #62] 1721 0120 013B subs r3, r3, #1 1722 0122 9BB2 uxth r3, r3 1723 0124 E387 strh r3, [r4, #62] 1724 0126 E7E7 b .L120 1725 .L143: 646:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1726 .loc 1 646 0 1727 0128 8023 movs r3, #128 1728 012a 9B01 lsls r3, r3, #6 1729 012c A26A ldr r2, [r4, #40] 1730 012e 9A42 cmp r2, r3 1731 0130 2BD0 beq .L144 1732 .L123: 674:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1733 .loc 1 674 0 1734 0132 2B00 movs r3, r5 1735 0134 0022 movs r2, #0 1736 0136 0121 movs r1, #1 1737 0138 2000 movs r0, r4 1738 013a FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 1739 .LVL83: 1740 013e 061E subs r6, r0, #0 1741 0140 00D0 beq .LCB1687 1742 0142 87E0 b .L138 @long jump 1743 .LCB1687: 680:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1744 .loc 1 680 0 1745 0144 E368 ldr r3, [r4, #12] ARM GAS /tmp/ccApM0GN.s page 78 1746 0146 002B cmp r3, #0 1747 0148 32D1 bne .L125 682:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1748 .loc 1 682 0 1749 014a 2368 ldr r3, [r4] 1750 014c DA68 ldr r2, [r3, #12] 1751 014e A36B ldr r3, [r4, #56] 1752 0150 591C adds r1, r3, #1 1753 0152 A163 str r1, [r4, #56] 1754 0154 1A70 strb r2, [r3] 1755 .L126: 690:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1756 .loc 1 690 0 1757 0156 E38F ldrh r3, [r4, #62] 1758 0158 013B subs r3, r3, #1 1759 015a 9BB2 uxth r3, r3 1760 015c E387 strh r3, [r4, #62] 693:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1761 .loc 1 693 0 1762 015e 8023 movs r3, #128 1763 0160 9B01 lsls r3, r3, #6 1764 0162 A26A ldr r2, [r4, #40] 1765 0164 9A42 cmp r2, r3 1766 0166 2BD0 beq .L145 1767 .L127: 707:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1768 .loc 1 707 0 1769 0168 8223 movs r3, #130 1770 016a 5B00 lsls r3, r3, #1 1771 016c 6268 ldr r2, [r4, #4] 1772 016e 9A42 cmp r2, r3 1773 0170 3CD0 beq .L146 1774 .L129: 713:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1775 .loc 1 713 0 1776 0172 5123 movs r3, #81 1777 0174 0122 movs r2, #1 1778 0176 E254 strb r2, [r4, r3] 716:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1779 .loc 1 716 0 1780 0178 8023 movs r3, #128 1781 017a 9B01 lsls r3, r3, #6 1782 017c A26A ldr r2, [r4, #40] 1783 017e 9A42 cmp r2, r3 1784 0180 43D0 beq .L147 1785 .L131: 730:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1786 .loc 1 730 0 1787 0182 5023 movs r3, #80 1788 0184 0022 movs r2, #0 1789 0186 E254 strb r2, [r4, r3] 732:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1790 .loc 1 732 0 1791 0188 57E0 b .L115 1792 .L144: 648:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1793 .loc 1 648 0 ARM GAS /tmp/ccApM0GN.s page 79 1794 018a 2268 ldr r2, [r4] 1795 018c 1168 ldr r1, [r2] 1796 018e 8023 movs r3, #128 1797 0190 5B01 lsls r3, r3, #5 1798 0192 0B43 orrs r3, r1 1799 0194 1360 str r3, [r2] 1800 0196 CCE7 b .L123 1801 .L142: 667:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1802 .loc 1 667 0 1803 0198 8023 movs r3, #128 1804 019a 9B01 lsls r3, r3, #6 1805 019c A26A ldr r2, [r4, #40] 1806 019e 9A42 cmp r2, r3 1807 01a0 C7D1 bne .L123 669:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1808 .loc 1 669 0 1809 01a2 2268 ldr r2, [r4] 1810 01a4 1168 ldr r1, [r2] 1811 01a6 8023 movs r3, #128 1812 01a8 5B01 lsls r3, r3, #5 1813 01aa 0B43 orrs r3, r1 1814 01ac 1360 str r3, [r2] 1815 01ae C0E7 b .L123 1816 .L125: 687:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr+=2U; 1817 .loc 1 687 0 1818 01b0 2368 ldr r3, [r4] 1819 01b2 DB68 ldr r3, [r3, #12] 1820 01b4 A26B ldr r2, [r4, #56] 1821 01b6 1380 strh r3, [r2] 688:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1822 .loc 1 688 0 1823 01b8 A36B ldr r3, [r4, #56] 1824 01ba 0233 adds r3, r3, #2 1825 01bc A363 str r3, [r4, #56] 1826 01be CAE7 b .L126 1827 .L145: 696:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1828 .loc 1 696 0 1829 01c0 2B00 movs r3, r5 1830 01c2 0022 movs r2, #0 1831 01c4 0121 movs r1, #1 1832 01c6 2000 movs r0, r4 1833 01c8 FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 1834 .LVL84: 1835 01cc 0028 cmp r0, #0 1836 01ce 07D1 bne .L148 703:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** UNUSED(tmpreg); /* avoid warning on tmpreg affectation with stupid compiler */ 1837 .loc 1 703 0 1838 01d0 2368 ldr r3, [r4] 1839 01d2 DB68 ldr r3, [r3, #12] 1840 01d4 9BB2 uxth r3, r3 1841 01d6 0E22 movs r2, #14 1842 01d8 6A44 add r2, r2, sp 1843 01da 1380 strh r3, [r2] 704:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } ARM GAS /tmp/ccApM0GN.s page 80 1844 .loc 1 704 0 1845 01dc 1388 ldrh r3, [r2] 1846 01de C3E7 b .L127 1847 .L148: 698:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_TIMEOUT; 1848 .loc 1 698 0 1849 01e0 636D ldr r3, [r4, #84] 1850 01e2 0222 movs r2, #2 1851 01e4 1343 orrs r3, r2 1852 01e6 6365 str r3, [r4, #84] 699:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1853 .loc 1 699 0 1854 01e8 0326 movs r6, #3 1855 01ea 26E0 b .L115 1856 .L146: 707:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1857 .loc 1 707 0 discriminator 1 1858 01ec A368 ldr r3, [r4, #8] 1859 01ee 8022 movs r2, #128 1860 01f0 1202 lsls r2, r2, #8 1861 01f2 9342 cmp r3, r2 1862 01f4 03D0 beq .L130 707:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1863 .loc 1 707 0 is_stmt 0 discriminator 2 1864 01f6 8022 movs r2, #128 1865 01f8 D200 lsls r2, r2, #3 1866 01fa 9342 cmp r3, r2 1867 01fc B9D1 bne .L129 1868 .L130: 710:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1869 .loc 1 710 0 is_stmt 1 1870 01fe 2268 ldr r2, [r4] 1871 0200 1368 ldr r3, [r2] 1872 0202 4021 movs r1, #64 1873 0204 8B43 bics r3, r1 1874 0206 1360 str r3, [r2] 1875 0208 B3E7 b .L129 1876 .L147: 716:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1877 .loc 1 716 0 discriminator 1 1878 020a 2368 ldr r3, [r4] 1879 020c 9A68 ldr r2, [r3, #8] 1880 020e D206 lsls r2, r2, #27 1881 0210 B7D5 bpl .L131 718:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1882 .loc 1 718 0 1883 0212 626D ldr r2, [r4, #84] 1884 0214 0221 movs r1, #2 1885 0216 0A43 orrs r2, r1 1886 0218 6265 str r2, [r4, #84] 721:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1887 .loc 1 721 0 1888 021a 1A68 ldr r2, [r3] 1889 021c 0F49 ldr r1, .L149+4 1890 021e 0A40 ands r2, r1 1891 0220 1A60 str r2, [r3] 1892 0222 2268 ldr r2, [r4] ARM GAS /tmp/ccApM0GN.s page 81 1893 0224 1168 ldr r1, [r2] 1894 0226 8023 movs r3, #128 1895 0228 9B01 lsls r3, r3, #6 1896 022a 0B43 orrs r3, r1 1897 022c 1360 str r3, [r2] 724:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1898 .loc 1 724 0 1899 022e 5023 movs r3, #80 1900 0230 0022 movs r2, #0 1901 0232 E254 strb r2, [r4, r3] 726:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1902 .loc 1 726 0 1903 0234 0126 movs r6, #1 1904 0236 00E0 b .L115 1905 .LVL85: 1906 .L132: 736:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1907 .loc 1 736 0 1908 0238 0226 movs r6, #2 1909 .LVL86: 1910 .L115: 738:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1911 .loc 1 738 0 1912 023a 3000 movs r0, r6 1913 023c 04B0 add sp, sp, #16 1914 @ sp needed 1915 .LVL87: 1916 .LVL88: 1917 023e 70BD pop {r4, r5, r6, pc} 1918 .LVL89: 1919 .L133: 582:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1920 .loc 1 582 0 1921 0240 0126 movs r6, #1 1922 0242 FAE7 b .L115 1923 .L134: 1924 0244 0126 movs r6, #1 1925 0246 F8E7 b .L115 1926 .L135: 586:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1927 .loc 1 586 0 1928 0248 0226 movs r6, #2 1929 024a F6E7 b .L115 1930 .LVL90: 1931 .L136: 639:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1932 .loc 1 639 0 1933 024c 0326 movs r6, #3 1934 024e F4E7 b .L115 1935 .L137: 659:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1936 .loc 1 659 0 1937 0250 0326 movs r6, #3 1938 0252 F2E7 b .L115 1939 .L138: 676:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 1940 .loc 1 676 0 ARM GAS /tmp/ccApM0GN.s page 82 1941 0254 0326 movs r6, #3 1942 0256 F0E7 b .L115 1943 .L150: 1944 .align 2 1945 .L149: 1946 0258 FFBFFFFF .word -16385 1947 025c FFDFFFFF .word -8193 1948 .cfi_endproc 1949 .LFE44: 1951 .section .text.HAL_SPI_Transmit_IT,"ax",%progbits 1952 .align 1 1953 .global HAL_SPI_Transmit_IT 1954 .syntax unified 1955 .code 16 1956 .thumb_func 1957 .fpu softvfp 1959 HAL_SPI_Transmit_IT: 1960 .LFB46: 996:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->State == HAL_SPI_STATE_READY) 1961 .loc 1 996 0 1962 .cfi_startproc 1963 @ args = 0, pretend = 0, frame = 0 1964 @ frame_needed = 0, uses_anonymous_args = 0 1965 .LVL91: 1966 0000 10B5 push {r4, lr} 1967 .LCFI10: 1968 .cfi_def_cfa_offset 8 1969 .cfi_offset 4, -8 1970 .cfi_offset 14, -4 997:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1971 .loc 1 997 0 1972 0002 5123 movs r3, #81 1973 0004 C35C ldrb r3, [r0, r3] 1974 0006 012B cmp r3, #1 1975 0008 50D1 bne .L157 999:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1976 .loc 1 999 0 1977 000a 0029 cmp r1, #0 1978 000c 50D0 beq .L158 999:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 1979 .loc 1 999 0 is_stmt 0 discriminator 1 1980 000e 002A cmp r2, #0 1981 0010 50D0 beq .L159 1008:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1982 .loc 1 1008 0 is_stmt 1 1983 0012 4F33 adds r3, r3, #79 1984 0014 C35C ldrb r3, [r0, r3] 1985 0016 012B cmp r3, #1 1986 0018 4ED0 beq .L160 1008:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1987 .loc 1 1008 0 is_stmt 0 discriminator 2 1988 001a 5023 movs r3, #80 1989 001c 0124 movs r4, #1 1990 001e C454 strb r4, [r0, r3] 1011:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->ErrorCode = HAL_SPI_ERROR_NONE; 1991 .loc 1 1011 0 is_stmt 1 discriminator 2 1992 0020 0133 adds r3, r3, #1 ARM GAS /tmp/ccApM0GN.s page 83 1993 0022 1134 adds r4, r4, #17 1994 0024 C454 strb r4, [r0, r3] 1012:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 1995 .loc 1 1012 0 discriminator 2 1996 0026 0023 movs r3, #0 1997 0028 4365 str r3, [r0, #84] 1014:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr = pData; 1998 .loc 1 1014 0 discriminator 2 1999 002a 254C ldr r4, .L164 2000 002c C464 str r4, [r0, #76] 1015:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferSize = Size; 2001 .loc 1 1015 0 discriminator 2 2002 002e 0163 str r1, [r0, #48] 1016:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = Size; 2003 .loc 1 1016 0 discriminator 2 2004 0030 8286 strh r2, [r0, #52] 1017:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2005 .loc 1 1017 0 discriminator 2 2006 0032 C286 strh r2, [r0, #54] 1020:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr = NULL; 2007 .loc 1 1020 0 discriminator 2 2008 0034 8364 str r3, [r0, #72] 1021:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferSize = 0U; 2009 .loc 1 1021 0 discriminator 2 2010 0036 8363 str r3, [r0, #56] 1022:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = 0U; 2011 .loc 1 1022 0 discriminator 2 2012 0038 8387 strh r3, [r0, #60] 1023:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2013 .loc 1 1023 0 discriminator 2 2014 003a C387 strh r3, [r0, #62] 1026:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2015 .loc 1 1026 0 discriminator 2 2016 003c 8023 movs r3, #128 2017 003e 1B02 lsls r3, r3, #8 2018 0040 8268 ldr r2, [r0, #8] 2019 .LVL92: 2020 0042 9A42 cmp r2, r3 2021 0044 19D0 beq .L162 2022 .LVL93: 2023 .L153: 1032:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2024 .loc 1 1032 0 2025 0046 8023 movs r3, #128 2026 0048 9B01 lsls r3, r3, #6 2027 004a 826A ldr r2, [r0, #40] 2028 004c 9A42 cmp r2, r3 2029 004e 1BD0 beq .L163 2030 .L154: 1037:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2031 .loc 1 1037 0 2032 0050 8368 ldr r3, [r0, #8] 2033 0052 002B cmp r3, #0 2034 0054 24D1 bne .L155 1039:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2035 .loc 1 1039 0 2036 0056 0268 ldr r2, [r0] ARM GAS /tmp/ccApM0GN.s page 84 2037 0058 5368 ldr r3, [r2, #4] 2038 005a 8021 movs r1, #128 2039 005c 0B43 orrs r3, r1 2040 005e 5360 str r3, [r2, #4] 2041 .L156: 1047:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2042 .loc 1 1047 0 2043 0060 5023 movs r3, #80 2044 0062 0022 movs r2, #0 2045 0064 C254 strb r2, [r0, r3] 1050:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2046 .loc 1 1050 0 2047 0066 0368 ldr r3, [r0] 2048 0068 1A68 ldr r2, [r3] 2049 006a 5206 lsls r2, r2, #25 2050 006c 26D4 bmi .L161 1053:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2051 .loc 1 1053 0 2052 006e 1A68 ldr r2, [r3] 2053 0070 4021 movs r1, #64 2054 0072 0A43 orrs r2, r1 2055 0074 1A60 str r2, [r3] 1056:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2056 .loc 1 1056 0 2057 0076 0020 movs r0, #0 2058 .LVL94: 2059 0078 19E0 b .L152 2060 .LVL95: 2061 .L162: 1028:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2062 .loc 1 1028 0 2063 007a 0268 ldr r2, [r0] 2064 007c 1168 ldr r1, [r2] 2065 .LVL96: 2066 007e 8023 movs r3, #128 2067 0080 DB01 lsls r3, r3, #7 2068 0082 0B43 orrs r3, r1 2069 0084 1360 str r3, [r2] 2070 .LVL97: 2071 0086 DEE7 b .L153 2072 .L163: 1034:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2073 .loc 1 1034 0 2074 0088 0268 ldr r2, [r0] 2075 008a 1368 ldr r3, [r2] 2076 008c 0D49 ldr r1, .L164+4 2077 008e 0B40 ands r3, r1 2078 0090 1360 str r3, [r2] 2079 0092 0268 ldr r2, [r0] 2080 0094 1168 ldr r1, [r2] 2081 0096 8023 movs r3, #128 2082 0098 9B01 lsls r3, r3, #6 2083 009a 0B43 orrs r3, r1 2084 009c 1360 str r3, [r2] 2085 009e D7E7 b .L154 2086 .L155: 1044:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } ARM GAS /tmp/ccApM0GN.s page 85 2087 .loc 1 1044 0 2088 00a0 0268 ldr r2, [r0] 2089 00a2 5368 ldr r3, [r2, #4] 2090 00a4 A021 movs r1, #160 2091 00a6 0B43 orrs r3, r1 2092 00a8 5360 str r3, [r2, #4] 2093 00aa D9E7 b .L156 2094 .LVL98: 2095 .L157: 1060:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2096 .loc 1 1060 0 2097 00ac 0220 movs r0, #2 2098 .LVL99: 2099 .L152: 1062:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2100 .loc 1 1062 0 2101 @ sp needed 2102 00ae 10BD pop {r4, pc} 2103 .LVL100: 2104 .L158: 1001:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2105 .loc 1 1001 0 2106 00b0 0120 movs r0, #1 2107 .LVL101: 2108 00b2 FCE7 b .L152 2109 .LVL102: 2110 .L159: 2111 00b4 0120 movs r0, #1 2112 .LVL103: 2113 00b6 FAE7 b .L152 2114 .LVL104: 2115 .L160: 1008:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2116 .loc 1 1008 0 2117 00b8 0220 movs r0, #2 2118 .LVL105: 2119 00ba F8E7 b .L152 2120 .LVL106: 2121 .L161: 1056:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2122 .loc 1 1056 0 2123 00bc 0020 movs r0, #0 2124 .LVL107: 2125 00be F6E7 b .L152 2126 .L165: 2127 .align 2 2128 .L164: 2129 00c0 00000000 .word SPI_TxISR 2130 00c4 FFDFFFFF .word -8193 2131 .cfi_endproc 2132 .LFE46: 2134 .section .text.HAL_SPI_TransmitReceive_IT,"ax",%progbits 2135 .align 1 2136 .global HAL_SPI_TransmitReceive_IT 2137 .syntax unified 2138 .code 16 2139 .thumb_func ARM GAS /tmp/ccApM0GN.s page 86 2140 .fpu softvfp 2142 HAL_SPI_TransmitReceive_IT: 2143 .LFB48: 1154:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2144 .loc 1 1154 0 2145 .cfi_startproc 2146 @ args = 0, pretend = 0, frame = 0 2147 @ frame_needed = 0, uses_anonymous_args = 0 2148 .LVL108: 2149 0000 30B5 push {r4, r5, lr} 2150 .LCFI11: 2151 .cfi_def_cfa_offset 12 2152 .cfi_offset 4, -12 2153 .cfi_offset 5, -8 2154 .cfi_offset 14, -4 1156:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ((hspi->Init.Mode == SPI_MODE_MASTER) && (hspi->Init.Direction == SPI_DIRECTION_2LINES) && (hs 2155 .loc 1 1156 0 2156 0002 5124 movs r4, #81 2157 0004 045D ldrb r4, [r0, r4] 2158 0006 012C cmp r4, #1 2159 0008 0BD0 beq .L167 1156:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ((hspi->Init.Mode == SPI_MODE_MASTER) && (hspi->Init.Direction == SPI_DIRECTION_2LINES) && (hs 2160 .loc 1 1156 0 is_stmt 0 discriminator 1 2161 000a 8224 movs r4, #130 2162 000c 6400 lsls r4, r4, #1 2163 000e 4568 ldr r5, [r0, #4] 2164 0010 A542 cmp r5, r4 2165 0012 49D1 bne .L171 1157:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2166 .loc 1 1157 0 is_stmt 1 2167 0014 8468 ldr r4, [r0, #8] 2168 0016 002C cmp r4, #0 2169 0018 48D1 bne .L172 1157:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2170 .loc 1 1157 0 is_stmt 0 discriminator 1 2171 001a 5134 adds r4, r4, #81 2172 001c 045D ldrb r4, [r0, r4] 2173 001e 222C cmp r4, #34 2174 0020 46D1 bne .L173 2175 .L167: 1159:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2176 .loc 1 1159 0 is_stmt 1 2177 0022 0029 cmp r1, #0 2178 0024 46D0 beq .L174 1159:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2179 .loc 1 1159 0 is_stmt 0 discriminator 1 2180 0026 002A cmp r2, #0 2181 0028 46D0 beq .L175 1159:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2182 .loc 1 1159 0 discriminator 2 2183 002a 002B cmp r3, #0 2184 002c 46D0 beq .L176 1168:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2185 .loc 1 1168 0 is_stmt 1 2186 002e 5024 movs r4, #80 2187 0030 045D ldrb r4, [r0, r4] 2188 0032 012C cmp r4, #1 ARM GAS /tmp/ccApM0GN.s page 87 2189 0034 44D0 beq .L177 1168:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2190 .loc 1 1168 0 is_stmt 0 discriminator 2 2191 0036 5024 movs r4, #80 2192 0038 0125 movs r5, #1 2193 003a 0555 strb r5, [r0, r4] 1171:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2194 .loc 1 1171 0 is_stmt 1 discriminator 2 2195 003c 0134 adds r4, r4, #1 2196 003e 045D ldrb r4, [r0, r4] 2197 0040 222C cmp r4, #34 2198 0042 02D0 beq .L169 1173:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2199 .loc 1 1173 0 2200 0044 5124 movs r4, #81 2201 0046 3135 adds r5, r5, #49 2202 0048 0555 strb r5, [r0, r4] 2203 .L169: 1177:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2204 .loc 1 1177 0 2205 004a 0024 movs r4, #0 2206 004c 4465 str r4, [r0, #84] 1179:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr = pTxData; 2207 .loc 1 1179 0 2208 004e 1E4C ldr r4, .L180 2209 0050 C464 str r4, [r0, #76] 1180:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferSize = Size; 2210 .loc 1 1180 0 2211 0052 0163 str r1, [r0, #48] 1181:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = Size; 2212 .loc 1 1181 0 2213 0054 8386 strh r3, [r0, #52] 1182:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2214 .loc 1 1182 0 2215 0056 C386 strh r3, [r0, #54] 1184:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr = pRxData; 2216 .loc 1 1184 0 2217 0058 1C49 ldr r1, .L180+4 2218 .LVL109: 2219 005a 8164 str r1, [r0, #72] 1185:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferSize = Size; 2220 .loc 1 1185 0 2221 005c 8263 str r2, [r0, #56] 1186:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = Size; 2222 .loc 1 1186 0 2223 005e 8387 strh r3, [r0, #60] 1187:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2224 .loc 1 1187 0 2225 0060 C387 strh r3, [r0, #62] 1190:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2226 .loc 1 1190 0 2227 0062 8023 movs r3, #128 2228 .LVL110: 2229 0064 9B01 lsls r3, r3, #6 2230 0066 826A ldr r2, [r0, #40] 2231 .LVL111: 2232 0068 9A42 cmp r2, r3 ARM GAS /tmp/ccApM0GN.s page 88 2233 006a 11D0 beq .L179 2234 .LVL112: 2235 .L170: 1196:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2236 .loc 1 1196 0 2237 006c 0268 ldr r2, [r0] 2238 006e 5368 ldr r3, [r2, #4] 2239 0070 E021 movs r1, #224 2240 0072 0B43 orrs r3, r1 2241 0074 5360 str r3, [r2, #4] 1199:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2242 .loc 1 1199 0 2243 0076 5023 movs r3, #80 2244 0078 0022 movs r2, #0 2245 007a C254 strb r2, [r0, r3] 1202:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2246 .loc 1 1202 0 2247 007c 0368 ldr r3, [r0] 2248 007e 1A68 ldr r2, [r3] 2249 0080 5206 lsls r2, r2, #25 2250 0082 1FD4 bmi .L178 1205:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2251 .loc 1 1205 0 2252 0084 1A68 ldr r2, [r3] 2253 0086 A039 subs r1, r1, #160 2254 0088 0A43 orrs r2, r1 2255 008a 1A60 str r2, [r3] 1208:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2256 .loc 1 1208 0 2257 008c 0020 movs r0, #0 2258 .LVL113: 2259 008e 0CE0 b .L168 2260 .LVL114: 2261 .L179: 1192:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2262 .loc 1 1192 0 2263 0090 0268 ldr r2, [r0] 2264 0092 1368 ldr r3, [r2] 2265 0094 0E49 ldr r1, .L180+8 2266 0096 0B40 ands r3, r1 2267 0098 1360 str r3, [r2] 2268 .LVL115: 2269 009a 0268 ldr r2, [r0] 2270 009c 1168 ldr r1, [r2] 2271 009e 8023 movs r3, #128 2272 00a0 9B01 lsls r3, r3, #6 2273 00a2 0B43 orrs r3, r1 2274 00a4 1360 str r3, [r2] 2275 00a6 E1E7 b .L170 2276 .LVL116: 2277 .L171: 1212:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2278 .loc 1 1212 0 2279 00a8 0220 movs r0, #2 2280 .LVL117: 2281 .L168: 1214:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ARM GAS /tmp/ccApM0GN.s page 89 2282 .loc 1 1214 0 2283 @ sp needed 2284 00aa 30BD pop {r4, r5, pc} 2285 .LVL118: 2286 .L172: 1212:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2287 .loc 1 1212 0 2288 00ac 0220 movs r0, #2 2289 .LVL119: 2290 00ae FCE7 b .L168 2291 .LVL120: 2292 .L173: 2293 00b0 0220 movs r0, #2 2294 .LVL121: 2295 00b2 FAE7 b .L168 2296 .LVL122: 2297 .L174: 1161:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2298 .loc 1 1161 0 2299 00b4 0120 movs r0, #1 2300 .LVL123: 2301 00b6 F8E7 b .L168 2302 .LVL124: 2303 .L175: 2304 00b8 0120 movs r0, #1 2305 .LVL125: 2306 00ba F6E7 b .L168 2307 .LVL126: 2308 .L176: 2309 00bc 0120 movs r0, #1 2310 .LVL127: 2311 00be F4E7 b .L168 2312 .LVL128: 2313 .L177: 1168:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2314 .loc 1 1168 0 2315 00c0 0220 movs r0, #2 2316 .LVL129: 2317 00c2 F2E7 b .L168 2318 .LVL130: 2319 .L178: 1208:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2320 .loc 1 1208 0 2321 00c4 0020 movs r0, #0 2322 .LVL131: 2323 00c6 F0E7 b .L168 2324 .L181: 2325 .align 2 2326 .L180: 2327 00c8 00000000 .word SPI_TxISR 2328 00cc 00000000 .word SPI_2LinesRxISR 2329 00d0 FFDFFFFF .word -8193 2330 .cfi_endproc 2331 .LFE48: 2333 .section .text.HAL_SPI_Receive_IT,"ax",%progbits 2334 .align 1 2335 .global HAL_SPI_Receive_IT ARM GAS /tmp/ccApM0GN.s page 90 2336 .syntax unified 2337 .code 16 2338 .thumb_func 2339 .fpu softvfp 2341 HAL_SPI_Receive_IT: 2342 .LFB47: 1073:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->State == HAL_SPI_STATE_READY) 2343 .loc 1 1073 0 2344 .cfi_startproc 2345 @ args = 0, pretend = 0, frame = 0 2346 @ frame_needed = 0, uses_anonymous_args = 0 2347 .LVL132: 2348 0000 10B5 push {r4, lr} 2349 .LCFI12: 2350 .cfi_def_cfa_offset 8 2351 .cfi_offset 4, -8 2352 .cfi_offset 14, -4 1074:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2353 .loc 1 1074 0 2354 0002 5124 movs r4, #81 2355 0004 045D ldrb r4, [r0, r4] 2356 0006 012C cmp r4, #1 2357 0008 53D1 bne .L187 1076:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2358 .loc 1 1076 0 2359 000a 0029 cmp r1, #0 2360 000c 53D0 beq .L188 1076:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2361 .loc 1 1076 0 is_stmt 0 discriminator 1 2362 000e 002A cmp r2, #0 2363 0010 53D0 beq .L189 1082:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2364 .loc 1 1082 0 is_stmt 1 2365 0012 5023 movs r3, #80 2366 0014 C35C ldrb r3, [r0, r3] 2367 0016 012B cmp r3, #1 2368 0018 51D0 beq .L190 1082:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2369 .loc 1 1082 0 is_stmt 0 discriminator 2 2370 001a 5023 movs r3, #80 2371 001c C454 strb r4, [r0, r3] 1085:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->ErrorCode = HAL_SPI_ERROR_NONE; 2372 .loc 1 1085 0 is_stmt 1 discriminator 2 2373 001e 0133 adds r3, r3, #1 2374 0020 2134 adds r4, r4, #33 2375 0022 C454 strb r4, [r0, r3] 1086:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2376 .loc 1 1086 0 discriminator 2 2377 0024 0023 movs r3, #0 2378 0026 4365 str r3, [r0, #84] 1088:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr = pData; 2379 .loc 1 1088 0 discriminator 2 2380 0028 274C ldr r4, .L194 2381 002a 8464 str r4, [r0, #72] 1089:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferSize = Size; 2382 .loc 1 1089 0 discriminator 2 2383 002c 8163 str r1, [r0, #56] ARM GAS /tmp/ccApM0GN.s page 91 1090:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = Size ; 2384 .loc 1 1090 0 discriminator 2 2385 002e 8287 strh r2, [r0, #60] 1091:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2386 .loc 1 1091 0 discriminator 2 2387 0030 C287 strh r2, [r0, #62] 1094:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr = NULL; 2388 .loc 1 1094 0 discriminator 2 2389 0032 C364 str r3, [r0, #76] 1095:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferSize = 0U; 2390 .loc 1 1095 0 discriminator 2 2391 0034 0363 str r3, [r0, #48] 1096:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = 0U; 2392 .loc 1 1096 0 discriminator 2 2393 0036 8386 strh r3, [r0, #52] 1097:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2394 .loc 1 1097 0 discriminator 2 2395 0038 C386 strh r3, [r0, #54] 1100:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2396 .loc 1 1100 0 discriminator 2 2397 003a 8368 ldr r3, [r0, #8] 2398 003c 8024 movs r4, #128 2399 003e 2402 lsls r4, r4, #8 2400 0040 A342 cmp r3, r4 2401 0042 0ED0 beq .L192 1104:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2402 .loc 1 1104 0 2403 0044 002B cmp r3, #0 2404 0046 11D1 bne .L185 1104:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2405 .loc 1 1104 0 is_stmt 0 discriminator 1 2406 0048 0533 adds r3, r3, #5 2407 004a FF33 adds r3, r3, #255 2408 004c 4468 ldr r4, [r0, #4] 2409 004e 9C42 cmp r4, r3 2410 0050 0CD1 bne .L185 1107:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2411 .loc 1 1107 0 is_stmt 1 2412 0052 B43B subs r3, r3, #180 2413 0054 0024 movs r4, #0 2414 0056 C454 strb r4, [r0, r3] 1110:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2415 .loc 1 1110 0 2416 0058 1300 movs r3, r2 2417 005a 0A00 movs r2, r1 2418 .LVL133: 2419 005c FFF7FEFF bl HAL_SPI_TransmitReceive_IT 2420 .LVL134: 2421 0060 28E0 b .L183 2422 .LVL135: 2423 .L192: 1102:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2424 .loc 1 1102 0 2425 0062 0268 ldr r2, [r0] 2426 .LVL136: 2427 0064 1368 ldr r3, [r2] 2428 0066 1949 ldr r1, .L194+4 ARM GAS /tmp/ccApM0GN.s page 92 2429 .LVL137: 2430 0068 0B40 ands r3, r1 2431 006a 1360 str r3, [r2] 2432 .LVL138: 2433 .L185: 1114:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2434 .loc 1 1114 0 2435 006c 8023 movs r3, #128 2436 006e 9B01 lsls r3, r3, #6 2437 0070 826A ldr r2, [r0, #40] 2438 0072 9A42 cmp r2, r3 2439 0074 11D0 beq .L193 2440 .L186: 1120:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2441 .loc 1 1120 0 2442 0076 0268 ldr r2, [r0] 2443 0078 5368 ldr r3, [r2, #4] 2444 007a 6021 movs r1, #96 2445 007c 0B43 orrs r3, r1 2446 007e 5360 str r3, [r2, #4] 1123:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2447 .loc 1 1123 0 2448 0080 5023 movs r3, #80 2449 0082 0022 movs r2, #0 2450 0084 C254 strb r2, [r0, r3] 1130:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2451 .loc 1 1130 0 2452 0086 0368 ldr r3, [r0] 2453 0088 1A68 ldr r2, [r3] 2454 008a 5206 lsls r2, r2, #25 2455 008c 19D4 bmi .L191 1133:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2456 .loc 1 1133 0 2457 008e 1A68 ldr r2, [r3] 2458 0090 2039 subs r1, r1, #32 2459 0092 0A43 orrs r2, r1 2460 0094 1A60 str r2, [r3] 1136:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2461 .loc 1 1136 0 2462 0096 0020 movs r0, #0 2463 .LVL139: 2464 0098 0CE0 b .L183 2465 .LVL140: 2466 .L193: 1116:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2467 .loc 1 1116 0 2468 009a 0268 ldr r2, [r0] 2469 009c 1368 ldr r3, [r2] 2470 009e 0C49 ldr r1, .L194+8 2471 00a0 0B40 ands r3, r1 2472 00a2 1360 str r3, [r2] 2473 00a4 0268 ldr r2, [r0] 2474 00a6 1168 ldr r1, [r2] 2475 00a8 8023 movs r3, #128 2476 00aa 9B01 lsls r3, r3, #6 2477 00ac 0B43 orrs r3, r1 2478 00ae 1360 str r3, [r2] ARM GAS /tmp/ccApM0GN.s page 93 2479 00b0 E1E7 b .L186 2480 .LVL141: 2481 .L187: 1140:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2482 .loc 1 1140 0 2483 00b2 0220 movs r0, #2 2484 .LVL142: 2485 .L183: 1142:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2486 .loc 1 1142 0 2487 @ sp needed 2488 00b4 10BD pop {r4, pc} 2489 .LVL143: 2490 .L188: 1078:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2491 .loc 1 1078 0 2492 00b6 0120 movs r0, #1 2493 .LVL144: 2494 00b8 FCE7 b .L183 2495 .LVL145: 2496 .L189: 2497 00ba 0120 movs r0, #1 2498 .LVL146: 2499 00bc FAE7 b .L183 2500 .LVL147: 2501 .L190: 1082:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2502 .loc 1 1082 0 2503 00be 0220 movs r0, #2 2504 .LVL148: 2505 00c0 F8E7 b .L183 2506 .LVL149: 2507 .L191: 1136:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2508 .loc 1 1136 0 2509 00c2 0020 movs r0, #0 2510 .LVL150: 2511 00c4 F6E7 b .L183 2512 .L195: 2513 00c6 C046 .align 2 2514 .L194: 2515 00c8 00000000 .word SPI_RxISR 2516 00cc FFBFFFFF .word -16385 2517 00d0 FFDFFFFF .word -8193 2518 .cfi_endproc 2519 .LFE47: 2521 .section .text.HAL_SPI_Transmit_DMA,"ax",%progbits 2522 .align 1 2523 .global HAL_SPI_Transmit_DMA 2524 .syntax unified 2525 .code 16 2526 .thumb_func 2527 .fpu softvfp 2529 HAL_SPI_Transmit_DMA: 2530 .LFB49: 1225:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->State == HAL_SPI_STATE_READY) 2531 .loc 1 1225 0 ARM GAS /tmp/ccApM0GN.s page 94 2532 .cfi_startproc 2533 @ args = 0, pretend = 0, frame = 0 2534 @ frame_needed = 0, uses_anonymous_args = 0 2535 .LVL151: 2536 0000 70B5 push {r4, r5, r6, lr} 2537 .LCFI13: 2538 .cfi_def_cfa_offset 16 2539 .cfi_offset 4, -16 2540 .cfi_offset 5, -12 2541 .cfi_offset 6, -8 2542 .cfi_offset 14, -4 2543 0002 0400 movs r4, r0 1226:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2544 .loc 1 1226 0 2545 0004 5123 movs r3, #81 2546 0006 C35C ldrb r3, [r0, r3] 2547 0008 012B cmp r3, #1 2548 000a 62D1 bne .L197 1228:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2549 .loc 1 1228 0 2550 000c 0029 cmp r1, #0 2551 000e 48D0 beq .L198 1228:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2552 .loc 1 1228 0 is_stmt 0 discriminator 1 2553 0010 002A cmp r2, #0 2554 0012 46D0 beq .L198 1239:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2555 .loc 1 1239 0 is_stmt 1 2556 0014 5023 movs r3, #80 2557 0016 C35C ldrb r3, [r0, r3] 2558 0018 012B cmp r3, #1 2559 001a 5FD0 beq .L203 1239:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2560 .loc 1 1239 0 is_stmt 0 discriminator 2 2561 001c 5023 movs r3, #80 2562 001e 0120 movs r0, #1 2563 .LVL152: 2564 0020 E054 strb r0, [r4, r3] 1242:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->ErrorCode = HAL_SPI_ERROR_NONE; 2565 .loc 1 1242 0 is_stmt 1 discriminator 2 2566 0022 0133 adds r3, r3, #1 2567 0024 1130 adds r0, r0, #17 2568 0026 E054 strb r0, [r4, r3] 1243:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2569 .loc 1 1243 0 discriminator 2 2570 0028 0023 movs r3, #0 2571 002a 6365 str r3, [r4, #84] 1245:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferSize = Size; 2572 .loc 1 1245 0 discriminator 2 2573 002c 2163 str r1, [r4, #48] 1246:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = Size; 2574 .loc 1 1246 0 discriminator 2 2575 002e A286 strh r2, [r4, #52] 1247:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2576 .loc 1 1247 0 discriminator 2 2577 0030 E286 strh r2, [r4, #54] 1250:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxISR = 0U; ARM GAS /tmp/ccApM0GN.s page 95 2578 .loc 1 1250 0 discriminator 2 2579 0032 E364 str r3, [r4, #76] 1251:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2580 .loc 1 1251 0 discriminator 2 2581 0034 A364 str r3, [r4, #72] 1253:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferSize = 0U; 2582 .loc 1 1253 0 discriminator 2 2583 0036 A363 str r3, [r4, #56] 1254:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = 0U; 2584 .loc 1 1254 0 discriminator 2 2585 0038 A387 strh r3, [r4, #60] 1255:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2586 .loc 1 1255 0 discriminator 2 2587 003a E387 strh r3, [r4, #62] 1258:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2588 .loc 1 1258 0 discriminator 2 2589 003c 8023 movs r3, #128 2590 003e 1B02 lsls r3, r3, #8 2591 0040 A268 ldr r2, [r4, #8] 2592 .LVL153: 2593 0042 9A42 cmp r2, r3 2594 0044 32D0 beq .L205 2595 .LVL154: 2596 .L201: 1264:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2597 .loc 1 1264 0 2598 0046 8023 movs r3, #128 2599 0048 9B01 lsls r3, r3, #6 2600 004a A26A ldr r2, [r4, #40] 2601 004c 9A42 cmp r2, r3 2602 004e 34D0 beq .L206 2603 .L202: 1270:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2604 .loc 1 1270 0 2605 0050 236C ldr r3, [r4, #64] 2606 0052 244A ldr r2, .L207 2607 0054 1A63 str r2, [r3, #48] 1273:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2608 .loc 1 1273 0 2609 0056 236C ldr r3, [r4, #64] 2610 0058 234A ldr r2, .L207+4 2611 005a DA62 str r2, [r3, #44] 1276:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2612 .loc 1 1276 0 2613 005c 236C ldr r3, [r4, #64] 2614 005e 234A ldr r2, .L207+8 2615 0060 5A63 str r2, [r3, #52] 1279:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmarx->XferCpltCallback = (void (*)(DMA_HandleTypeDef *))NULL; 2616 .loc 1 1279 0 2617 0062 636C ldr r3, [r4, #68] 2618 0064 0025 movs r5, #0 2619 0066 1D63 str r5, [r3, #48] 1280:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmarx->XferErrorCallback = (void (*)(DMA_HandleTypeDef *))NULL; 2620 .loc 1 1280 0 2621 0068 636C ldr r3, [r4, #68] 2622 006a DD62 str r5, [r3, #44] 1281:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ARM GAS /tmp/ccApM0GN.s page 96 2623 .loc 1 1281 0 2624 006c 636C ldr r3, [r4, #68] 2625 006e 5D63 str r5, [r3, #52] 1284:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2626 .loc 1 1284 0 2627 0070 2268 ldr r2, [r4] 2628 0072 0C32 adds r2, r2, #12 2629 0074 E38E ldrh r3, [r4, #54] 2630 0076 9BB2 uxth r3, r3 2631 0078 216B ldr r1, [r4, #48] 2632 007a 206C ldr r0, [r4, #64] 2633 007c FFF7FEFF bl HAL_DMA_Start_IT 2634 .LVL155: 1287:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2635 .loc 1 1287 0 2636 0080 2268 ldr r2, [r4] 2637 0082 5368 ldr r3, [r2, #4] 2638 0084 0221 movs r1, #2 2639 0086 0B43 orrs r3, r1 2640 0088 5360 str r3, [r2, #4] 1290:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2641 .loc 1 1290 0 2642 008a 5023 movs r3, #80 2643 008c E554 strb r5, [r4, r3] 1293:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2644 .loc 1 1293 0 2645 008e 2368 ldr r3, [r4] 2646 0090 1A68 ldr r2, [r3] 2647 0092 5206 lsls r2, r2, #25 2648 0094 24D4 bmi .L204 1296:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2649 .loc 1 1296 0 2650 0096 1A68 ldr r2, [r3] 2651 0098 3E31 adds r1, r1, #62 2652 009a 0A43 orrs r2, r1 2653 009c 1A60 str r2, [r3] 1299:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2654 .loc 1 1299 0 2655 009e 0020 movs r0, #0 2656 00a0 1BE0 b .L200 2657 .LVL156: 2658 .L198: 1231:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_ERROR; 2659 .loc 1 1231 0 2660 00a2 5023 movs r3, #80 2661 00a4 0022 movs r2, #0 2662 .LVL157: 2663 00a6 E254 strb r2, [r4, r3] 1232:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2664 .loc 1 1232 0 2665 00a8 0120 movs r0, #1 2666 .LVL158: 2667 00aa 16E0 b .L200 2668 .LVL159: 2669 .L205: 1260:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2670 .loc 1 1260 0 ARM GAS /tmp/ccApM0GN.s page 97 2671 00ac 2268 ldr r2, [r4] 2672 00ae 1168 ldr r1, [r2] 2673 .LVL160: 2674 00b0 8023 movs r3, #128 2675 00b2 DB01 lsls r3, r3, #7 2676 00b4 0B43 orrs r3, r1 2677 00b6 1360 str r3, [r2] 2678 .LVL161: 2679 00b8 C5E7 b .L201 2680 .L206: 1266:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2681 .loc 1 1266 0 2682 00ba 2268 ldr r2, [r4] 2683 00bc 1368 ldr r3, [r2] 2684 00be 0C49 ldr r1, .L207+12 2685 00c0 0B40 ands r3, r1 2686 00c2 1360 str r3, [r2] 2687 00c4 2268 ldr r2, [r4] 2688 00c6 1168 ldr r1, [r2] 2689 00c8 8023 movs r3, #128 2690 00ca 9B01 lsls r3, r3, #6 2691 00cc 0B43 orrs r3, r1 2692 00ce 1360 str r3, [r2] 2693 00d0 BEE7 b .L202 2694 .LVL162: 2695 .L197: 1304:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_BUSY; 2696 .loc 1 1304 0 2697 00d2 5023 movs r3, #80 2698 00d4 0022 movs r2, #0 2699 .LVL163: 2700 00d6 C254 strb r2, [r0, r3] 1305:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2701 .loc 1 1305 0 2702 00d8 0220 movs r0, #2 2703 .LVL164: 2704 .L200: 1307:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2705 .loc 1 1307 0 2706 @ sp needed 2707 .LVL165: 2708 00da 70BD pop {r4, r5, r6, pc} 2709 .LVL166: 2710 .L203: 1239:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2711 .loc 1 1239 0 2712 00dc 0220 movs r0, #2 2713 .LVL167: 2714 00de FCE7 b .L200 2715 .LVL168: 2716 .L204: 1299:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2717 .loc 1 1299 0 2718 00e0 0020 movs r0, #0 2719 00e2 FAE7 b .L200 2720 .L208: 2721 .align 2 ARM GAS /tmp/ccApM0GN.s page 98 2722 .L207: 2723 00e4 00000000 .word SPI_DMAHalfTransmitCplt 2724 00e8 00000000 .word SPI_DMATransmitCplt 2725 00ec 00000000 .word SPI_DMAError 2726 00f0 FFDFFFFF .word -8193 2727 .cfi_endproc 2728 .LFE49: 2730 .section .text.HAL_SPI_TransmitReceive_DMA,"ax",%progbits 2731 .align 1 2732 .global HAL_SPI_TransmitReceive_DMA 2733 .syntax unified 2734 .code 16 2735 .thumb_func 2736 .fpu softvfp 2738 HAL_SPI_TransmitReceive_DMA: 2739 .LFB51: 1419:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hspi->State == HAL_SPI_STATE_READY) || \ 2740 .loc 1 1419 0 2741 .cfi_startproc 2742 @ args = 0, pretend = 0, frame = 0 2743 @ frame_needed = 0, uses_anonymous_args = 0 2744 .LVL169: 2745 0000 70B5 push {r4, r5, r6, lr} 2746 .LCFI14: 2747 .cfi_def_cfa_offset 16 2748 .cfi_offset 4, -16 2749 .cfi_offset 5, -12 2750 .cfi_offset 6, -8 2751 .cfi_offset 14, -4 2752 0002 0400 movs r4, r0 1420:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ((hspi->Init.Mode == SPI_MODE_MASTER) && (hspi->Init.Direction == SPI_DIRECTION_2LINES) && (hs 2753 .loc 1 1420 0 2754 0004 5120 movs r0, #81 2755 .LVL170: 2756 0006 205C ldrb r0, [r4, r0] 2757 0008 0128 cmp r0, #1 2758 000a 0DD0 beq .L210 1420:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ((hspi->Init.Mode == SPI_MODE_MASTER) && (hspi->Init.Direction == SPI_DIRECTION_2LINES) && (hs 2759 .loc 1 1420 0 is_stmt 0 discriminator 1 2760 000c 8220 movs r0, #130 2761 000e 4000 lsls r0, r0, #1 2762 0010 6568 ldr r5, [r4, #4] 2763 0012 8542 cmp r5, r0 2764 0014 7DD1 bne .L217 1421:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2765 .loc 1 1421 0 is_stmt 1 2766 0016 A068 ldr r0, [r4, #8] 2767 0018 0028 cmp r0, #0 2768 001a 00D0 beq .LCB2751 2769 001c 7BE0 b .L218 @long jump 2770 .LCB2751: 1421:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2771 .loc 1 1421 0 is_stmt 0 discriminator 1 2772 001e 5130 adds r0, r0, #81 2773 0020 205C ldrb r0, [r4, r0] 2774 0022 2228 cmp r0, #34 2775 0024 00D0 beq .LCB2756 ARM GAS /tmp/ccApM0GN.s page 99 2776 0026 78E0 b .L219 @long jump 2777 .LCB2756: 2778 .L210: 1423:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2779 .loc 1 1423 0 is_stmt 1 2780 0028 0029 cmp r1, #0 2781 002a 00D1 bne .LCB2759 2782 002c 77E0 b .L220 @long jump 2783 .LCB2759: 1423:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2784 .loc 1 1423 0 is_stmt 0 discriminator 1 2785 002e 002A cmp r2, #0 2786 0030 00D1 bne .LCB2761 2787 0032 76E0 b .L221 @long jump 2788 .LCB2761: 1423:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2789 .loc 1 1423 0 discriminator 2 2790 0034 002B cmp r3, #0 2791 0036 00D1 bne .LCB2763 2792 0038 75E0 b .L222 @long jump 2793 .LCB2763: 1432:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2794 .loc 1 1432 0 is_stmt 1 2795 003a 5020 movs r0, #80 2796 003c 205C ldrb r0, [r4, r0] 2797 003e 0128 cmp r0, #1 2798 0040 00D1 bne .LCB2767 2799 0042 72E0 b .L223 @long jump 2800 .LCB2767: 1432:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2801 .loc 1 1432 0 is_stmt 0 discriminator 2 2802 0044 5020 movs r0, #80 2803 0046 0125 movs r5, #1 2804 0048 2554 strb r5, [r4, r0] 1435:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2805 .loc 1 1435 0 is_stmt 1 discriminator 2 2806 004a 0130 adds r0, r0, #1 2807 004c 205C ldrb r0, [r4, r0] 2808 004e 2228 cmp r0, #34 2809 0050 02D0 beq .L212 1437:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2810 .loc 1 1437 0 2811 0052 5120 movs r0, #81 2812 0054 3135 adds r5, r5, #49 2813 0056 2554 strb r5, [r4, r0] 2814 .L212: 1441:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2815 .loc 1 1441 0 2816 0058 0020 movs r0, #0 2817 005a 6065 str r0, [r4, #84] 1443:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferSize = Size; 2818 .loc 1 1443 0 2819 005c 2163 str r1, [r4, #48] 1444:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = Size; 2820 .loc 1 1444 0 2821 005e A386 strh r3, [r4, #52] 1445:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ARM GAS /tmp/ccApM0GN.s page 100 2822 .loc 1 1445 0 2823 0060 E386 strh r3, [r4, #54] 1447:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferSize = Size; 2824 .loc 1 1447 0 2825 0062 A263 str r2, [r4, #56] 1448:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = Size; 2826 .loc 1 1448 0 2827 0064 A387 strh r3, [r4, #60] 1449:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2828 .loc 1 1449 0 2829 0066 E387 strh r3, [r4, #62] 1452:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxISR = 0U; 2830 .loc 1 1452 0 2831 0068 A064 str r0, [r4, #72] 1453:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2832 .loc 1 1453 0 2833 006a E064 str r0, [r4, #76] 1456:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2834 .loc 1 1456 0 2835 006c 8023 movs r3, #128 2836 .LVL171: 2837 006e 9B01 lsls r3, r3, #6 2838 0070 A26A ldr r2, [r4, #40] 2839 .LVL172: 2840 0072 9A42 cmp r2, r3 2841 0074 3AD0 beq .L224 2842 .LVL173: 2843 .L213: 1462:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2844 .loc 1 1462 0 2845 0076 5123 movs r3, #81 2846 0078 E35C ldrb r3, [r4, r3] 2847 007a 222B cmp r3, #34 2848 007c 42D0 beq .L225 1472:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2849 .loc 1 1472 0 2850 007e 636C ldr r3, [r4, #68] 2851 0080 2B4A ldr r2, .L226 2852 0082 1A63 str r2, [r3, #48] 1474:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2853 .loc 1 1474 0 2854 0084 636C ldr r3, [r4, #68] 2855 0086 2B4A ldr r2, .L226+4 2856 0088 DA62 str r2, [r3, #44] 2857 .L215: 1478:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2858 .loc 1 1478 0 2859 008a 636C ldr r3, [r4, #68] 2860 008c 2A4D ldr r5, .L226+8 2861 008e 5D63 str r5, [r3, #52] 1481:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2862 .loc 1 1481 0 2863 0090 2168 ldr r1, [r4] 2864 0092 0C31 adds r1, r1, #12 2865 0094 E38F ldrh r3, [r4, #62] 2866 0096 9BB2 uxth r3, r3 2867 0098 A26B ldr r2, [r4, #56] ARM GAS /tmp/ccApM0GN.s page 101 2868 009a 606C ldr r0, [r4, #68] 2869 009c FFF7FEFF bl HAL_DMA_Start_IT 2870 .LVL174: 1484:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2871 .loc 1 1484 0 2872 00a0 2268 ldr r2, [r4] 2873 00a2 5368 ldr r3, [r2, #4] 2874 00a4 0121 movs r1, #1 2875 00a6 0B43 orrs r3, r1 2876 00a8 5360 str r3, [r2, #4] 1488:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmatx->XferCpltCallback = (void (*)(DMA_HandleTypeDef *))NULL; 2877 .loc 1 1488 0 2878 00aa 226C ldr r2, [r4, #64] 2879 00ac 0023 movs r3, #0 2880 00ae 1363 str r3, [r2, #48] 1489:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2881 .loc 1 1489 0 2882 00b0 226C ldr r2, [r4, #64] 2883 00b2 D362 str r3, [r2, #44] 1492:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2884 .loc 1 1492 0 2885 00b4 236C ldr r3, [r4, #64] 2886 00b6 5D63 str r5, [r3, #52] 1495:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2887 .loc 1 1495 0 2888 00b8 2268 ldr r2, [r4] 2889 00ba 0C32 adds r2, r2, #12 2890 00bc E38E ldrh r3, [r4, #54] 2891 00be 9BB2 uxth r3, r3 2892 00c0 216B ldr r1, [r4, #48] 2893 00c2 206C ldr r0, [r4, #64] 2894 00c4 FFF7FEFF bl HAL_DMA_Start_IT 2895 .LVL175: 1498:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 2896 .loc 1 1498 0 2897 00c8 2368 ldr r3, [r4] 2898 00ca 1A68 ldr r2, [r3] 2899 00cc 5206 lsls r2, r2, #25 2900 00ce 03D4 bmi .L216 1501:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2901 .loc 1 1501 0 2902 00d0 1A68 ldr r2, [r3] 2903 00d2 4021 movs r1, #64 2904 00d4 0A43 orrs r2, r1 2905 00d6 1A60 str r2, [r3] 2906 .L216: 1505:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2907 .loc 1 1505 0 2908 00d8 2268 ldr r2, [r4] 2909 00da 5368 ldr r3, [r2, #4] 2910 00dc 0221 movs r1, #2 2911 00de 0B43 orrs r3, r1 2912 00e0 5360 str r3, [r2, #4] 1508:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2913 .loc 1 1508 0 2914 00e2 5023 movs r3, #80 2915 00e4 0022 movs r2, #0 ARM GAS /tmp/ccApM0GN.s page 102 2916 00e6 E254 strb r2, [r4, r3] 1510:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2917 .loc 1 1510 0 2918 00e8 0020 movs r0, #0 2919 00ea 13E0 b .L211 2920 .LVL176: 2921 .L224: 1458:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2922 .loc 1 1458 0 2923 00ec 2268 ldr r2, [r4] 2924 00ee 1368 ldr r3, [r2] 2925 00f0 1249 ldr r1, .L226+12 2926 .LVL177: 2927 00f2 0B40 ands r3, r1 2928 00f4 1360 str r3, [r2] 2929 .LVL178: 2930 00f6 2268 ldr r2, [r4] 2931 00f8 1168 ldr r1, [r2] 2932 00fa 8023 movs r3, #128 2933 00fc 9B01 lsls r3, r3, #6 2934 00fe 0B43 orrs r3, r1 2935 0100 1360 str r3, [r2] 2936 0102 B8E7 b .L213 2937 .L225: 1465:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2938 .loc 1 1465 0 2939 0104 636C ldr r3, [r4, #68] 2940 0106 0E4A ldr r2, .L226+16 2941 0108 1A63 str r2, [r3, #48] 1467:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2942 .loc 1 1467 0 2943 010a 636C ldr r3, [r4, #68] 2944 010c 0D4A ldr r2, .L226+20 2945 010e DA62 str r2, [r3, #44] 2946 0110 BBE7 b .L215 2947 .LVL179: 2948 .L217: 1514:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2949 .loc 1 1514 0 2950 0112 0220 movs r0, #2 2951 .LVL180: 2952 .L211: 1516:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2953 .loc 1 1516 0 2954 @ sp needed 2955 .LVL181: 2956 0114 70BD pop {r4, r5, r6, pc} 2957 .LVL182: 2958 .L218: 1514:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2959 .loc 1 1514 0 2960 0116 0220 movs r0, #2 2961 0118 FCE7 b .L211 2962 .L219: 2963 011a 0220 movs r0, #2 2964 011c FAE7 b .L211 2965 .L220: ARM GAS /tmp/ccApM0GN.s page 103 1425:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 2966 .loc 1 1425 0 2967 011e 0120 movs r0, #1 2968 0120 F8E7 b .L211 2969 .L221: 2970 0122 0120 movs r0, #1 2971 0124 F6E7 b .L211 2972 .L222: 2973 0126 0120 movs r0, #1 2974 0128 F4E7 b .L211 2975 .L223: 1432:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 2976 .loc 1 1432 0 2977 012a 0220 movs r0, #2 2978 012c F2E7 b .L211 2979 .L227: 2980 012e C046 .align 2 2981 .L226: 2982 0130 00000000 .word SPI_DMAHalfTransmitReceiveCplt 2983 0134 00000000 .word SPI_DMATransmitReceiveCplt 2984 0138 00000000 .word SPI_DMAError 2985 013c FFDFFFFF .word -8193 2986 0140 00000000 .word SPI_DMAHalfReceiveCplt 2987 0144 00000000 .word SPI_DMAReceiveCplt 2988 .cfi_endproc 2989 .LFE51: 2991 .section .text.HAL_SPI_Receive_DMA,"ax",%progbits 2992 .align 1 2993 .global HAL_SPI_Receive_DMA 2994 .syntax unified 2995 .code 16 2996 .thumb_func 2997 .fpu softvfp 2999 HAL_SPI_Receive_DMA: 3000 .LFB50: 1319:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if(hspi->State == HAL_SPI_STATE_READY) 3001 .loc 1 1319 0 3002 .cfi_startproc 3003 @ args = 0, pretend = 0, frame = 0 3004 @ frame_needed = 0, uses_anonymous_args = 0 3005 .LVL183: 3006 0000 70B5 push {r4, r5, r6, lr} 3007 .LCFI15: 3008 .cfi_def_cfa_offset 16 3009 .cfi_offset 4, -16 3010 .cfi_offset 5, -12 3011 .cfi_offset 6, -8 3012 .cfi_offset 14, -4 3013 0002 0400 movs r4, r0 1320:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3014 .loc 1 1320 0 3015 0004 5120 movs r0, #81 3016 .LVL184: 3017 0006 205C ldrb r0, [r4, r0] 3018 0008 0128 cmp r0, #1 3019 000a 71D1 bne .L229 1322:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { ARM GAS /tmp/ccApM0GN.s page 104 3020 .loc 1 1322 0 3021 000c 0029 cmp r1, #0 3022 000e 2BD0 beq .L230 1322:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3023 .loc 1 1322 0 is_stmt 0 discriminator 1 3024 0010 002A cmp r2, #0 3025 0012 29D0 beq .L230 1330:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3026 .loc 1 1330 0 is_stmt 1 3027 0014 5023 movs r3, #80 3028 0016 E35C ldrb r3, [r4, r3] 3029 0018 012B cmp r3, #1 3030 001a 00D1 bne .LCB3006 3031 001c 6DE0 b .L236 @long jump 3032 .LCB3006: 1330:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3033 .loc 1 1330 0 is_stmt 0 discriminator 2 3034 001e 5023 movs r3, #80 3035 0020 0120 movs r0, #1 3036 0022 E054 strb r0, [r4, r3] 1333:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->ErrorCode = HAL_SPI_ERROR_NONE; 3037 .loc 1 1333 0 is_stmt 1 discriminator 2 3038 0024 0133 adds r3, r3, #1 3039 0026 2130 adds r0, r0, #33 3040 0028 E054 strb r0, [r4, r3] 1334:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3041 .loc 1 1334 0 discriminator 2 3042 002a 0023 movs r3, #0 3043 002c 6365 str r3, [r4, #84] 1336:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferSize = Size; 3044 .loc 1 1336 0 discriminator 2 3045 002e A163 str r1, [r4, #56] 1337:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = Size; 3046 .loc 1 1337 0 discriminator 2 3047 0030 A287 strh r2, [r4, #60] 1338:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3048 .loc 1 1338 0 discriminator 2 3049 0032 E287 strh r2, [r4, #62] 1341:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxISR = 0U; 3050 .loc 1 1341 0 discriminator 2 3051 0034 A364 str r3, [r4, #72] 1342:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3052 .loc 1 1342 0 discriminator 2 3053 0036 E364 str r3, [r4, #76] 1344:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferSize = 0U; 3054 .loc 1 1344 0 discriminator 2 3055 0038 2363 str r3, [r4, #48] 1345:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = 0U; 3056 .loc 1 1345 0 discriminator 2 3057 003a A386 strh r3, [r4, #52] 1346:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3058 .loc 1 1346 0 discriminator 2 3059 003c E386 strh r3, [r4, #54] 1349:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3060 .loc 1 1349 0 discriminator 2 3061 003e A368 ldr r3, [r4, #8] 3062 0040 8020 movs r0, #128 ARM GAS /tmp/ccApM0GN.s page 105 3063 0042 0002 lsls r0, r0, #8 3064 0044 8342 cmp r3, r0 3065 0046 14D0 beq .L238 1353:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3066 .loc 1 1353 0 3067 0048 002B cmp r3, #0 3068 004a 17D1 bne .L234 1353:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3069 .loc 1 1353 0 is_stmt 0 discriminator 1 3070 004c 0533 adds r3, r3, #5 3071 004e FF33 adds r3, r3, #255 3072 0050 6068 ldr r0, [r4, #4] 3073 0052 9842 cmp r0, r3 3074 0054 12D1 bne .L234 1356:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3075 .loc 1 1356 0 is_stmt 1 3076 0056 B43B subs r3, r3, #180 3077 0058 0020 movs r0, #0 3078 005a E054 strb r0, [r4, r3] 1359:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3079 .loc 1 1359 0 3080 005c 1300 movs r3, r2 3081 005e 0A00 movs r2, r1 3082 .LVL185: 3083 0060 2000 movs r0, r4 3084 0062 FFF7FEFF bl HAL_SPI_TransmitReceive_DMA 3085 .LVL186: 3086 0066 47E0 b .L232 3087 .LVL187: 3088 .L230: 1325:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_ERROR; 3089 .loc 1 1325 0 3090 0068 5023 movs r3, #80 3091 006a 0022 movs r2, #0 3092 .LVL188: 3093 006c E254 strb r2, [r4, r3] 1326:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3094 .loc 1 1326 0 3095 006e 0120 movs r0, #1 3096 0070 42E0 b .L232 3097 .LVL189: 3098 .L238: 1351:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3099 .loc 1 1351 0 3100 0072 2268 ldr r2, [r4] 3101 .LVL190: 3102 0074 1368 ldr r3, [r2] 3103 0076 2349 ldr r1, .L240 3104 .LVL191: 3105 0078 0B40 ands r3, r1 3106 007a 1360 str r3, [r2] 3107 .LVL192: 3108 .L234: 1363:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3109 .loc 1 1363 0 3110 007c 8023 movs r3, #128 3111 007e 9B01 lsls r3, r3, #6 ARM GAS /tmp/ccApM0GN.s page 106 3112 0080 A26A ldr r2, [r4, #40] 3113 0082 9A42 cmp r2, r3 3114 0084 28D0 beq .L239 3115 .L235: 1369:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3116 .loc 1 1369 0 3117 0086 636C ldr r3, [r4, #68] 3118 0088 1F4A ldr r2, .L240+4 3119 008a 1A63 str r2, [r3, #48] 1372:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3120 .loc 1 1372 0 3121 008c 636C ldr r3, [r4, #68] 3122 008e 1F4A ldr r2, .L240+8 3123 0090 DA62 str r2, [r3, #44] 1375:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3124 .loc 1 1375 0 3125 0092 636C ldr r3, [r4, #68] 3126 0094 1E4A ldr r2, .L240+12 3127 0096 5A63 str r2, [r3, #52] 1378:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmatx->XferCpltCallback = (void (*)(DMA_HandleTypeDef *))NULL; 3128 .loc 1 1378 0 3129 0098 236C ldr r3, [r4, #64] 3130 009a 0025 movs r5, #0 3131 009c 1D63 str r5, [r3, #48] 1379:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->hdmatx->XferErrorCallback = (void (*)(DMA_HandleTypeDef *))NULL; 3132 .loc 1 1379 0 3133 009e 236C ldr r3, [r4, #64] 3134 00a0 DD62 str r5, [r3, #44] 1380:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3135 .loc 1 1380 0 3136 00a2 236C ldr r3, [r4, #64] 3137 00a4 5D63 str r5, [r3, #52] 1383:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3138 .loc 1 1383 0 3139 00a6 2168 ldr r1, [r4] 3140 00a8 0C31 adds r1, r1, #12 3141 00aa E38F ldrh r3, [r4, #62] 3142 00ac 9BB2 uxth r3, r3 3143 00ae A26B ldr r2, [r4, #56] 3144 00b0 606C ldr r0, [r4, #68] 3145 00b2 FFF7FEFF bl HAL_DMA_Start_IT 3146 .LVL193: 1386:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3147 .loc 1 1386 0 3148 00b6 2268 ldr r2, [r4] 3149 00b8 5368 ldr r3, [r2, #4] 3150 00ba 0121 movs r1, #1 3151 00bc 0B43 orrs r3, r1 3152 00be 5360 str r3, [r2, #4] 1389:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3153 .loc 1 1389 0 3154 00c0 5023 movs r3, #80 3155 00c2 E554 strb r5, [r4, r3] 1392:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3156 .loc 1 1392 0 3157 00c4 2368 ldr r3, [r4] 3158 00c6 1A68 ldr r2, [r3] ARM GAS /tmp/ccApM0GN.s page 107 3159 00c8 5206 lsls r2, r2, #25 3160 00ca 18D4 bmi .L237 1395:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3161 .loc 1 1395 0 3162 00cc 1A68 ldr r2, [r3] 3163 00ce 3F31 adds r1, r1, #63 3164 00d0 0A43 orrs r2, r1 3165 00d2 1A60 str r2, [r3] 1398:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3166 .loc 1 1398 0 3167 00d4 0020 movs r0, #0 3168 00d6 0FE0 b .L232 3169 .L239: 1365:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3170 .loc 1 1365 0 3171 00d8 2268 ldr r2, [r4] 3172 00da 1368 ldr r3, [r2] 3173 00dc 0D49 ldr r1, .L240+16 3174 00de 0B40 ands r3, r1 3175 00e0 1360 str r3, [r2] 3176 00e2 2268 ldr r2, [r4] 3177 00e4 1168 ldr r1, [r2] 3178 00e6 8023 movs r3, #128 3179 00e8 9B01 lsls r3, r3, #6 3180 00ea 0B43 orrs r3, r1 3181 00ec 1360 str r3, [r2] 3182 00ee CAE7 b .L235 3183 .LVL194: 3184 .L229: 1403:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return HAL_BUSY; 3185 .loc 1 1403 0 3186 00f0 5023 movs r3, #80 3187 00f2 0022 movs r2, #0 3188 .LVL195: 3189 00f4 E254 strb r2, [r4, r3] 1404:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3190 .loc 1 1404 0 3191 00f6 0220 movs r0, #2 3192 .LVL196: 3193 .L232: 1406:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3194 .loc 1 1406 0 3195 @ sp needed 3196 .LVL197: 3197 00f8 70BD pop {r4, r5, r6, pc} 3198 .LVL198: 3199 .L236: 1330:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3200 .loc 1 1330 0 3201 00fa 0220 movs r0, #2 3202 00fc FCE7 b .L232 3203 .LVL199: 3204 .L237: 1398:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3205 .loc 1 1398 0 3206 00fe 0020 movs r0, #0 3207 0100 FAE7 b .L232 ARM GAS /tmp/ccApM0GN.s page 108 3208 .L241: 3209 0102 C046 .align 2 3210 .L240: 3211 0104 FFBFFFFF .word -16385 3212 0108 00000000 .word SPI_DMAHalfReceiveCplt 3213 010c 00000000 .word SPI_DMAReceiveCplt 3214 0110 00000000 .word SPI_DMAError 3215 0114 FFDFFFFF .word -8193 3216 .cfi_endproc 3217 .LFE50: 3219 .section .text.HAL_SPI_DMAPause,"ax",%progbits 3220 .align 1 3221 .global HAL_SPI_DMAPause 3222 .syntax unified 3223 .code 16 3224 .thumb_func 3225 .fpu softvfp 3227 HAL_SPI_DMAPause: 3228 .LFB52: 1526:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Locked */ 3229 .loc 1 1526 0 3230 .cfi_startproc 3231 @ args = 0, pretend = 0, frame = 0 3232 @ frame_needed = 0, uses_anonymous_args = 0 3233 .LVL200: 3234 0000 30B5 push {r4, r5, lr} 3235 .LCFI16: 3236 .cfi_def_cfa_offset 12 3237 .cfi_offset 4, -12 3238 .cfi_offset 5, -8 3239 .cfi_offset 14, -4 1528:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3240 .loc 1 1528 0 3241 0002 5023 movs r3, #80 3242 0004 C35C ldrb r3, [r0, r3] 3243 0006 012B cmp r3, #1 3244 0008 0FD0 beq .L244 1528:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3245 .loc 1 1528 0 is_stmt 0 discriminator 2 3246 000a 5022 movs r2, #80 3247 000c 0124 movs r4, #1 3248 000e 8454 strb r4, [r0, r2] 1531:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** CLEAR_BIT(hspi->Instance->CR2, SPI_CR2_RXDMAEN); 3249 .loc 1 1531 0 is_stmt 1 discriminator 2 3250 0010 0168 ldr r1, [r0] 3251 0012 4B68 ldr r3, [r1, #4] 3252 0014 0225 movs r5, #2 3253 0016 AB43 bics r3, r5 3254 0018 4B60 str r3, [r1, #4] 1532:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3255 .loc 1 1532 0 discriminator 2 3256 001a 0168 ldr r1, [r0] 3257 001c 4B68 ldr r3, [r1, #4] 3258 001e A343 bics r3, r4 3259 0020 4B60 str r3, [r1, #4] 1535:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3260 .loc 1 1535 0 discriminator 2 ARM GAS /tmp/ccApM0GN.s page 109 3261 0022 0023 movs r3, #0 3262 0024 8354 strb r3, [r0, r2] 1537:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3263 .loc 1 1537 0 discriminator 2 3264 0026 0020 movs r0, #0 3265 .LVL201: 3266 .L243: 1538:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3267 .loc 1 1538 0 3268 @ sp needed 3269 0028 30BD pop {r4, r5, pc} 3270 .LVL202: 3271 .L244: 1528:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3272 .loc 1 1528 0 3273 002a 0220 movs r0, #2 3274 .LVL203: 3275 002c FCE7 b .L243 3276 .cfi_endproc 3277 .LFE52: 3279 .section .text.HAL_SPI_DMAResume,"ax",%progbits 3280 .align 1 3281 .global HAL_SPI_DMAResume 3282 .syntax unified 3283 .code 16 3284 .thumb_func 3285 .fpu softvfp 3287 HAL_SPI_DMAResume: 3288 .LFB53: 1547:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Process Locked */ 3289 .loc 1 1547 0 3290 .cfi_startproc 3291 @ args = 0, pretend = 0, frame = 0 3292 @ frame_needed = 0, uses_anonymous_args = 0 3293 .LVL204: 3294 0000 30B5 push {r4, r5, lr} 3295 .LCFI17: 3296 .cfi_def_cfa_offset 12 3297 .cfi_offset 4, -12 3298 .cfi_offset 5, -8 3299 .cfi_offset 14, -4 1549:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3300 .loc 1 1549 0 3301 0002 5023 movs r3, #80 3302 0004 C35C ldrb r3, [r0, r3] 3303 0006 012B cmp r3, #1 3304 0008 0FD0 beq .L247 1549:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3305 .loc 1 1549 0 is_stmt 0 discriminator 2 3306 000a 5021 movs r1, #80 3307 000c 0124 movs r4, #1 3308 000e 4454 strb r4, [r0, r1] 1552:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->Instance->CR2, SPI_CR2_RXDMAEN); 3309 .loc 1 1552 0 is_stmt 1 discriminator 2 3310 0010 0368 ldr r3, [r0] 3311 0012 5A68 ldr r2, [r3, #4] 3312 0014 0225 movs r5, #2 ARM GAS /tmp/ccApM0GN.s page 110 3313 0016 2A43 orrs r2, r5 3314 0018 5A60 str r2, [r3, #4] 1553:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3315 .loc 1 1553 0 discriminator 2 3316 001a 0268 ldr r2, [r0] 3317 001c 5368 ldr r3, [r2, #4] 3318 001e 2343 orrs r3, r4 3319 0020 5360 str r3, [r2, #4] 1556:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3320 .loc 1 1556 0 discriminator 2 3321 0022 0023 movs r3, #0 3322 0024 4354 strb r3, [r0, r1] 1558:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3323 .loc 1 1558 0 discriminator 2 3324 0026 0020 movs r0, #0 3325 .LVL205: 3326 .L246: 1559:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3327 .loc 1 1559 0 3328 @ sp needed 3329 0028 30BD pop {r4, r5, pc} 3330 .LVL206: 3331 .L247: 1549:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3332 .loc 1 1549 0 3333 002a 0220 movs r0, #2 3334 .LVL207: 3335 002c FCE7 b .L246 3336 .cfi_endproc 3337 .LFE53: 3339 .section .text.HAL_SPI_DMAStop,"ax",%progbits 3340 .align 1 3341 .global HAL_SPI_DMAStop 3342 .syntax unified 3343 .code 16 3344 .thumb_func 3345 .fpu softvfp 3347 HAL_SPI_DMAStop: 3348 .LFB54: 1568:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* The Lock is not implemented on this API to allow the user application 3349 .loc 1 1568 0 3350 .cfi_startproc 3351 @ args = 0, pretend = 0, frame = 0 3352 @ frame_needed = 0, uses_anonymous_args = 0 3353 .LVL208: 3354 0000 10B5 push {r4, lr} 3355 .LCFI18: 3356 .cfi_def_cfa_offset 8 3357 .cfi_offset 4, -8 3358 .cfi_offset 14, -4 3359 0002 0400 movs r4, r0 1576:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3360 .loc 1 1576 0 3361 0004 006C ldr r0, [r0, #64] 3362 .LVL209: 3363 0006 0028 cmp r0, #0 3364 0008 01D0 beq .L249 ARM GAS /tmp/ccApM0GN.s page 111 1578:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3365 .loc 1 1578 0 3366 000a FFF7FEFF bl HAL_DMA_Abort 3367 .LVL210: 3368 .L249: 1581:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3369 .loc 1 1581 0 3370 000e 606C ldr r0, [r4, #68] 3371 0010 0028 cmp r0, #0 3372 0012 01D0 beq .L250 1583:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3373 .loc 1 1583 0 3374 0014 FFF7FEFF bl HAL_DMA_Abort 3375 .LVL211: 3376 .L250: 1587:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** CLEAR_BIT(hspi->Instance->CR2, SPI_CR2_RXDMAEN); 3377 .loc 1 1587 0 3378 0018 2268 ldr r2, [r4] 3379 001a 5368 ldr r3, [r2, #4] 3380 001c 0221 movs r1, #2 3381 001e 8B43 bics r3, r1 3382 0020 5360 str r3, [r2, #4] 1588:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3383 .loc 1 1588 0 3384 0022 2168 ldr r1, [r4] 3385 0024 4B68 ldr r3, [r1, #4] 3386 0026 0122 movs r2, #1 3387 0028 9343 bics r3, r2 3388 002a 4B60 str r3, [r1, #4] 1590:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3389 .loc 1 1590 0 3390 002c 5123 movs r3, #81 3391 002e E254 strb r2, [r4, r3] 1593:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3392 .loc 1 1593 0 3393 0030 0020 movs r0, #0 3394 @ sp needed 3395 .LVL212: 3396 0032 10BD pop {r4, pc} 3397 .cfi_endproc 3398 .LFE54: 3400 .section .text.HAL_SPI_TxCpltCallback,"ax",%progbits 3401 .align 1 3402 .weak HAL_SPI_TxCpltCallback 3403 .syntax unified 3404 .code 16 3405 .thumb_func 3406 .fpu softvfp 3408 HAL_SPI_TxCpltCallback: 3409 .LFB56: 1666:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Prevent unused argument(s) compilation warning */ 3410 .loc 1 1666 0 3411 .cfi_startproc 3412 @ args = 0, pretend = 0, frame = 0 3413 @ frame_needed = 0, uses_anonymous_args = 0 3414 @ link register save eliminated. 3415 .LVL213: ARM GAS /tmp/ccApM0GN.s page 112 1673:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3416 .loc 1 1673 0 3417 @ sp needed 3418 0000 7047 bx lr 3419 .cfi_endproc 3420 .LFE56: 3422 .section .text.HAL_SPI_RxCpltCallback,"ax",%progbits 3423 .align 1 3424 .weak HAL_SPI_RxCpltCallback 3425 .syntax unified 3426 .code 16 3427 .thumb_func 3428 .fpu softvfp 3430 HAL_SPI_RxCpltCallback: 3431 .LFB57: 1682:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Prevent unused argument(s) compilation warning */ 3432 .loc 1 1682 0 3433 .cfi_startproc 3434 @ args = 0, pretend = 0, frame = 0 3435 @ frame_needed = 0, uses_anonymous_args = 0 3436 @ link register save eliminated. 3437 .LVL214: 1689:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3438 .loc 1 1689 0 3439 @ sp needed 3440 0000 7047 bx lr 3441 .cfi_endproc 3442 .LFE57: 3444 .section .text.HAL_SPI_TxRxCpltCallback,"ax",%progbits 3445 .align 1 3446 .weak HAL_SPI_TxRxCpltCallback 3447 .syntax unified 3448 .code 16 3449 .thumb_func 3450 .fpu softvfp 3452 HAL_SPI_TxRxCpltCallback: 3453 .LFB58: 1698:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Prevent unused argument(s) compilation warning */ 3454 .loc 1 1698 0 3455 .cfi_startproc 3456 @ args = 0, pretend = 0, frame = 0 3457 @ frame_needed = 0, uses_anonymous_args = 0 3458 @ link register save eliminated. 3459 .LVL215: 1705:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3460 .loc 1 1705 0 3461 @ sp needed 3462 0000 7047 bx lr 3463 .cfi_endproc 3464 .LFE58: 3466 .section .text.HAL_SPI_TxHalfCpltCallback,"ax",%progbits 3467 .align 1 3468 .weak HAL_SPI_TxHalfCpltCallback 3469 .syntax unified 3470 .code 16 3471 .thumb_func 3472 .fpu softvfp ARM GAS /tmp/ccApM0GN.s page 113 3474 HAL_SPI_TxHalfCpltCallback: 3475 .LFB59: 1714:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Prevent unused argument(s) compilation warning */ 3476 .loc 1 1714 0 3477 .cfi_startproc 3478 @ args = 0, pretend = 0, frame = 0 3479 @ frame_needed = 0, uses_anonymous_args = 0 3480 @ link register save eliminated. 3481 .LVL216: 1721:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3482 .loc 1 1721 0 3483 @ sp needed 3484 0000 7047 bx lr 3485 .cfi_endproc 3486 .LFE59: 3488 .section .text.SPI_DMAHalfTransmitCplt,"ax",%progbits 3489 .align 1 3490 .syntax unified 3491 .code 16 3492 .thumb_func 3493 .fpu softvfp 3495 SPI_DMAHalfTransmitCplt: 3496 .LFB73: 2269:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_HandleTypeDef* hspi = ( SPI_HandleTypeDef* )((DMA_HandleTypeDef* )hdma)->Parent; 3497 .loc 1 2269 0 3498 .cfi_startproc 3499 @ args = 0, pretend = 0, frame = 0 3500 @ frame_needed = 0, uses_anonymous_args = 0 3501 .LVL217: 3502 0000 10B5 push {r4, lr} 3503 .LCFI19: 3504 .cfi_def_cfa_offset 8 3505 .cfi_offset 4, -8 3506 .cfi_offset 14, -4 2270:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3507 .loc 1 2270 0 3508 0002 806A ldr r0, [r0, #40] 3509 .LVL218: 2272:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3510 .loc 1 2272 0 3511 0004 FFF7FEFF bl HAL_SPI_TxHalfCpltCallback 3512 .LVL219: 2273:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3513 .loc 1 2273 0 3514 @ sp needed 3515 0008 10BD pop {r4, pc} 3516 .cfi_endproc 3517 .LFE73: 3519 .section .text.HAL_SPI_RxHalfCpltCallback,"ax",%progbits 3520 .align 1 3521 .weak HAL_SPI_RxHalfCpltCallback 3522 .syntax unified 3523 .code 16 3524 .thumb_func 3525 .fpu softvfp 3527 HAL_SPI_RxHalfCpltCallback: 3528 .LFB60: ARM GAS /tmp/ccApM0GN.s page 114 1730:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Prevent unused argument(s) compilation warning */ 3529 .loc 1 1730 0 3530 .cfi_startproc 3531 @ args = 0, pretend = 0, frame = 0 3532 @ frame_needed = 0, uses_anonymous_args = 0 3533 @ link register save eliminated. 3534 .LVL220: 1737:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3535 .loc 1 1737 0 3536 @ sp needed 3537 0000 7047 bx lr 3538 .cfi_endproc 3539 .LFE60: 3541 .section .text.SPI_DMAHalfReceiveCplt,"ax",%progbits 3542 .align 1 3543 .syntax unified 3544 .code 16 3545 .thumb_func 3546 .fpu softvfp 3548 SPI_DMAHalfReceiveCplt: 3549 .LFB74: 2282:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_HandleTypeDef* hspi = ( SPI_HandleTypeDef* )((DMA_HandleTypeDef* )hdma)->Parent; 3550 .loc 1 2282 0 3551 .cfi_startproc 3552 @ args = 0, pretend = 0, frame = 0 3553 @ frame_needed = 0, uses_anonymous_args = 0 3554 .LVL221: 3555 0000 10B5 push {r4, lr} 3556 .LCFI20: 3557 .cfi_def_cfa_offset 8 3558 .cfi_offset 4, -8 3559 .cfi_offset 14, -4 2283:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3560 .loc 1 2283 0 3561 0002 806A ldr r0, [r0, #40] 3562 .LVL222: 2285:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3563 .loc 1 2285 0 3564 0004 FFF7FEFF bl HAL_SPI_RxHalfCpltCallback 3565 .LVL223: 2286:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3566 .loc 1 2286 0 3567 @ sp needed 3568 0008 10BD pop {r4, pc} 3569 .cfi_endproc 3570 .LFE74: 3572 .section .text.HAL_SPI_TxRxHalfCpltCallback,"ax",%progbits 3573 .align 1 3574 .weak HAL_SPI_TxRxHalfCpltCallback 3575 .syntax unified 3576 .code 16 3577 .thumb_func 3578 .fpu softvfp 3580 HAL_SPI_TxRxHalfCpltCallback: 3581 .LFB61: 1746:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Prevent unused argument(s) compilation warning */ 3582 .loc 1 1746 0 ARM GAS /tmp/ccApM0GN.s page 115 3583 .cfi_startproc 3584 @ args = 0, pretend = 0, frame = 0 3585 @ frame_needed = 0, uses_anonymous_args = 0 3586 @ link register save eliminated. 3587 .LVL224: 1753:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3588 .loc 1 1753 0 3589 @ sp needed 3590 0000 7047 bx lr 3591 .cfi_endproc 3592 .LFE61: 3594 .section .text.SPI_DMAHalfTransmitReceiveCplt,"ax",%progbits 3595 .align 1 3596 .syntax unified 3597 .code 16 3598 .thumb_func 3599 .fpu softvfp 3601 SPI_DMAHalfTransmitReceiveCplt: 3602 .LFB75: 2295:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_HandleTypeDef* hspi = ( SPI_HandleTypeDef* )((DMA_HandleTypeDef* )hdma)->Parent; 3603 .loc 1 2295 0 3604 .cfi_startproc 3605 @ args = 0, pretend = 0, frame = 0 3606 @ frame_needed = 0, uses_anonymous_args = 0 3607 .LVL225: 3608 0000 10B5 push {r4, lr} 3609 .LCFI21: 3610 .cfi_def_cfa_offset 8 3611 .cfi_offset 4, -8 3612 .cfi_offset 14, -4 2296:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3613 .loc 1 2296 0 3614 0002 806A ldr r0, [r0, #40] 3615 .LVL226: 2298:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3616 .loc 1 2298 0 3617 0004 FFF7FEFF bl HAL_SPI_TxRxHalfCpltCallback 3618 .LVL227: 2299:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3619 .loc 1 2299 0 3620 @ sp needed 3621 0008 10BD pop {r4, pc} 3622 .cfi_endproc 3623 .LFE75: 3625 .section .text.HAL_SPI_ErrorCallback,"ax",%progbits 3626 .align 1 3627 .weak HAL_SPI_ErrorCallback 3628 .syntax unified 3629 .code 16 3630 .thumb_func 3631 .fpu softvfp 3633 HAL_SPI_ErrorCallback: 3634 .LFB62: 1762:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Prevent unused argument(s) compilation warning */ 3635 .loc 1 1762 0 3636 .cfi_startproc 3637 @ args = 0, pretend = 0, frame = 0 ARM GAS /tmp/ccApM0GN.s page 116 3638 @ frame_needed = 0, uses_anonymous_args = 0 3639 @ link register save eliminated. 3640 .LVL228: 1771:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3641 .loc 1 1771 0 3642 @ sp needed 3643 0000 7047 bx lr 3644 .cfi_endproc 3645 .LFE62: 3647 .section .text.SPI_TxISR,"ax",%progbits 3648 .align 1 3649 .syntax unified 3650 .code 16 3651 .thumb_func 3652 .fpu softvfp 3654 SPI_TxISR: 3655 .LFB66: 1897:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Transmit data in 8 Bit mode */ 3656 .loc 1 1897 0 3657 .cfi_startproc 3658 @ args = 0, pretend = 0, frame = 8 3659 @ frame_needed = 0, uses_anonymous_args = 0 3660 .LVL229: 3661 0000 10B5 push {r4, lr} 3662 .LCFI22: 3663 .cfi_def_cfa_offset 8 3664 .cfi_offset 4, -8 3665 .cfi_offset 14, -4 3666 0002 82B0 sub sp, sp, #8 3667 .LCFI23: 3668 .cfi_def_cfa_offset 16 3669 0004 0400 movs r4, r0 1899:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3670 .loc 1 1899 0 3671 0006 C368 ldr r3, [r0, #12] 3672 0008 002B cmp r3, #0 3673 000a 29D1 bne .L262 1901:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3674 .loc 1 1901 0 3675 000c 036B ldr r3, [r0, #48] 3676 000e 5A1C adds r2, r3, #1 3677 0010 0263 str r2, [r0, #48] 3678 0012 0268 ldr r2, [r0] 3679 0014 1B78 ldrb r3, [r3] 3680 0016 D360 str r3, [r2, #12] 3681 .L263: 1909:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3682 .loc 1 1909 0 3683 0018 E38E ldrh r3, [r4, #54] 3684 001a 013B subs r3, r3, #1 3685 001c 9BB2 uxth r3, r3 3686 001e E386 strh r3, [r4, #54] 1911:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3687 .loc 1 1911 0 3688 0020 E38E ldrh r3, [r4, #54] 3689 0022 9BB2 uxth r3, r3 3690 0024 002B cmp r3, #0 ARM GAS /tmp/ccApM0GN.s page 117 3691 0026 19D1 bne .L261 1913:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3692 .loc 1 1913 0 3693 0028 8023 movs r3, #128 3694 002a 9B01 lsls r3, r3, #6 3695 002c A26A ldr r2, [r4, #40] 3696 002e 9A42 cmp r2, r3 3697 0030 1ED0 beq .L271 3698 .L265: 3699 .LVL230: 3700 .LBB6: 3701 .LBB7: 1838:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3702 .loc 1 1838 0 3703 0032 0A23 movs r3, #10 3704 0034 0022 movs r2, #0 3705 0036 0221 movs r1, #2 3706 0038 2000 movs r0, r4 3707 .LVL231: 3708 003a FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 3709 .LVL232: 3710 003e 0028 cmp r0, #0 3711 0040 03D0 beq .L266 1840:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3712 .loc 1 1840 0 3713 0042 636D ldr r3, [r4, #84] 3714 0044 2022 movs r2, #32 3715 0046 1343 orrs r3, r2 3716 0048 6365 str r3, [r4, #84] 3717 .L266: 1844:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3718 .loc 1 1844 0 3719 004a 2268 ldr r2, [r4] 3720 004c 5368 ldr r3, [r2, #4] 3721 004e 8021 movs r1, #128 3722 0050 8B43 bics r3, r1 3723 0052 5360 str r3, [r2, #4] 1847:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3724 .loc 1 1847 0 3725 0054 2368 ldr r3, [r4] 3726 0056 5A68 ldr r2, [r3, #4] 3727 0058 5206 lsls r2, r2, #25 3728 005a 10D5 bpl .L272 3729 .LVL233: 3730 .L261: 3731 .LBE7: 3732 .LBE6: 1920:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3733 .loc 1 1920 0 3734 005c 02B0 add sp, sp, #8 3735 @ sp needed 3736 .LVL234: 3737 005e 10BD pop {r4, pc} 3738 .LVL235: 3739 .L262: 1906:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pTxBuffPtr+=2U; 3740 .loc 1 1906 0 ARM GAS /tmp/ccApM0GN.s page 118 3741 0060 0368 ldr r3, [r0] 3742 0062 026B ldr r2, [r0, #48] 3743 0064 1288 ldrh r2, [r2] 3744 0066 DA60 str r2, [r3, #12] 1907:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3745 .loc 1 1907 0 3746 0068 036B ldr r3, [r0, #48] 3747 006a 0233 adds r3, r3, #2 3748 006c 0363 str r3, [r0, #48] 3749 006e D3E7 b .L263 3750 .L271: 1916:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3751 .loc 1 1916 0 3752 0070 2268 ldr r2, [r4] 3753 0072 1168 ldr r1, [r2] 3754 0074 8023 movs r3, #128 3755 0076 5B01 lsls r3, r3, #5 3756 0078 0B43 orrs r3, r1 3757 007a 1360 str r3, [r2] 3758 007c D9E7 b .L265 3759 .LVL236: 3760 .L272: 3761 .LBB10: 3762 .LBB9: 1849:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3763 .loc 1 1849 0 3764 007e 5A68 ldr r2, [r3, #4] 3765 0080 6039 subs r1, r1, #96 3766 0082 8A43 bics r2, r1 3767 0084 5A60 str r2, [r3, #4] 1852:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3768 .loc 1 1852 0 3769 0086 0A23 movs r3, #10 3770 0088 0122 movs r2, #1 3771 008a 6031 adds r1, r1, #96 3772 008c 2000 movs r0, r4 3773 008e FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 3774 .LVL237: 3775 0092 0028 cmp r0, #0 3776 0094 03D0 beq .L267 1854:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3777 .loc 1 1854 0 3778 0096 636D ldr r3, [r4, #84] 3779 0098 2022 movs r2, #32 3780 009a 1343 orrs r3, r2 3781 009c 6365 str r3, [r4, #84] 3782 .L267: 1858:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3783 .loc 1 1858 0 3784 009e A368 ldr r3, [r4, #8] 3785 00a0 002B cmp r3, #0 3786 00a2 05D1 bne .L268 3787 .LBB8: 1860:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3788 .loc 1 1860 0 3789 00a4 2368 ldr r3, [r4] 3790 00a6 DA68 ldr r2, [r3, #12] ARM GAS /tmp/ccApM0GN.s page 119 3791 00a8 0192 str r2, [sp, #4] 3792 00aa 9B68 ldr r3, [r3, #8] 3793 00ac 0193 str r3, [sp, #4] 3794 00ae 019B ldr r3, [sp, #4] 3795 .L268: 3796 .LBE8: 1864:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3797 .loc 1 1864 0 3798 00b0 636D ldr r3, [r4, #84] 3799 00b2 002B cmp r3, #0 3800 00b4 11D1 bne .L269 1867:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3801 .loc 1 1867 0 3802 00b6 5133 adds r3, r3, #81 3803 00b8 E35C ldrb r3, [r4, r3] 3804 00ba 322B cmp r3, #50 3805 00bc 06D0 beq .L273 1876:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_TxCpltCallback(hspi); 3806 .loc 1 1876 0 3807 00be 5123 movs r3, #81 3808 00c0 0122 movs r2, #1 3809 00c2 E254 strb r2, [r4, r3] 1877:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3810 .loc 1 1877 0 3811 00c4 2000 movs r0, r4 3812 00c6 FFF7FEFF bl HAL_SPI_TxCpltCallback 3813 .LVL238: 3814 00ca C7E7 b .L261 3815 .L273: 1870:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_TxRxCpltCallback(hspi); 3816 .loc 1 1870 0 3817 00cc 1F33 adds r3, r3, #31 3818 00ce 0122 movs r2, #1 3819 00d0 E254 strb r2, [r4, r3] 1871:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3820 .loc 1 1871 0 3821 00d2 2000 movs r0, r4 3822 00d4 FFF7FEFF bl HAL_SPI_TxRxCpltCallback 3823 .LVL239: 3824 00d8 C0E7 b .L261 3825 .L269: 1883:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Call Error call back in case of Error */ 3826 .loc 1 1883 0 3827 00da 5123 movs r3, #81 3828 00dc 0122 movs r2, #1 3829 00de E254 strb r2, [r4, r3] 1885:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3830 .loc 1 1885 0 3831 00e0 2000 movs r0, r4 3832 00e2 FFF7FEFF bl HAL_SPI_ErrorCallback 3833 .LVL240: 3834 .LBE9: 3835 .LBE10: 1920:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3836 .loc 1 1920 0 3837 00e6 B9E7 b .L261 3838 .cfi_endproc ARM GAS /tmp/ccApM0GN.s page 120 3839 .LFE66: 3841 .section .text.SPI_RxCloseIRQHandler,"ax",%progbits 3842 .align 1 3843 .syntax unified 3844 .code 16 3845 .thumb_func 3846 .fpu softvfp 3848 SPI_RxCloseIRQHandler: 3849 .LFB67: 1929:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __IO uint16_t tmpreg = 0U; 3850 .loc 1 1929 0 3851 .cfi_startproc 3852 @ args = 0, pretend = 0, frame = 8 3853 @ frame_needed = 0, uses_anonymous_args = 0 3854 .LVL241: 3855 0000 10B5 push {r4, lr} 3856 .LCFI24: 3857 .cfi_def_cfa_offset 8 3858 .cfi_offset 4, -8 3859 .cfi_offset 14, -4 3860 0002 82B0 sub sp, sp, #8 3861 .LCFI25: 3862 .cfi_def_cfa_offset 16 3863 0004 0400 movs r4, r0 1930:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3864 .loc 1 1930 0 3865 0006 6B46 mov r3, sp 3866 0008 0022 movs r2, #0 3867 000a DA80 strh r2, [r3, #6] 1932:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3868 .loc 1 1932 0 3869 000c 8023 movs r3, #128 3870 000e 9B01 lsls r3, r3, #6 3871 0010 826A ldr r2, [r0, #40] 3872 0012 9A42 cmp r2, r3 3873 0014 20D0 beq .L283 3874 .LVL242: 3875 .L275: 1961:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3876 .loc 1 1961 0 3877 0016 2268 ldr r2, [r4] 3878 0018 5368 ldr r3, [r2, #4] 3879 001a 4021 movs r1, #64 3880 001c 8B43 bics r3, r1 3881 001e 5360 str r3, [r2, #4] 1964:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3882 .loc 1 1964 0 3883 0020 2368 ldr r3, [r4] 3884 0022 5A68 ldr r2, [r3, #4] 3885 0024 1206 lsls r2, r2, #24 3886 0026 15D4 bmi .L274 1967:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3887 .loc 1 1967 0 3888 0028 5A68 ldr r2, [r3, #4] 3889 002a 2039 subs r1, r1, #32 3890 002c 8A43 bics r2, r1 3891 002e 5A60 str r2, [r3, #4] ARM GAS /tmp/ccApM0GN.s page 121 1969:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3892 .loc 1 1969 0 3893 0030 8223 movs r3, #130 3894 0032 5B00 lsls r3, r3, #1 3895 0034 6268 ldr r2, [r4, #4] 3896 0036 9A42 cmp r2, r3 3897 0038 3ED0 beq .L284 3898 .L279: 1976:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3899 .loc 1 1976 0 3900 003a 636D ldr r3, [r4, #84] 3901 003c 002B cmp r3, #0 3902 003e 51D1 bne .L281 1979:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3903 .loc 1 1979 0 3904 0040 5133 adds r3, r3, #81 3905 0042 E35C ldrb r3, [r4, r3] 3906 0044 322B cmp r3, #50 3907 0046 46D0 beq .L285 1988:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_RxCpltCallback(hspi); 3908 .loc 1 1988 0 3909 0048 5123 movs r3, #81 3910 004a 0122 movs r2, #1 3911 004c E254 strb r2, [r4, r3] 1989:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3912 .loc 1 1989 0 3913 004e 2000 movs r0, r4 3914 0050 FFF7FEFF bl HAL_SPI_RxCpltCallback 3915 .LVL243: 3916 .L274: 2000:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3917 .loc 1 2000 0 3918 0054 02B0 add sp, sp, #8 3919 @ sp needed 3920 .LVL244: 3921 0056 10BD pop {r4, pc} 3922 .LVL245: 3923 .L283: 1935:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3924 .loc 1 1935 0 3925 0058 0A23 movs r3, #10 3926 005a 0022 movs r2, #0 3927 005c 0121 movs r1, #1 3928 005e FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 3929 .LVL246: 3930 0062 0028 cmp r0, #0 3931 0064 03D0 beq .L276 1937:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3932 .loc 1 1937 0 3933 0066 636D ldr r3, [r4, #84] 3934 0068 2022 movs r2, #32 3935 006a 1343 orrs r3, r2 3936 006c 6365 str r3, [r4, #84] 3937 .L276: 1941:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** UNUSED(tmpreg); /* avoid warning on tmpreg affectation with some compiler */ 3938 .loc 1 1941 0 3939 006e 2368 ldr r3, [r4] ARM GAS /tmp/ccApM0GN.s page 122 3940 0070 DB68 ldr r3, [r3, #12] 3941 0072 9BB2 uxth r3, r3 3942 0074 6A46 mov r2, sp 3943 0076 D380 strh r3, [r2, #6] 1942:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3944 .loc 1 1942 0 3945 0078 D388 ldrh r3, [r2, #6] 1945:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3946 .loc 1 1945 0 3947 007a 0A23 movs r3, #10 3948 007c 0122 movs r2, #1 3949 007e 0121 movs r1, #1 3950 0080 2000 movs r0, r4 3951 0082 FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 3952 .LVL247: 3953 0086 0028 cmp r0, #0 3954 0088 03D0 beq .L277 1947:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3955 .loc 1 1947 0 3956 008a 636D ldr r3, [r4, #84] 3957 008c 2022 movs r2, #32 3958 008e 1343 orrs r3, r2 3959 0090 6365 str r3, [r4, #84] 3960 .L277: 1951:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3961 .loc 1 1951 0 3962 0092 2368 ldr r3, [r4] 3963 0094 9A68 ldr r2, [r3, #8] 3964 0096 D206 lsls r2, r2, #27 3965 0098 BDD5 bpl .L275 1953:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 3966 .loc 1 1953 0 3967 009a 626D ldr r2, [r4, #84] 3968 009c 0221 movs r1, #2 3969 009e 0A43 orrs r2, r1 3970 00a0 6265 str r2, [r4, #84] 1956:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3971 .loc 1 1956 0 3972 00a2 1A68 ldr r2, [r3] 3973 00a4 1349 ldr r1, .L286 3974 00a6 0A40 ands r2, r1 3975 00a8 1A60 str r2, [r3] 3976 00aa 2268 ldr r2, [r4] 3977 00ac 1168 ldr r1, [r2] 3978 00ae 8023 movs r3, #128 3979 00b0 9B01 lsls r3, r3, #6 3980 00b2 0B43 orrs r3, r1 3981 00b4 1360 str r3, [r2] 3982 00b6 AEE7 b .L275 3983 .L284: 1969:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3984 .loc 1 1969 0 discriminator 1 3985 00b8 A368 ldr r3, [r4, #8] 3986 00ba 8022 movs r2, #128 3987 00bc 1202 lsls r2, r2, #8 3988 00be 9342 cmp r3, r2 3989 00c0 03D0 beq .L280 ARM GAS /tmp/ccApM0GN.s page 123 1969:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 3990 .loc 1 1969 0 is_stmt 0 discriminator 2 3991 00c2 8022 movs r2, #128 3992 00c4 D200 lsls r2, r2, #3 3993 00c6 9342 cmp r3, r2 3994 00c8 B7D1 bne .L279 3995 .L280: 1972:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 3996 .loc 1 1972 0 is_stmt 1 3997 00ca 2268 ldr r2, [r4] 3998 00cc 1368 ldr r3, [r2] 3999 00ce 4021 movs r1, #64 4000 00d0 8B43 bics r3, r1 4001 00d2 1360 str r3, [r2] 4002 00d4 B1E7 b .L279 4003 .L285: 1982:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_TxRxCpltCallback(hspi); 4004 .loc 1 1982 0 4005 00d6 1F33 adds r3, r3, #31 4006 00d8 0122 movs r2, #1 4007 00da E254 strb r2, [r4, r3] 1983:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4008 .loc 1 1983 0 4009 00dc 2000 movs r0, r4 4010 00de FFF7FEFF bl HAL_SPI_TxRxCpltCallback 4011 .LVL248: 4012 00e2 B7E7 b .L274 4013 .L281: 1995:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Call Error call back in case of Error */ 4014 .loc 1 1995 0 4015 00e4 5123 movs r3, #81 4016 00e6 0122 movs r2, #1 4017 00e8 E254 strb r2, [r4, r3] 1997:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4018 .loc 1 1997 0 4019 00ea 2000 movs r0, r4 4020 00ec FFF7FEFF bl HAL_SPI_ErrorCallback 4021 .LVL249: 2000:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4022 .loc 1 2000 0 4023 00f0 B0E7 b .L274 4024 .L287: 4025 00f2 C046 .align 2 4026 .L286: 4027 00f4 FFDFFFFF .word -8193 4028 .cfi_endproc 4029 .LFE67: 4031 .section .text.SPI_RxISR,"ax",%progbits 4032 .align 1 4033 .syntax unified 4034 .code 16 4035 .thumb_func 4036 .fpu softvfp 4038 SPI_RxISR: 4039 .LFB69: 2036:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Receive data in 8 Bit mode */ 4040 .loc 1 2036 0 ARM GAS /tmp/ccApM0GN.s page 124 4041 .cfi_startproc 4042 @ args = 0, pretend = 0, frame = 0 4043 @ frame_needed = 0, uses_anonymous_args = 0 4044 .LVL250: 4045 0000 10B5 push {r4, lr} 4046 .LCFI26: 4047 .cfi_def_cfa_offset 8 4048 .cfi_offset 4, -8 4049 .cfi_offset 14, -4 2038:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4050 .loc 1 2038 0 4051 0002 C368 ldr r3, [r0, #12] 4052 0004 002B cmp r3, #0 4053 0006 12D1 bne .L289 2040:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4054 .loc 1 2040 0 4055 0008 0368 ldr r3, [r0] 4056 000a DA68 ldr r2, [r3, #12] 4057 000c 836B ldr r3, [r0, #56] 4058 000e 591C adds r1, r3, #1 4059 0010 8163 str r1, [r0, #56] 4060 0012 1A70 strb r2, [r3] 4061 .L290: 2048:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4062 .loc 1 2048 0 4063 0014 C38F ldrh r3, [r0, #62] 4064 0016 013B subs r3, r3, #1 4065 0018 9BB2 uxth r3, r3 4066 001a C387 strh r3, [r0, #62] 2051:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4067 .loc 1 2051 0 4068 001c C38F ldrh r3, [r0, #62] 4069 001e 9BB2 uxth r3, r3 4070 0020 012B cmp r3, #1 4071 0022 0CD0 beq .L293 4072 .L291: 2057:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4073 .loc 1 2057 0 4074 0024 C38F ldrh r3, [r0, #62] 4075 0026 9BB2 uxth r3, r3 4076 0028 002B cmp r3, #0 4077 002a 14D0 beq .L294 4078 .LVL251: 4079 .L288: 2061:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4080 .loc 1 2061 0 4081 @ sp needed 4082 002c 10BD pop {r4, pc} 4083 .LVL252: 4084 .L289: 2045:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr+=2U; 4085 .loc 1 2045 0 4086 002e 0368 ldr r3, [r0] 4087 0030 DB68 ldr r3, [r3, #12] 4088 0032 826B ldr r2, [r0, #56] 4089 0034 1380 strh r3, [r2] 2046:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } ARM GAS /tmp/ccApM0GN.s page 125 4090 .loc 1 2046 0 4091 0036 836B ldr r3, [r0, #56] 4092 0038 0233 adds r3, r3, #2 4093 003a 8363 str r3, [r0, #56] 4094 003c EAE7 b .L290 4095 .L293: 2051:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4096 .loc 1 2051 0 discriminator 1 4097 003e 8023 movs r3, #128 4098 0040 9B01 lsls r3, r3, #6 4099 0042 826A ldr r2, [r0, #40] 4100 0044 9A42 cmp r2, r3 4101 0046 EDD1 bne .L291 2054:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4102 .loc 1 2054 0 4103 0048 0268 ldr r2, [r0] 4104 004a 1168 ldr r1, [r2] 4105 004c 8023 movs r3, #128 4106 004e 5B01 lsls r3, r3, #5 4107 0050 0B43 orrs r3, r1 4108 0052 1360 str r3, [r2] 4109 0054 E6E7 b .L291 4110 .L294: 2059:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4111 .loc 1 2059 0 4112 0056 FFF7FEFF bl SPI_RxCloseIRQHandler 4113 .LVL253: 2061:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4114 .loc 1 2061 0 4115 005a E7E7 b .L288 4116 .cfi_endproc 4117 .LFE69: 4119 .section .text.SPI_2LinesRxISR,"ax",%progbits 4120 .align 1 4121 .syntax unified 4122 .code 16 4123 .thumb_func 4124 .fpu softvfp 4126 SPI_2LinesRxISR: 4127 .LFB68: 2009:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* Receive data in 8 Bit mode */ 4128 .loc 1 2009 0 4129 .cfi_startproc 4130 @ args = 0, pretend = 0, frame = 0 4131 @ frame_needed = 0, uses_anonymous_args = 0 4132 .LVL254: 4133 0000 10B5 push {r4, lr} 4134 .LCFI27: 4135 .cfi_def_cfa_offset 8 4136 .cfi_offset 4, -8 4137 .cfi_offset 14, -4 2011:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4138 .loc 1 2011 0 4139 0002 C368 ldr r3, [r0, #12] 4140 0004 002B cmp r3, #0 4141 0006 0ED1 bne .L296 2013:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } ARM GAS /tmp/ccApM0GN.s page 126 4142 .loc 1 2013 0 4143 0008 0368 ldr r3, [r0] 4144 000a DA68 ldr r2, [r3, #12] 4145 000c 836B ldr r3, [r0, #56] 4146 000e 591C adds r1, r3, #1 4147 0010 8163 str r1, [r0, #56] 4148 0012 1A70 strb r2, [r3] 4149 .L297: 2021:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4150 .loc 1 2021 0 4151 0014 C38F ldrh r3, [r0, #62] 4152 0016 013B subs r3, r3, #1 4153 0018 9BB2 uxth r3, r3 4154 001a C387 strh r3, [r0, #62] 2023:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4155 .loc 1 2023 0 4156 001c C38F ldrh r3, [r0, #62] 4157 001e 9BB2 uxth r3, r3 4158 0020 002B cmp r3, #0 4159 0022 08D0 beq .L299 4160 .LVL255: 4161 .L295: 2027:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4162 .loc 1 2027 0 4163 @ sp needed 4164 0024 10BD pop {r4, pc} 4165 .LVL256: 4166 .L296: 2018:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->pRxBuffPtr+=2U; 4167 .loc 1 2018 0 4168 0026 0368 ldr r3, [r0] 4169 0028 DB68 ldr r3, [r3, #12] 4170 002a 826B ldr r2, [r0, #56] 4171 002c 1380 strh r3, [r2] 2019:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4172 .loc 1 2019 0 4173 002e 836B ldr r3, [r0, #56] 4174 0030 0233 adds r3, r3, #2 4175 0032 8363 str r3, [r0, #56] 4176 0034 EEE7 b .L297 4177 .L299: 2025:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4178 .loc 1 2025 0 4179 0036 FFF7FEFF bl SPI_RxCloseIRQHandler 4180 .LVL257: 2027:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4181 .loc 1 2027 0 4182 003a F3E7 b .L295 4183 .cfi_endproc 4184 .LFE68: 4186 .section .text.SPI_DMAError,"ax",%progbits 4187 .align 1 4188 .syntax unified 4189 .code 16 4190 .thumb_func 4191 .fpu softvfp 4193 SPI_DMAError: ARM GAS /tmp/ccApM0GN.s page 127 4194 .LFB76: 2308:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_HandleTypeDef* hspi = (SPI_HandleTypeDef* )((DMA_HandleTypeDef* )hdma)->Parent; 4195 .loc 1 2308 0 4196 .cfi_startproc 4197 @ args = 0, pretend = 0, frame = 0 4198 @ frame_needed = 0, uses_anonymous_args = 0 4199 .LVL258: 4200 0000 10B5 push {r4, lr} 4201 .LCFI28: 4202 .cfi_def_cfa_offset 8 4203 .cfi_offset 4, -8 4204 .cfi_offset 14, -4 2309:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->TxXferCount = 0U; 4205 .loc 1 2309 0 4206 0002 806A ldr r0, [r0, #40] 4207 .LVL259: 2310:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = 0U; 4208 .loc 1 2310 0 4209 0004 0023 movs r3, #0 4210 0006 C386 strh r3, [r0, #54] 2311:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State= HAL_SPI_STATE_READY; 4211 .loc 1 2311 0 4212 0008 C387 strh r3, [r0, #62] 2312:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SET_BIT(hspi->ErrorCode, HAL_SPI_ERROR_DMA); 4213 .loc 1 2312 0 4214 000a 5133 adds r3, r3, #81 4215 000c 0122 movs r2, #1 4216 000e C254 strb r2, [r0, r3] 2313:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_ErrorCallback(hspi); 4217 .loc 1 2313 0 4218 0010 436D ldr r3, [r0, #84] 4219 0012 0F32 adds r2, r2, #15 4220 0014 1343 orrs r3, r2 4221 0016 4365 str r3, [r0, #84] 2314:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4222 .loc 1 2314 0 4223 0018 FFF7FEFF bl HAL_SPI_ErrorCallback 4224 .LVL260: 2315:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4225 .loc 1 2315 0 4226 @ sp needed 4227 001c 10BD pop {r4, pc} 4228 .cfi_endproc 4229 .LFE76: 4231 .section .text.SPI_DMATransmitCplt,"ax",%progbits 4232 .align 1 4233 .syntax unified 4234 .code 16 4235 .thumb_func 4236 .fpu softvfp 4238 SPI_DMATransmitCplt: 4239 .LFB70: 2070:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** SPI_HandleTypeDef* hspi = ( SPI_HandleTypeDef* )((DMA_HandleTypeDef* )hdma)->Parent; 4240 .loc 1 2070 0 4241 .cfi_startproc 4242 @ args = 0, pretend = 0, frame = 8 4243 @ frame_needed = 0, uses_anonymous_args = 0 ARM GAS /tmp/ccApM0GN.s page 128 4244 .LVL261: 4245 0000 10B5 push {r4, lr} 4246 .LCFI29: 4247 .cfi_def_cfa_offset 8 4248 .cfi_offset 4, -8 4249 .cfi_offset 14, -4 4250 0002 82B0 sub sp, sp, #8 4251 .LCFI30: 4252 .cfi_def_cfa_offset 16 2071:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4253 .loc 1 2071 0 4254 0004 846A ldr r4, [r0, #40] 4255 .LVL262: 2075:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4256 .loc 1 2075 0 4257 0006 0368 ldr r3, [r0] 4258 0008 1B68 ldr r3, [r3] 4259 000a 9B06 lsls r3, r3, #26 4260 000c 10D5 bpl .L308 4261 .LVL263: 4262 .L302: 2097:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4263 .loc 1 2097 0 4264 000e A368 ldr r3, [r4, #8] 4265 0010 002B cmp r3, #0 4266 0012 05D1 bne .L305 4267 .LBB11: 2099:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4268 .loc 1 2099 0 4269 0014 2368 ldr r3, [r4] 4270 0016 DA68 ldr r2, [r3, #12] 4271 0018 0192 str r2, [sp, #4] 4272 001a 9B68 ldr r3, [r3, #8] 4273 001c 0193 str r3, [sp, #4] 4274 001e 019B ldr r3, [sp, #4] 4275 .L305: 4276 .LBE11: 2103:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4277 .loc 1 2103 0 4278 0020 636D ldr r3, [r4, #84] 4279 0022 002B cmp r3, #0 4280 0024 27D1 bne .L309 2109:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4281 .loc 1 2109 0 4282 0026 2000 movs r0, r4 4283 0028 FFF7FEFF bl HAL_SPI_TxCpltCallback 4284 .LVL264: 4285 .L301: 2111:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4286 .loc 1 2111 0 4287 002c 02B0 add sp, sp, #8 4288 @ sp needed 4289 .LVL265: 4290 002e 10BD pop {r4, pc} 4291 .LVL266: 4292 .L308: 2078:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { ARM GAS /tmp/ccApM0GN.s page 129 4293 .loc 1 2078 0 4294 0030 0A23 movs r3, #10 4295 0032 0022 movs r2, #0 4296 0034 0221 movs r1, #2 4297 0036 2000 movs r0, r4 4298 .LVL267: 4299 0038 FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 4300 .LVL268: 4301 003c 0028 cmp r0, #0 4302 003e 03D0 beq .L303 2080:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4303 .loc 1 2080 0 4304 0040 636D ldr r3, [r4, #84] 4305 0042 2022 movs r2, #32 4306 0044 1343 orrs r3, r2 4307 0046 6365 str r3, [r4, #84] 4308 .L303: 2084:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4309 .loc 1 2084 0 4310 0048 2268 ldr r2, [r4] 4311 004a 5368 ldr r3, [r2, #4] 4312 004c 0221 movs r1, #2 4313 004e 8B43 bics r3, r1 4314 0050 5360 str r3, [r2, #4] 2087:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4315 .loc 1 2087 0 4316 0052 0A23 movs r3, #10 4317 0054 0122 movs r2, #1 4318 0056 7E31 adds r1, r1, #126 4319 0058 2000 movs r0, r4 4320 005a FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 4321 .LVL269: 4322 005e 0028 cmp r0, #0 4323 0060 03D0 beq .L304 2089:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4324 .loc 1 2089 0 4325 0062 636D ldr r3, [r4, #84] 4326 0064 2022 movs r2, #32 4327 0066 1343 orrs r3, r2 4328 0068 6365 str r3, [r4, #84] 4329 .L304: 2092:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_READY; 4330 .loc 1 2092 0 4331 006a 0023 movs r3, #0 4332 006c E386 strh r3, [r4, #54] 2093:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4333 .loc 1 2093 0 4334 006e 5133 adds r3, r3, #81 4335 0070 0122 movs r2, #1 4336 0072 E254 strb r2, [r4, r3] 4337 0074 CBE7 b .L302 4338 .L309: 2105:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4339 .loc 1 2105 0 4340 0076 2000 movs r0, r4 4341 0078 FFF7FEFF bl HAL_SPI_ErrorCallback 4342 .LVL270: ARM GAS /tmp/ccApM0GN.s page 130 4343 007c D6E7 b .L301 4344 .cfi_endproc 4345 .LFE70: 4347 .section .text.SPI_DMAReceiveCplt,"ax",%progbits 4348 .align 1 4349 .syntax unified 4350 .code 16 4351 .thumb_func 4352 .fpu softvfp 4354 SPI_DMAReceiveCplt: 4355 .LFB71: 2120:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __IO uint16_t tmpreg = 0U; 4356 .loc 1 2120 0 4357 .cfi_startproc 4358 @ args = 0, pretend = 0, frame = 8 4359 @ frame_needed = 0, uses_anonymous_args = 0 4360 .LVL271: 4361 0000 10B5 push {r4, lr} 4362 .LCFI31: 4363 .cfi_def_cfa_offset 8 4364 .cfi_offset 4, -8 4365 .cfi_offset 14, -4 4366 0002 82B0 sub sp, sp, #8 4367 .LCFI32: 4368 .cfi_def_cfa_offset 16 2121:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4369 .loc 1 2121 0 4370 0004 6B46 mov r3, sp 4371 0006 0022 movs r2, #0 4372 0008 DA80 strh r2, [r3, #6] 2123:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4373 .loc 1 2123 0 4374 000a 846A ldr r4, [r0, #40] 4375 .LVL272: 2126:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4376 .loc 1 2126 0 4377 000c 0368 ldr r3, [r0] 4378 000e 1B68 ldr r3, [r3] 4379 0010 9B06 lsls r3, r3, #26 4380 0012 5DD4 bmi .L311 2129:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4381 .loc 1 2129 0 4382 0014 2268 ldr r2, [r4] 4383 0016 5368 ldr r3, [r2, #4] 4384 0018 0121 movs r1, #1 4385 001a 8B43 bics r3, r1 4386 001c 5360 str r3, [r2, #4] 2132:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4387 .loc 1 2132 0 4388 001e 2268 ldr r2, [r4] 4389 0020 5368 ldr r3, [r2, #4] 4390 0022 0131 adds r1, r1, #1 4391 0024 8B43 bics r3, r1 4392 0026 5360 str r3, [r2, #4] 2135:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4393 .loc 1 2135 0 4394 0028 8023 movs r3, #128 ARM GAS /tmp/ccApM0GN.s page 131 4395 002a 9B01 lsls r3, r3, #6 4396 002c A26A ldr r2, [r4, #40] 4397 002e 9A42 cmp r2, r3 4398 0030 11D0 beq .L319 4399 .LVL273: 4400 .L312: 2161:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4401 .loc 1 2161 0 4402 0032 8223 movs r3, #130 4403 0034 5B00 lsls r3, r3, #1 4404 0036 6268 ldr r2, [r4, #4] 4405 0038 9A42 cmp r2, r3 4406 003a 36D0 beq .L320 4407 .L315: 2167:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_READY; 4408 .loc 1 2167 0 4409 003c 0023 movs r3, #0 4410 003e E387 strh r3, [r4, #62] 2168:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4411 .loc 1 2168 0 4412 0040 5133 adds r3, r3, #81 4413 0042 0122 movs r2, #1 4414 0044 E254 strb r2, [r4, r3] 2171:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4415 .loc 1 2171 0 4416 0046 636D ldr r3, [r4, #84] 4417 0048 002B cmp r3, #0 4418 004a 3DD0 beq .L317 2173:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4419 .loc 1 2173 0 4420 004c 2000 movs r0, r4 4421 004e FFF7FEFF bl HAL_SPI_ErrorCallback 4422 .LVL274: 4423 .L310: 2184:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4424 .loc 1 2184 0 4425 0052 02B0 add sp, sp, #8 4426 @ sp needed 4427 .LVL275: 4428 0054 10BD pop {r4, pc} 4429 .LVL276: 4430 .L319: 2138:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4431 .loc 1 2138 0 4432 0056 0A23 movs r3, #10 4433 0058 0022 movs r2, #0 4434 005a 0139 subs r1, r1, #1 4435 005c 2000 movs r0, r4 4436 .LVL277: 4437 005e FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 4438 .LVL278: 4439 0062 0028 cmp r0, #0 4440 0064 03D0 beq .L313 2140:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4441 .loc 1 2140 0 4442 0066 636D ldr r3, [r4, #84] 4443 0068 2022 movs r2, #32 ARM GAS /tmp/ccApM0GN.s page 132 4444 006a 1343 orrs r3, r2 4445 006c 6365 str r3, [r4, #84] 4446 .L313: 2144:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** UNUSED(tmpreg); /* avoid warning on tmpreg affectation with some compiler */ 4447 .loc 1 2144 0 4448 006e 2368 ldr r3, [r4] 4449 0070 DB68 ldr r3, [r3, #12] 4450 0072 9BB2 uxth r3, r3 4451 0074 6A46 mov r2, sp 4452 0076 D380 strh r3, [r2, #6] 2145:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4453 .loc 1 2145 0 4454 0078 D388 ldrh r3, [r2, #6] 2148:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4455 .loc 1 2148 0 4456 007a 0A23 movs r3, #10 4457 007c 0122 movs r2, #1 4458 007e 0121 movs r1, #1 4459 0080 2000 movs r0, r4 4460 0082 FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 4461 .LVL279: 4462 0086 0028 cmp r0, #0 4463 0088 03D0 beq .L314 2150:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4464 .loc 1 2150 0 4465 008a 636D ldr r3, [r4, #84] 4466 008c 2022 movs r2, #32 4467 008e 1343 orrs r3, r2 4468 0090 6365 str r3, [r4, #84] 4469 .L314: 2154:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4470 .loc 1 2154 0 4471 0092 2368 ldr r3, [r4] 4472 0094 9A68 ldr r2, [r3, #8] 4473 0096 D206 lsls r2, r2, #27 4474 0098 CBD5 bpl .L312 2156:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_CLEAR_CRCERRFLAG(hspi); 4475 .loc 1 2156 0 4476 009a 626D ldr r2, [r4, #84] 4477 009c 0221 movs r1, #2 4478 009e 0A43 orrs r2, r1 4479 00a0 6265 str r2, [r4, #84] 2157:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4480 .loc 1 2157 0 4481 00a2 1122 movs r2, #17 4482 00a4 5242 rsbs r2, r2, #0 4483 00a6 9A60 str r2, [r3, #8] 4484 00a8 C3E7 b .L312 4485 .L320: 2161:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4486 .loc 1 2161 0 discriminator 1 4487 00aa A368 ldr r3, [r4, #8] 4488 00ac 8022 movs r2, #128 4489 00ae 1202 lsls r2, r2, #8 4490 00b0 9342 cmp r3, r2 4491 00b2 03D0 beq .L316 2161:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { ARM GAS /tmp/ccApM0GN.s page 133 4492 .loc 1 2161 0 is_stmt 0 discriminator 2 4493 00b4 8022 movs r2, #128 4494 00b6 D200 lsls r2, r2, #3 4495 00b8 9342 cmp r3, r2 4496 00ba BFD1 bne .L315 4497 .L316: 2164:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4498 .loc 1 2164 0 is_stmt 1 4499 00bc 2268 ldr r2, [r4] 4500 00be 1368 ldr r3, [r2] 4501 00c0 4021 movs r1, #64 4502 00c2 8B43 bics r3, r1 4503 00c4 1360 str r3, [r2] 4504 00c6 B9E7 b .L315 4505 .L317: 2177:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4506 .loc 1 2177 0 4507 00c8 2000 movs r0, r4 4508 00ca FFF7FEFF bl HAL_SPI_RxCpltCallback 4509 .LVL280: 4510 00ce C0E7 b .L310 4511 .LVL281: 4512 .L311: 2182:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4513 .loc 1 2182 0 4514 00d0 2000 movs r0, r4 4515 .LVL282: 4516 00d2 FFF7FEFF bl HAL_SPI_RxCpltCallback 4517 .LVL283: 2184:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4518 .loc 1 2184 0 4519 00d6 BCE7 b .L310 4520 .cfi_endproc 4521 .LFE71: 4523 .section .text.SPI_DMATransmitReceiveCplt,"ax",%progbits 4524 .align 1 4525 .syntax unified 4526 .code 16 4527 .thumb_func 4528 .fpu softvfp 4530 SPI_DMATransmitReceiveCplt: 4531 .LFB72: 2193:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __IO uint16_t tmpreg = 0U; 4532 .loc 1 2193 0 4533 .cfi_startproc 4534 @ args = 0, pretend = 0, frame = 8 4535 @ frame_needed = 0, uses_anonymous_args = 0 4536 .LVL284: 4537 0000 10B5 push {r4, lr} 4538 .LCFI33: 4539 .cfi_def_cfa_offset 8 4540 .cfi_offset 4, -8 4541 .cfi_offset 14, -4 4542 0002 82B0 sub sp, sp, #8 4543 .LCFI34: 4544 .cfi_def_cfa_offset 16 2194:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** ARM GAS /tmp/ccApM0GN.s page 134 4545 .loc 1 2194 0 4546 0004 6B46 mov r3, sp 4547 0006 0022 movs r2, #0 4548 0008 DA80 strh r2, [r3, #6] 2196:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** if((hdma->Instance->CCR & DMA_CCR_CIRC) == 0U) 4549 .loc 1 2196 0 4550 000a 846A ldr r4, [r0, #40] 4551 .LVL285: 2197:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4552 .loc 1 2197 0 4553 000c 0368 ldr r3, [r0] 4554 000e 1B68 ldr r3, [r3] 4555 0010 9B06 lsls r3, r3, #26 4556 0012 5DD4 bmi .L322 2200:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4557 .loc 1 2200 0 4558 0014 8023 movs r3, #128 4559 0016 9B01 lsls r3, r3, #6 4560 0018 A26A ldr r2, [r4, #40] 4561 001a 9A42 cmp r2, r3 4562 001c 2ED0 beq .L329 4563 .LVL286: 4564 .L323: 2224:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4565 .loc 1 2224 0 4566 001e 0A23 movs r3, #10 4567 0020 0022 movs r2, #0 4568 0022 0221 movs r1, #2 4569 0024 2000 movs r0, r4 4570 0026 FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 4571 .LVL287: 4572 002a 0028 cmp r0, #0 4573 002c 03D0 beq .L325 2226:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4574 .loc 1 2226 0 4575 002e 636D ldr r3, [r4, #84] 4576 0030 2022 movs r2, #32 4577 0032 1343 orrs r3, r2 4578 0034 6365 str r3, [r4, #84] 4579 .L325: 2230:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4580 .loc 1 2230 0 4581 0036 2268 ldr r2, [r4] 4582 0038 5368 ldr r3, [r2, #4] 4583 003a 0221 movs r1, #2 4584 003c 8B43 bics r3, r1 4585 003e 5360 str r3, [r2, #4] 2233:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4586 .loc 1 2233 0 4587 0040 0A23 movs r3, #10 4588 0042 0122 movs r2, #1 4589 0044 7E31 adds r1, r1, #126 4590 0046 2000 movs r0, r4 4591 0048 FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 4592 .LVL288: 4593 004c 0028 cmp r0, #0 4594 004e 03D0 beq .L326 ARM GAS /tmp/ccApM0GN.s page 135 2235:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4595 .loc 1 2235 0 4596 0050 636D ldr r3, [r4, #84] 4597 0052 2022 movs r2, #32 4598 0054 1343 orrs r3, r2 4599 0056 6365 str r3, [r4, #84] 4600 .L326: 2239:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4601 .loc 1 2239 0 4602 0058 2168 ldr r1, [r4] 4603 005a 4B68 ldr r3, [r1, #4] 4604 005c 0122 movs r2, #1 4605 005e 9343 bics r3, r2 4606 0060 4B60 str r3, [r1, #4] 2241:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->RxXferCount = 0U; 4607 .loc 1 2241 0 4608 0062 0023 movs r3, #0 4609 0064 E386 strh r3, [r4, #54] 2242:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4610 .loc 1 2242 0 4611 0066 E387 strh r3, [r4, #62] 2244:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4612 .loc 1 2244 0 4613 0068 5133 adds r3, r3, #81 4614 006a E254 strb r2, [r4, r3] 2247:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4615 .loc 1 2247 0 4616 006c 636D ldr r3, [r4, #84] 4617 006e 002B cmp r3, #0 4618 0070 2AD0 beq .L327 2249:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4619 .loc 1 2249 0 4620 0072 2000 movs r0, r4 4621 0074 FFF7FEFF bl HAL_SPI_ErrorCallback 4622 .LVL289: 4623 .L321: 2260:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4624 .loc 1 2260 0 4625 0078 02B0 add sp, sp, #8 4626 @ sp needed 4627 .LVL290: 4628 007a 10BD pop {r4, pc} 4629 .LVL291: 4630 .L329: 2203:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4631 .loc 1 2203 0 4632 007c 0A23 movs r3, #10 4633 007e 0122 movs r2, #1 4634 0080 0121 movs r1, #1 4635 0082 2000 movs r0, r4 4636 .LVL292: 4637 0084 FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 4638 .LVL293: 4639 0088 0028 cmp r0, #0 4640 008a 10D0 beq .L330 4641 .L324: 2212:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** UNUSED(tmpreg); /* avoid warning on tmpreg affectation with some compiler */ ARM GAS /tmp/ccApM0GN.s page 136 4642 .loc 1 2212 0 4643 008c 2268 ldr r2, [r4] 4644 008e D368 ldr r3, [r2, #12] 4645 0090 9BB2 uxth r3, r3 4646 0092 6946 mov r1, sp 4647 0094 CB80 strh r3, [r1, #6] 2213:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4648 .loc 1 2213 0 4649 0096 CB88 ldrh r3, [r1, #6] 2216:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4650 .loc 1 2216 0 4651 0098 9368 ldr r3, [r2, #8] 4652 009a DB06 lsls r3, r3, #27 4653 009c BFD5 bpl .L323 2218:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_CLEAR_CRCERRFLAG(hspi); 4654 .loc 1 2218 0 4655 009e 636D ldr r3, [r4, #84] 4656 00a0 0221 movs r1, #2 4657 00a2 0B43 orrs r3, r1 4658 00a4 6365 str r3, [r4, #84] 2219:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4659 .loc 1 2219 0 4660 00a6 1123 movs r3, #17 4661 00a8 5B42 rsbs r3, r3, #0 4662 00aa 9360 str r3, [r2, #8] 4663 00ac B7E7 b .L323 4664 .L330: 2206:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4665 .loc 1 2206 0 4666 00ae 0A23 movs r3, #10 4667 00b0 0022 movs r2, #0 4668 00b2 0121 movs r1, #1 4669 00b4 2000 movs r0, r4 4670 00b6 FFF7FEFF bl SPI_WaitOnFlagUntilTimeout 4671 .LVL294: 4672 00ba 0028 cmp r0, #0 4673 00bc E6D0 beq .L324 2208:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4674 .loc 1 2208 0 4675 00be 636D ldr r3, [r4, #84] 4676 00c0 2022 movs r2, #32 4677 00c2 1343 orrs r3, r2 4678 00c4 6365 str r3, [r4, #84] 4679 00c6 E1E7 b .L324 4680 .L327: 2253:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4681 .loc 1 2253 0 4682 00c8 2000 movs r0, r4 4683 00ca FFF7FEFF bl HAL_SPI_TxRxCpltCallback 4684 .LVL295: 4685 00ce D3E7 b .L321 4686 .LVL296: 4687 .L322: 2258:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4688 .loc 1 2258 0 4689 00d0 2000 movs r0, r4 4690 .LVL297: ARM GAS /tmp/ccApM0GN.s page 137 4691 00d2 FFF7FEFF bl HAL_SPI_TxRxCpltCallback 4692 .LVL298: 2260:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4693 .loc 1 2260 0 4694 00d6 CFE7 b .L321 4695 .cfi_endproc 4696 .LFE72: 4698 .section .text.HAL_SPI_IRQHandler,"ax",%progbits 4699 .align 1 4700 .global HAL_SPI_IRQHandler 4701 .syntax unified 4702 .code 16 4703 .thumb_func 4704 .fpu softvfp 4706 HAL_SPI_IRQHandler: 4707 .LFB55: 1602:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** /* SPI in mode Receiver and Overrun not occurred ---------------------------*/ 4708 .loc 1 1602 0 4709 .cfi_startproc 4710 @ args = 0, pretend = 0, frame = 16 4711 @ frame_needed = 0, uses_anonymous_args = 0 4712 .LVL299: 4713 0000 00B5 push {lr} 4714 .LCFI35: 4715 .cfi_def_cfa_offset 4 4716 .cfi_offset 14, -4 4717 0002 85B0 sub sp, sp, #20 4718 .LCFI36: 4719 .cfi_def_cfa_offset 24 1604:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4720 .loc 1 1604 0 4721 0004 0368 ldr r3, [r0] 4722 0006 5A68 ldr r2, [r3, #4] 4723 0008 5206 lsls r2, r2, #25 4724 000a 08D5 bpl .L332 1604:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4725 .loc 1 1604 0 is_stmt 0 discriminator 1 4726 000c 9A68 ldr r2, [r3, #8] 4727 000e D207 lsls r2, r2, #31 4728 0010 05D5 bpl .L332 1604:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4729 .loc 1 1604 0 discriminator 2 4730 0012 9A68 ldr r2, [r3, #8] 4731 0014 5206 lsls r2, r2, #25 4732 0016 02D4 bmi .L332 1606:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return; 4733 .loc 1 1606 0 is_stmt 1 4734 0018 836C ldr r3, [r0, #72] 4735 001a 9847 blx r3 4736 .LVL300: 1607:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4737 .loc 1 1607 0 4738 001c 07E0 b .L331 4739 .LVL301: 4740 .L332: 1611:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4741 .loc 1 1611 0 ARM GAS /tmp/ccApM0GN.s page 138 4742 001e 5A68 ldr r2, [r3, #4] 4743 0020 1206 lsls r2, r2, #24 4744 0022 06D5 bpl .L334 1611:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4745 .loc 1 1611 0 is_stmt 0 discriminator 1 4746 0024 9A68 ldr r2, [r3, #8] 4747 0026 9207 lsls r2, r2, #30 4748 0028 03D5 bpl .L334 1613:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return; 4749 .loc 1 1613 0 is_stmt 1 4750 002a C36C ldr r3, [r0, #76] 4751 002c 9847 blx r3 4752 .LVL302: 4753 .L331: 1657:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4754 .loc 1 1657 0 4755 002e 05B0 add sp, sp, #20 4756 @ sp needed 4757 0030 00BD pop {pc} 4758 .LVL303: 4759 .L334: 1617:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4760 .loc 1 1617 0 4761 0032 5A68 ldr r2, [r3, #4] 4762 0034 9206 lsls r2, r2, #26 4763 0036 FAD5 bpl .L331 1620:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4764 .loc 1 1620 0 4765 0038 9A68 ldr r2, [r3, #8] 4766 003a D206 lsls r2, r2, #27 4767 003c 06D5 bpl .L335 1622:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_CLEAR_CRCERRFLAG(hspi); 4768 .loc 1 1622 0 4769 003e 426D ldr r2, [r0, #84] 4770 0040 0221 movs r1, #2 4771 0042 0A43 orrs r2, r1 4772 0044 4265 str r2, [r0, #84] 1623:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4773 .loc 1 1623 0 4774 0046 1122 movs r2, #17 4775 0048 5242 rsbs r2, r2, #0 4776 004a 9A60 str r2, [r3, #8] 4777 .L335: 1626:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4778 .loc 1 1626 0 4779 004c 0368 ldr r3, [r0] 4780 004e 9A68 ldr r2, [r3, #8] 4781 0050 9206 lsls r2, r2, #26 4782 0052 0AD5 bpl .L336 1628:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_CLEAR_MODFFLAG(hspi); 4783 .loc 1 1628 0 4784 0054 426D ldr r2, [r0, #84] 4785 0056 0121 movs r1, #1 4786 0058 0A43 orrs r2, r1 4787 005a 4265 str r2, [r0, #84] 4788 .LBB12: 1629:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } ARM GAS /tmp/ccApM0GN.s page 139 4789 .loc 1 1629 0 4790 005c 9A68 ldr r2, [r3, #8] 4791 005e 0192 str r2, [sp, #4] 4792 0060 1A68 ldr r2, [r3] 4793 0062 3F31 adds r1, r1, #63 4794 0064 8A43 bics r2, r1 4795 0066 1A60 str r2, [r3] 4796 0068 019B ldr r3, [sp, #4] 4797 .L336: 4798 .LBE12: 1633:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4799 .loc 1 1633 0 4800 006a 0368 ldr r3, [r0] 4801 006c 9A68 ldr r2, [r3, #8] 4802 006e 5206 lsls r2, r2, #25 4803 0070 0CD5 bpl .L337 1635:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4804 .loc 1 1635 0 4805 0072 5122 movs r2, #81 4806 0074 825C ldrb r2, [r0, r2] 4807 0076 122A cmp r2, #18 4808 0078 08D0 beq .L337 1637:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_CLEAR_OVRFLAG(hspi); 4809 .loc 1 1637 0 4810 007a 426D ldr r2, [r0, #84] 4811 007c 0421 movs r1, #4 4812 007e 0A43 orrs r2, r1 4813 0080 4265 str r2, [r0, #84] 4814 .LBB13: 1638:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4815 .loc 1 1638 0 4816 0082 DA68 ldr r2, [r3, #12] 4817 0084 0292 str r2, [sp, #8] 4818 0086 9A68 ldr r2, [r3, #8] 4819 0088 0292 str r2, [sp, #8] 4820 008a 029A ldr r2, [sp, #8] 4821 .L337: 4822 .LBE13: 1643:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4823 .loc 1 1643 0 4824 008c 9A68 ldr r2, [r3, #8] 4825 008e D205 lsls r2, r2, #23 4826 0090 06D5 bpl .L338 1645:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** __HAL_SPI_CLEAR_FREFLAG(hspi); 4827 .loc 1 1645 0 4828 0092 426D ldr r2, [r0, #84] 4829 0094 0821 movs r1, #8 4830 0096 0A43 orrs r2, r1 4831 0098 4265 str r2, [r0, #84] 4832 .LBB14: 1646:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4833 .loc 1 1646 0 4834 009a 9A68 ldr r2, [r3, #8] 4835 009c 0392 str r2, [sp, #12] 4836 009e 039A ldr r2, [sp, #12] 4837 .L338: 4838 .LBE14: ARM GAS /tmp/ccApM0GN.s page 140 1650:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** { 4839 .loc 1 1650 0 4840 00a0 426D ldr r2, [r0, #84] 4841 00a2 002A cmp r2, #0 4842 00a4 C3D0 beq .L331 1652:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** hspi->State = HAL_SPI_STATE_READY; 4843 .loc 1 1652 0 4844 00a6 5A68 ldr r2, [r3, #4] 4845 00a8 E021 movs r1, #224 4846 00aa 8A43 bics r2, r1 4847 00ac 5A60 str r2, [r3, #4] 1653:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** HAL_SPI_ErrorCallback(hspi); 4848 .loc 1 1653 0 4849 00ae 5123 movs r3, #81 4850 00b0 0122 movs r2, #1 4851 00b2 C254 strb r2, [r0, r3] 1654:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4852 .loc 1 1654 0 4853 00b4 FFF7FEFF bl HAL_SPI_ErrorCallback 4854 .LVL304: 4855 00b8 B9E7 b .L331 4856 .cfi_endproc 4857 .LFE55: 4859 .section .text.HAL_SPI_GetState,"ax",%progbits 4860 .align 1 4861 .global HAL_SPI_GetState 4862 .syntax unified 4863 .code 16 4864 .thumb_func 4865 .fpu softvfp 4867 HAL_SPI_GetState: 4868 .LFB63: 1799:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return hspi->State; 4869 .loc 1 1799 0 4870 .cfi_startproc 4871 @ args = 0, pretend = 0, frame = 0 4872 @ frame_needed = 0, uses_anonymous_args = 0 4873 @ link register save eliminated. 4874 .LVL305: 1800:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4875 .loc 1 1800 0 4876 0000 5123 movs r3, #81 4877 0002 C05C ldrb r0, [r0, r3] 4878 .LVL306: 4879 0004 C0B2 uxtb r0, r0 1801:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4880 .loc 1 1801 0 4881 @ sp needed 4882 0006 7047 bx lr 4883 .cfi_endproc 4884 .LFE63: 4886 .section .text.HAL_SPI_GetError,"ax",%progbits 4887 .align 1 4888 .global HAL_SPI_GetError 4889 .syntax unified 4890 .code 16 4891 .thumb_func ARM GAS /tmp/ccApM0GN.s page 141 4892 .fpu softvfp 4894 HAL_SPI_GetError: 4895 .LFB64: 1810:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** return hspi->ErrorCode; 4896 .loc 1 1810 0 4897 .cfi_startproc 4898 @ args = 0, pretend = 0, frame = 0 4899 @ frame_needed = 0, uses_anonymous_args = 0 4900 @ link register save eliminated. 4901 .LVL307: 1811:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** } 4902 .loc 1 1811 0 4903 0000 406D ldr r0, [r0, #84] 4904 .LVL308: 1812:./Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_spi.c **** 4905 .loc 1 1812 0 4906 @ sp needed 4907 0002 7047 bx lr 4908 .cfi_endproc 4909 .LFE64: 4911 .text 4912 .Letext0: 4913 .file 2 "/usr/arm-none-eabi/include/machine/_default_types.h" 4914 .file 3 "/usr/arm-none-eabi/include/sys/_stdint.h" 4915 .file 4 "Drivers/CMSIS/Device/ST/STM32L0xx/Include/system_stm32l0xx.h" 4916 .file 5 "Drivers/CMSIS/Device/ST/STM32L0xx/Include/stm32l073xx.h" 4917 .file 6 "Drivers/CMSIS/Device/ST/STM32L0xx/Include/stm32l0xx.h" 4918 .file 7 "/usr/arm-none-eabi/include/sys/lock.h" 4919 .file 8 "/usr/arm-none-eabi/include/sys/_types.h" 4920 .file 9 "/usr/lib/gcc/arm-none-eabi/7.2.0/include/stddef.h" 4921 .file 10 "/usr/arm-none-eabi/include/sys/reent.h" 4922 .file 11 "Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_def.h" 4923 .file 12 "Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_dma.h" 4924 .file 13 "Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_spi.h" 4925 .file 14 "Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal.h" ARM GAS /tmp/ccApM0GN.s page 142 DEFINED SYMBOLS *ABS*:0000000000000000 stm32l0xx_hal_spi.c /tmp/ccApM0GN.s:16 .text.SPI_WaitOnFlagUntilTimeout:0000000000000000 $t /tmp/ccApM0GN.s:22 .text.SPI_WaitOnFlagUntilTimeout:0000000000000000 SPI_WaitOnFlagUntilTimeout /tmp/ccApM0GN.s:208 .text.SPI_WaitOnFlagUntilTimeout:00000000000000ec $d /tmp/ccApM0GN.s:213 .text.HAL_SPI_MspInit:0000000000000000 $t /tmp/ccApM0GN.s:220 .text.HAL_SPI_MspInit:0000000000000000 HAL_SPI_MspInit /tmp/ccApM0GN.s:235 .text.HAL_SPI_Init:0000000000000000 $t /tmp/ccApM0GN.s:242 .text.HAL_SPI_Init:0000000000000000 HAL_SPI_Init /tmp/ccApM0GN.s:347 .text.HAL_SPI_Init:0000000000000084 $d /tmp/ccApM0GN.s:352 .text.HAL_SPI_MspDeInit:0000000000000000 $t /tmp/ccApM0GN.s:359 .text.HAL_SPI_MspDeInit:0000000000000000 HAL_SPI_MspDeInit /tmp/ccApM0GN.s:374 .text.HAL_SPI_DeInit:0000000000000000 $t /tmp/ccApM0GN.s:381 .text.HAL_SPI_DeInit:0000000000000000 HAL_SPI_DeInit /tmp/ccApM0GN.s:436 .text.HAL_SPI_Transmit:0000000000000000 $t /tmp/ccApM0GN.s:443 .text.HAL_SPI_Transmit:0000000000000000 HAL_SPI_Transmit /tmp/ccApM0GN.s:811 .text.HAL_SPI_Transmit:00000000000001e0 $d /tmp/ccApM0GN.s:816 .text.HAL_SPI_TransmitReceive:0000000000000000 $t /tmp/ccApM0GN.s:823 .text.HAL_SPI_TransmitReceive:0000000000000000 HAL_SPI_TransmitReceive /tmp/ccApM0GN.s:1492 .text.HAL_SPI_TransmitReceive:00000000000003a8 $d /tmp/ccApM0GN.s:1497 .text.HAL_SPI_Receive:0000000000000000 $t /tmp/ccApM0GN.s:1504 .text.HAL_SPI_Receive:0000000000000000 HAL_SPI_Receive /tmp/ccApM0GN.s:1946 .text.HAL_SPI_Receive:0000000000000258 $d /tmp/ccApM0GN.s:1952 .text.HAL_SPI_Transmit_IT:0000000000000000 $t /tmp/ccApM0GN.s:1959 .text.HAL_SPI_Transmit_IT:0000000000000000 HAL_SPI_Transmit_IT /tmp/ccApM0GN.s:2129 .text.HAL_SPI_Transmit_IT:00000000000000c0 $d /tmp/ccApM0GN.s:3654 .text.SPI_TxISR:0000000000000000 SPI_TxISR /tmp/ccApM0GN.s:2135 .text.HAL_SPI_TransmitReceive_IT:0000000000000000 $t /tmp/ccApM0GN.s:2142 .text.HAL_SPI_TransmitReceive_IT:0000000000000000 HAL_SPI_TransmitReceive_IT /tmp/ccApM0GN.s:2327 .text.HAL_SPI_TransmitReceive_IT:00000000000000c8 $d /tmp/ccApM0GN.s:4126 .text.SPI_2LinesRxISR:0000000000000000 SPI_2LinesRxISR /tmp/ccApM0GN.s:2334 .text.HAL_SPI_Receive_IT:0000000000000000 $t /tmp/ccApM0GN.s:2341 .text.HAL_SPI_Receive_IT:0000000000000000 HAL_SPI_Receive_IT /tmp/ccApM0GN.s:2515 .text.HAL_SPI_Receive_IT:00000000000000c8 $d /tmp/ccApM0GN.s:4038 .text.SPI_RxISR:0000000000000000 SPI_RxISR /tmp/ccApM0GN.s:2522 .text.HAL_SPI_Transmit_DMA:0000000000000000 $t /tmp/ccApM0GN.s:2529 .text.HAL_SPI_Transmit_DMA:0000000000000000 HAL_SPI_Transmit_DMA /tmp/ccApM0GN.s:2723 .text.HAL_SPI_Transmit_DMA:00000000000000e4 $d /tmp/ccApM0GN.s:3495 .text.SPI_DMAHalfTransmitCplt:0000000000000000 SPI_DMAHalfTransmitCplt /tmp/ccApM0GN.s:4238 .text.SPI_DMATransmitCplt:0000000000000000 SPI_DMATransmitCplt /tmp/ccApM0GN.s:4193 .text.SPI_DMAError:0000000000000000 SPI_DMAError /tmp/ccApM0GN.s:2731 .text.HAL_SPI_TransmitReceive_DMA:0000000000000000 $t /tmp/ccApM0GN.s:2738 .text.HAL_SPI_TransmitReceive_DMA:0000000000000000 HAL_SPI_TransmitReceive_DMA /tmp/ccApM0GN.s:2982 .text.HAL_SPI_TransmitReceive_DMA:0000000000000130 $d /tmp/ccApM0GN.s:3601 .text.SPI_DMAHalfTransmitReceiveCplt:0000000000000000 SPI_DMAHalfTransmitReceiveCplt /tmp/ccApM0GN.s:4530 .text.SPI_DMATransmitReceiveCplt:0000000000000000 SPI_DMATransmitReceiveCplt /tmp/ccApM0GN.s:3548 .text.SPI_DMAHalfReceiveCplt:0000000000000000 SPI_DMAHalfReceiveCplt /tmp/ccApM0GN.s:4354 .text.SPI_DMAReceiveCplt:0000000000000000 SPI_DMAReceiveCplt /tmp/ccApM0GN.s:2992 .text.HAL_SPI_Receive_DMA:0000000000000000 $t /tmp/ccApM0GN.s:2999 .text.HAL_SPI_Receive_DMA:0000000000000000 HAL_SPI_Receive_DMA /tmp/ccApM0GN.s:3211 .text.HAL_SPI_Receive_DMA:0000000000000104 $d /tmp/ccApM0GN.s:3220 .text.HAL_SPI_DMAPause:0000000000000000 $t /tmp/ccApM0GN.s:3227 .text.HAL_SPI_DMAPause:0000000000000000 HAL_SPI_DMAPause /tmp/ccApM0GN.s:3280 .text.HAL_SPI_DMAResume:0000000000000000 $t /tmp/ccApM0GN.s:3287 .text.HAL_SPI_DMAResume:0000000000000000 HAL_SPI_DMAResume /tmp/ccApM0GN.s:3340 .text.HAL_SPI_DMAStop:0000000000000000 $t /tmp/ccApM0GN.s:3347 .text.HAL_SPI_DMAStop:0000000000000000 HAL_SPI_DMAStop ARM GAS /tmp/ccApM0GN.s page 143 /tmp/ccApM0GN.s:3401 .text.HAL_SPI_TxCpltCallback:0000000000000000 $t /tmp/ccApM0GN.s:3408 .text.HAL_SPI_TxCpltCallback:0000000000000000 HAL_SPI_TxCpltCallback /tmp/ccApM0GN.s:3423 .text.HAL_SPI_RxCpltCallback:0000000000000000 $t /tmp/ccApM0GN.s:3430 .text.HAL_SPI_RxCpltCallback:0000000000000000 HAL_SPI_RxCpltCallback /tmp/ccApM0GN.s:3445 .text.HAL_SPI_TxRxCpltCallback:0000000000000000 $t /tmp/ccApM0GN.s:3452 .text.HAL_SPI_TxRxCpltCallback:0000000000000000 HAL_SPI_TxRxCpltCallback /tmp/ccApM0GN.s:3467 .text.HAL_SPI_TxHalfCpltCallback:0000000000000000 $t /tmp/ccApM0GN.s:3474 .text.HAL_SPI_TxHalfCpltCallback:0000000000000000 HAL_SPI_TxHalfCpltCallback /tmp/ccApM0GN.s:3489 .text.SPI_DMAHalfTransmitCplt:0000000000000000 $t /tmp/ccApM0GN.s:3520 .text.HAL_SPI_RxHalfCpltCallback:0000000000000000 $t /tmp/ccApM0GN.s:3527 .text.HAL_SPI_RxHalfCpltCallback:0000000000000000 HAL_SPI_RxHalfCpltCallback /tmp/ccApM0GN.s:3542 .text.SPI_DMAHalfReceiveCplt:0000000000000000 $t /tmp/ccApM0GN.s:3573 .text.HAL_SPI_TxRxHalfCpltCallback:0000000000000000 $t /tmp/ccApM0GN.s:3580 .text.HAL_SPI_TxRxHalfCpltCallback:0000000000000000 HAL_SPI_TxRxHalfCpltCallback /tmp/ccApM0GN.s:3595 .text.SPI_DMAHalfTransmitReceiveCplt:0000000000000000 $t /tmp/ccApM0GN.s:3626 .text.HAL_SPI_ErrorCallback:0000000000000000 $t /tmp/ccApM0GN.s:3633 .text.HAL_SPI_ErrorCallback:0000000000000000 HAL_SPI_ErrorCallback /tmp/ccApM0GN.s:3648 .text.SPI_TxISR:0000000000000000 $t /tmp/ccApM0GN.s:3842 .text.SPI_RxCloseIRQHandler:0000000000000000 $t /tmp/ccApM0GN.s:3848 .text.SPI_RxCloseIRQHandler:0000000000000000 SPI_RxCloseIRQHandler /tmp/ccApM0GN.s:4027 .text.SPI_RxCloseIRQHandler:00000000000000f4 $d /tmp/ccApM0GN.s:4032 .text.SPI_RxISR:0000000000000000 $t /tmp/ccApM0GN.s:4120 .text.SPI_2LinesRxISR:0000000000000000 $t /tmp/ccApM0GN.s:4187 .text.SPI_DMAError:0000000000000000 $t /tmp/ccApM0GN.s:4232 .text.SPI_DMATransmitCplt:0000000000000000 $t /tmp/ccApM0GN.s:4348 .text.SPI_DMAReceiveCplt:0000000000000000 $t /tmp/ccApM0GN.s:4524 .text.SPI_DMATransmitReceiveCplt:0000000000000000 $t /tmp/ccApM0GN.s:4699 .text.HAL_SPI_IRQHandler:0000000000000000 $t /tmp/ccApM0GN.s:4706 .text.HAL_SPI_IRQHandler:0000000000000000 HAL_SPI_IRQHandler /tmp/ccApM0GN.s:4860 .text.HAL_SPI_GetState:0000000000000000 $t /tmp/ccApM0GN.s:4867 .text.HAL_SPI_GetState:0000000000000000 HAL_SPI_GetState /tmp/ccApM0GN.s:4887 .text.HAL_SPI_GetError:0000000000000000 $t /tmp/ccApM0GN.s:4894 .text.HAL_SPI_GetError:0000000000000000 HAL_SPI_GetError .debug_frame:0000000000000010 $d UNDEFINED SYMBOLS HAL_GetTick HAL_DMA_Start_IT HAL_DMA_Abort