SPI_Simplex_Interrupt
[STM32F10x_StdPeriph_Examples]

Defines

#define BufferSize   32
#define BufferSize   32

Enumerations

enum  TestStatus {
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED
}

Functions

TestStatus Buffercmp (uint8_t *pBuffer1, uint8_t *pBuffer2, uint16_t BufferLength)
 Compares two buffers.
void BusFault_Handler (void)
 This function handles Bus Fault exception.
void DebugMon_Handler (void)
 This function handles Debug Monitor exception.
void GPIO_Configuration (void)
 Configures the different GPIO ports.
void HardFault_Handler (void)
 This function handles Hard Fault exception.
int main (void)
 Main program.
void MemManage_Handler (void)
 This function handles Memory Manage exception.
void NMI_Handler (void)
 This function handles NMI exception.
void NVIC_Configuration (void)
 Configure the nested vectored interrupt controller.
void PendSV_Handler (void)
 This function handles PendSV_Handler exception.
void RCC_Configuration (void)
 Configures the different system clocks.
void SPI1_IRQHandler (void)
 This function handles SPI1 or SPI3 global interrupt request.
void SPI2_IRQHandler (void)
 This function handles SPI2 global interrupt request.
void SVC_Handler (void)
 This function handles SVCall exception.
void SysTick_Handler (void)
 This function handles SysTick Handler.
void UsageFault_Handler (void)
 This function handles Usage Fault exception.

Variables

__IO uint8_t RxIdx
__IO uint8_t RxIdx = 0
SPI_InitTypeDef SPI_InitStructure
uint8_t SPI_MASTER_Buffer_Tx [BufferSize]
uint8_t SPI_MASTER_Buffer_Tx [BufferSize]
uint8_t SPI_SLAVE_Buffer_Rx [BufferSize]
uint8_t SPI_SLAVE_Buffer_Rx [BufferSize]
volatile TestStatus TransferStatus = FAILED
__IO uint8_t TxIdx
__IO uint8_t TxIdx = 0

Define Documentation

#define BufferSize   32
#define BufferSize   32

Enumeration Type Documentation

enum TestStatus
Enumerator:
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 

Definition at line 34 of file STM32F10x_StdPeriph_Examples/SPI/Simplex_Interrupt/main.c.


Function Documentation

TestStatus Buffercmp ( uint8_t *  pBuffer1,
uint8_t *  pBuffer2,
uint16_t  BufferLength 
)

Compares two buffers.

Parameters:
pBuffer1,pBuffer2,: buffers to be compared.
BufferLength,: buffer's length
Return values:
PASSED,: pBuffer1 identical to pBuffer2 FAILED: pBuffer1 differs from pBuffer2

Definition at line 215 of file STM32F10x_StdPeriph_Examples/SPI/Simplex_Interrupt/main.c.

References FAILED, and PASSED.

void BusFault_Handler ( void   ) 

This function handles Bus Fault exception.

Parameters:
None 
Return values:
None 

Definition at line 90 of file STM32F10x_StdPeriph_Examples/SPI/Simplex_Interrupt/stm32f10x_it.c.

void DebugMon_Handler ( void   ) 

This function handles Debug Monitor exception.

Parameters:
None 
Return values:
None 

Definition at line 114 of file STM32F10x_StdPeriph_Examples/SPI/Simplex_Interrupt/stm32f10x_it.c.

void GPIO_Configuration ( void   ) 
void HardFault_Handler ( void   ) 

This function handles Hard Fault exception.

Parameters:
None 
Return values:
None 

Definition at line 66 of file STM32F10x_StdPeriph_Examples/SPI/Simplex_Interrupt/stm32f10x_it.c.

int main ( void   ) 
void MemManage_Handler ( void   ) 

This function handles Memory Manage exception.

Parameters:
None 
Return values:
None 

Definition at line 78 of file STM32F10x_StdPeriph_Examples/SPI/Simplex_Interrupt/stm32f10x_it.c.

void NMI_Handler ( void   ) 

This function handles NMI exception.

Parameters:
None 
Return values:
None 

Definition at line 57 of file STM32F10x_StdPeriph_Examples/SPI/Simplex_Interrupt/stm32f10x_it.c.

void NVIC_Configuration ( void   ) 
void PendSV_Handler ( void   ) 

This function handles PendSV_Handler exception.

Parameters:
None 
Return values:
None 

Definition at line 130 of file STM32F10x_StdPeriph_Examples/SPI/Simplex_Interrupt/stm32f10x_it.c.

void RCC_Configuration ( void   ) 

Configures the different system clocks.

Parameters:
None 
Return values:
None 

Definition at line 128 of file STM32F10x_StdPeriph_Examples/SPI/Simplex_Interrupt/main.c.

References ENABLE, RCC_APB1PeriphClockCmd(), RCC_APB2Periph_AFIO, RCC_APB2PeriphClockCmd(), RCC_HCLK_Div2, and RCC_PCLK2Config().

void SPI1_IRQHandler ( void   ) 

This function handles SPI1 or SPI3 global interrupt request.

Parameters:
None 
Return values:
None 

Definition at line 151 of file STM32F10x_StdPeriph_Examples/SPI/Simplex_Interrupt/stm32f10x_it.c.

References BufferSize, DISABLE, RESET, SPI_I2S_GetITStatus(), SPI_I2S_IT_TXE, SPI_I2S_ITConfig(), SPI_I2S_SendData(), SPI_MASTER_Buffer_Tx, and TxIdx.

void SPI2_IRQHandler ( void   ) 

This function handles SPI2 global interrupt request.

Parameters:
None 
Return values:
None 

Definition at line 174 of file STM32F10x_StdPeriph_Examples/SPI/Simplex_Interrupt/stm32f10x_it.c.

References I2S2_Buffer_Rx, RxIdx, SET, SPI2, SPI_I2S_GetITStatus(), SPI_I2S_IT_RXNE, SPI_I2S_ReceiveData(), and SPI_SLAVE_Buffer_Rx.

void SVC_Handler ( void   ) 

This function handles SVCall exception.

Parameters:
None 
Return values:
None 

Definition at line 122 of file STM32F10x_StdPeriph_Examples/SPI/Simplex_Interrupt/stm32f10x_it.c.

void SysTick_Handler ( void   ) 

This function handles SysTick Handler.

Parameters:
None 
Return values:
None 

Definition at line 138 of file STM32F10x_StdPeriph_Examples/SPI/Simplex_Interrupt/stm32f10x_it.c.

void UsageFault_Handler ( void   ) 

This function handles Usage Fault exception.

Parameters:
None 
Return values:
None 

Definition at line 102 of file STM32F10x_StdPeriph_Examples/SPI/Simplex_Interrupt/stm32f10x_it.c.


Variable Documentation

__IO uint8_t RxIdx
__IO uint8_t RxIdx = 0
uint8_t SPI_MASTER_Buffer_Tx[BufferSize]

Definition at line 49 of file STM32F10x_StdPeriph_Examples/DMA/SPI_RAM/main.c.

Referenced by main(), and SPI1_IRQHandler().

uint8_t SPI_MASTER_Buffer_Tx[BufferSize]
Initial value:
 {0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
                                            0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C,
                                            0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12,
                                            0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
                                            0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E,
                                            0x1F, 0x20}

Definition at line 42 of file STM32F10x_StdPeriph_Examples/SPI/Simplex_Interrupt/main.c.

uint8_t SPI_SLAVE_Buffer_Rx[BufferSize]

Definition at line 45 of file STM32F10x_StdPeriph_Examples/DMA/SPI_RAM/main.c.

Referenced by main(), and SPI2_IRQHandler().

uint8_t SPI_SLAVE_Buffer_Rx[BufferSize]
volatile TestStatus TransferStatus = FAILED
__IO uint8_t TxIdx
__IO uint8_t TxIdx = 0
STM32F10x Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit  www.st.com/STM32