STM32F0xx Standard Peripherals Firmware Library: DMA_FLASHRAMTransfer

STM32F0xx Standard Peripherals Library

STM32F0xx Standard Peripherals Firmware Library

Defines

#define BUFFER_SIZE   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 = 1, 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

static TestStatus Buffercmp (const uint32_t *pBuffer, uint32_t *pBuffer1, uint16_t BufferLength)
 Compares two buffers.
void DMA1_Channel1_IRQHandler (void)
 This function handles DMA1 Channel 1 interrupt request.
static void DMA_Config (void)
 Configures DMA1 channel3 to transfer data from FLASH to RAM.
void HardFault_Handler (void)
 This function handles Hard Fault exception.
int main (void)
 Main program.
void NMI_Handler (void)
 This function handles NMI exception.
void PendSV_Handler (void)
 This function handles PendSVC exception.
void SVC_Handler (void)
 This function handles SVCall exception.
void SysTick_Handler (void)
 This function handles SysTick Handler.

Variables

uint32_t DstBuffer [BUFFER_SIZE]
__IO uint32_t EndOfTransfer
__IO uint32_t EndOfTransfer = 0
const uint32_t SrcBuffer [BUFFER_SIZE]
__IO TestStatus TransferStatus = FAILED

Define Documentation

#define BUFFER_SIZE   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 

Definition at line 40 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_FLASHRAMTransfer/main.c.


Function Documentation

static TestStatus Buffercmp ( const uint32_t *  pBuffer,
uint32_t *  pBuffer1,
uint16_t  BufferLength 
) [static]

Compares two buffers.

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

Definition at line 143 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_FLASHRAMTransfer/main.c.

References FAILED, and PASSED.

Referenced by main().

void DMA1_Channel1_IRQHandler ( void  )

This function handles DMA1 Channel 1 interrupt request.

Parameters:
None
Return values:
None

Definition at line 114 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_FLASHRAMTransfer/stm32f0xx_it.c.

References EndOfTransfer.

static void DMA_Config ( void  ) [static]

Configures DMA1 channel3 to transfer data from FLASH to RAM.

Parameters:
None
Return values:
None

Definition at line 102 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_FLASHRAMTransfer/main.c.

References BUFFER_SIZE, DMA_InitStructure, DstBuffer, NVIC_InitStructure, and SrcBuffer.

Referenced by main().

void HardFault_Handler ( void  )

This function handles Hard Fault exception.

Parameters:
None
Return values:
None

Definition at line 67 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_FLASHRAMTransfer/stm32f0xx_it.c.

int main ( void  )

Main program.

Parameters:
None
Return values:
None

< At this stage the microcontroller clock setting is already configured, this is done through SystemInit() function which is called from startup file (startup_stm32f0xx.s) before to branch to application main. To reconfigure the default setting of SystemInit() function, refer to system_stm32f0xx.c file

Definition at line 70 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_FLASHRAMTransfer/main.c.

References BUFFER_SIZE, Buffercmp(), DMA_Config(), DstBuffer, EndOfTransfer, SrcBuffer, and TransferStatus.

void NMI_Handler ( void  )

This function handles NMI exception.

Parameters:
None
Return values:
None

Definition at line 58 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_FLASHRAMTransfer/stm32f0xx_it.c.

void PendSV_Handler ( void  )

This function handles PendSVC exception.

Parameters:
None
Return values:
None

Definition at line 89 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_FLASHRAMTransfer/stm32f0xx_it.c.

void SVC_Handler ( void  )

This function handles SVCall exception.

Parameters:
None
Return values:
None

Definition at line 80 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_FLASHRAMTransfer/stm32f0xx_it.c.

void SysTick_Handler ( void  )

This function handles SysTick Handler.

Parameters:
None
Return values:
None

Definition at line 98 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_FLASHRAMTransfer/stm32f0xx_it.c.


Variable Documentation

uint32_t DstBuffer[BUFFER_SIZE]
__IO uint32_t EndOfTransfer = 0
const uint32_t SrcBuffer[BUFFER_SIZE]
Initial value:
 {
                                    0x01020304,0x05060708,0x090A0B0C,0x0D0E0F10,
                                    0x11121314,0x15161718,0x191A1B1C,0x1D1E1F20,
                                    0x21222324,0x25262728,0x292A2B2C,0x2D2E2F30,
                                    0x31323334,0x35363738,0x393A3B3C,0x3D3E3F40,
                                    0x41424344,0x45464748,0x494A4B4C,0x4D4E4F50,
                                    0x51525354,0x55565758,0x595A5B5C,0x5D5E5F60,
                                    0x61626364,0x65666768,0x696A6B6C,0x6D6E6F70,
                                    0x71727374,0x75767778,0x797A7B7C,0x7D7E7F80}

Definition at line 49 of file STM32F0xx_StdPeriph_Examples/DMA/DMA_FLASHRAMTransfer/main.c.

Referenced by DMA_Config(), and main().

STM32L1xx Standard Peripherals Library: Footer

 

 

 For complete documentation on STM32 Microcontrollers visit www.st.com/STM32