资源简介

STM32F4 W5500 利用SPI DMA以太网进行通讯 利用DMA提高CPU的处理速度 增大网络的吞吐量

资源截图

代码片段和文件信息

/**
  ******************************************************************************
  * @file    Project/STM32F4xx_StdPeriph_Templates/main.c 
  * @author  MCD Application Team
  * @version V1.1.0
  * @date    18-January-2013
  * @brief   Main program body
  ******************************************************************************
  * @attention
  *
  * 

© COPYRIGHT 2013 STMicroelectronics


  *
  * Licensed under MCD-ST Liberty SW License Agreement V2 (the “License“);
  * You may not use this file except in compliance with the License.
  * You may obtain a copy of the License at:
  *
  *        http://www.st.com/software_license_agreement_liberty_v2
  *
  * Unless required by applicable law or agreed to in writing software 
  * distributed under the License is distributed on an “AS IS“ BASIS 
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  *
  ******************************************************************************
  */

/* Includes ------------------------------------------------------------------*/
#include “main.h“
#include 
#include “Ethernet\wizchip_conf.h“
#include “Application\loopback.h“
#include “PlatformHandler\rcc_handler.h“
#include “PlatformHandler\gpio_handler.h“
#include “PlatformHandler\timer_handler.h“
#include “PlatformHandler\uart_handler.h“
#include “PlatformHandler\spi_handler.h“
#include “PlatformHandler\dma_handler.h“
#include “common.h“

/** @addtogroup STM32F4xx_StdPeriph_Templates
  * @{
  */ 

/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/

#if defined (USE_STM324xG_EVAL)
  #define MESSAGE1   “     STM32F40xx     “
  #define MESSAGE2   “ Device running on  “ 
  #define MESSAGE3   “   STM324xG-EVAL    “

#else /* USE_STM324x7I_EVAL */ 
  #define MESSAGE1   “     STM32F427x     “
  #define MESSAGE2   “ Device running on  “ 
  #define MESSAGE3   “  STM324x7I-EVAL    “
#endif 



#define __DIV(__PCLK __BAUD)       ((__PCLK*25)/(4*__BAUD))
#define __DIVMANT(__PCLK __BAUD)   (__DIV(__PCLK __BAUD)/100)
#define __DIVFRAQ(__PCLK __BAUD)   (((__DIV(__PCLK __BAUD) - (__DIVMANT(__PCLK __BAUD) * 100)) * 16 + 50) / 100)
#define __USART_BRR(__PCLK __BAUD) ((__DIVMANT(__PCLK __BAUD) << 4)|(__DIVFRAQ(__PCLK __BAUD) & 0x0F))


/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
static __IO uint32_t uwTimingDelay;
RCC_ClocksTypeDef    RCC_Clocks;


RCC_ClocksTypeDef RCC_ClockFreq;

uint8_t gDATABUF[DATA_BUF_SIZE];
///////////////////////////////////
// Default Network Configuration //
///////////////////////////////////
wiz_NetInfo gWIZNETINFO = {{0x00 0x08 0xdc 0x00 0xab 0xcd}
{192 168 1 1

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\
     目录           0  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\Application\
     文件        9983  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\Application\loopback.c
     文件         497  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\Application\loopback.h
     目录           0  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\Ethernet\
     目录           0  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\Ethernet\W5200\
     文件       10483  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\Ethernet\W5200\w5200.c
     文件       78776  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\Ethernet\W5200\w5200.h
     目录           0  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\Ethernet\W5500\
     文件       13201  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\Ethernet\W5500\w5500.c
     文件       78826  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\Ethernet\W5500\w5500.h
     文件       19610  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\Ethernet\socket.c
     文件       26897  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\Ethernet\socket.h
     文件       18344  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\Ethernet\wizchip_conf.c
     文件       21468  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\Ethernet\wizchip_conf.h
     目录           0  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\MDK-ARM\
     文件       94712  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\MDK-ARM\Project.uvgui.James YS Kim
     文件       95166  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\MDK-ARM\Project.uvguix.James YS Kim
     文件       31027  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\MDK-ARM\Project.uvopt
     文件       31301  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\MDK-ARM\Project.uvoptx
     文件       55109  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\MDK-ARM\Project.uvproj.saved_uv4
     文件       55173  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\MDK-ARM\Project.uvprojx
     文件      131148  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\MDK-ARM\Project_STM324x7I_EVAL.dep
     文件      112270  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\MDK-ARM\Project_STM324xG_EVAL.dep
     目录           0  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\MDK-ARM\STM324xG_EVAL\
     文件      114083  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\MDK-ARM\STM324xG_EVAL\Project_STM324xG_EVAL.dep
     文件      577888  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\MDK-ARM\STM324xG_EVAL\STM32F401_Test.axf
     文件       21852  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\MDK-ARM\STM324xG_EVAL\STM32F401_Test.bin
     文件        5522  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\MDK-ARM\STM324xG_EVAL\STM32F401_Test.build_log.htm
     文件       60144  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\MDK-ARM\STM324xG_EVAL\STM32F401_Test.hex
     文件      124467  2015-08-18 08:16  W5500_STM32F4_SPI_DMA-master\MDK-ARM\STM324xG_EVAL\STM32F401_Test.htm
............此处省略136个文件信息

评论

共有 条评论