久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 4637|回復: 2
打印 上一主題 下一主題
收起左側

DP83848與STM32F4進行網絡通信原理圖源程序

[復制鏈接]
跳轉到指定樓層
樓主
DP83848與STM32F4進行網絡通信電路原理圖如下:


單片機源程序如下:
  1. /* Includes ------------------------------------------------------------------*/
  2. #include "stm32f4x7_eth.h"
  3. #include "netconf.h"
  4. #include "main.h"
  5. #include "lwip/tcp.h"
  6. #include "serial_debug.h"
  7. #include "udp_echoclient.h"

  8. /* Private typedef -----------------------------------------------------------*/
  9. /* Private define ------------------------------------------------------------*/
  10. #define SYSTEMTICK_PERIOD_MS  10

  11. /*--------------- LCD Messages ---------------*/
  12. //#if defined (STM32F40XX)
  13. //#define MESSAGE1   "    STM32F40/41x     "
  14. //#elif defined (STM32F427X)
  15. //#define MESSAGE1   "     STM32F427x      "
  16. //#endif
  17. //#define MESSAGE2   "  STM32F-4 Series   "
  18. //#define MESSAGE3   " UDP echoclient Demo"
  19. //#define MESSAGE4   "                    "

  20. /* Private macro -------------------------------------------------------------*/
  21. /* Private variables ---------------------------------------------------------*/
  22. __IO uint32_t LocalTime = 0; /* this variable is used to create a time reference incremented by 10ms */
  23. uint32_t timingdelay;

  24. /* Private function prototypes -----------------------------------------------*/
  25. //void LCD_LED_BUTTON_Init(void);

  26. /* Private functions ---------------------------------------------------------*/

  27. /**
  28.   * @brief  Main program.
  29.   * @param  None
  30.   * @retval None
  31.   */
  32. int main(void)
  33. {
  34.   /*!< At this stage the microcontroller clock setting is already configured to
  35.        168 MHz, this is done through SystemInit() function which is called from
  36.        startup file (startup_stm32f4xx.s) before to branch to application main.
  37.        To reconfigure the default setting of SystemInit() function, refer to
  38.        system_stm32f4xx.c file
  39.      */

  40.   NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4);

  41. //#ifdef SERIAL_DEBUG
  42. //  DebugComPort_Init();
  43. //#endif

  44. //  /*Initialize LCD and Leds */
  45. //  LCD_LED_BUTTON_Init();

  46.   /* Configure ethernet (GPIOs, clocks, MAC, DMA) */
  47.   ETH_BSP_Config();

  48.   /* Initilaize the LwIP stack */
  49.   LwIP_Init();

  50.   /* Infinite loop */
  51.   while (1)
  52.   {  
  53.                
  54.     /* check if any packet received */
  55.     if (ETH_CheckFrameReceived())
  56.     {
  57.       /* process received ethernet packet */
  58.       LwIP_Pkt_Handle();
  59.     }
  60.     /* handle periodic timers for LwIP */
  61.     LwIP_Periodic_Handle(LocalTime);
  62.          udp_echoclient_connect();
  63.   }
  64. }

  65. /**
  66.   * @brief  Inserts a delay time.
  67.   * @param  nCount: number of 10ms periods to wait for.
  68.   * @retval None
  69.   */
  70. void Delay(uint32_t nCount)
  71. {
  72.   /* Capture the current local time */
  73.   timingdelay = LocalTime + nCount;  

  74.   /* wait until the desired delay finish */
  75.   while(timingdelay > LocalTime)
  76.   {     
  77.   }
  78. }

  79. /**
  80.   * @brief  Updates the system local time
  81.   * @param  None
  82.   * @retval None
  83.   */
  84. void Time_Update(void)
  85. {
  86.   LocalTime += SYSTEMTICK_PERIOD_MS;
  87. }

  88. ///**
  89. //  * @brief  Initializes STM324xG-EVAL's LCD, LEDs and push-buttons resources.
  90. //  * @param  None
  91. //  * @retval None
  92. //  */
  93. //void LCD_LED_BUTTON_Init(void)
  94. //{
  95. //#ifdef USE_LCD
  96. //  /* Initialize the STM324xG-EVAL's LCD */
  97. //  STM324xG_LCD_Init();
  98. //#endif

  99. //  /* Initialize STM324xG-EVAL's LEDs */
  100. //  STM_EVAL_LEDInit(LED1);
  101. //  STM_EVAL_LEDInit(LED2);
  102. //  STM_EVAL_LEDInit(LED3);
  103. //  STM_EVAL_LEDInit(LED4);

  104. //  /* Leds on */
  105. //  STM_EVAL_LEDOn(LED1);
  106. //  STM_EVAL_LEDOn(LED2);
  107. //  STM_EVAL_LEDOn(LED3);
  108. //  STM_EVAL_LEDOn(LED4);

  109. //#ifdef USE_LCD
  110. //  /* Clear the LCD */
  111. //  LCD_Clear(Black);

  112. //  /* Set the LCD Back Color */
  113. //  LCD_SetBackColor(Black);

  114. //  /* Set the LCD Text Color */
  115. //  LCD_SetTextColor(White);

  116. //  /* Display message on the LCD*/
  117. //  LCD_DisplayStringLine(Line0, (uint8_t*)MESSAGE1);
  118. //  LCD_DisplayStringLine(Line1, (uint8_t*)MESSAGE2);
  119. //  LCD_DisplayStringLine(Line2, (uint8_t*)MESSAGE3);
  120. //  LCD_DisplayStringLine(Line3, (uint8_t*)MESSAGE4);
  121. //#endif
  122. //  
  123. //  STM_EVAL_PBInit(BUTTON_KEY, BUTTON_MODE_EXTI);
  124. //}

  125. //#ifdef  USE_FULL_ASSERT

  126. ///**
  127. //  * @brief  Reports the name of the source file and the source line number
  128. //  *   where the assert_param error has occurred.
  129. //  * @param  file: pointer to the source file name
  130. //  * @param  line: assert_param error line source number
  131. //  * @retval None
  132. //  */
  133. //void assert_failed(uint8_t* file, uint32_t line)
  134. //{
  135. //  /* User can add his own implementation to report the file name and line number,
  136. //     ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */

  137. //  /* Infinite loop */
  138. //  while (1)
  139. //  {}
  140. //}
  141. //#endif


  142. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
復制代碼

所有資料51hei提供下載:
DP83848-ST(2).7z (1.22 MB, 下載次數: 84)
DP83848C原理圖.pdf (173.89 KB, 下載次數: 66)


評分

參與人數 1黑幣 +50 收起 理由
admin + 50 共享資料的黑幣獎勵!

查看全部評分

分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏1 分享淘帖 頂 踩
回復

使用道具 舉報

沙發
ID:321859 發表于 2020-1-2 09:38 | 只看該作者
看看,謝大佬分享
回復

使用道具 舉報

板凳
ID:699515 發表于 2020-3-3 15:46 | 只看該作者
謝謝分享下載學習啊
回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表
主站蜘蛛池模板: 亚洲一区精品视频 | 亚洲日韩中文字幕一区 | av中文字幕在线观看 | www.一区二区三区.com | 成人a在线 | 91观看| 国产乱码精品1区2区3区 | 精品国产一级 | 婷婷久久综合 | 日韩在线视频一区二区三区 | 日韩欧美国产一区二区三区 | wwwxx在线观看| 欧美精品欧美精品系列 | 亚洲精品乱码久久久久久久久 | 午夜天堂精品久久久久 | 黄色在线观看 | av影音资源| 精品久久一 | 九九99久久 | 亚洲美女视频 | 久久精品一区二区三区四区 | 男人天堂999| 欧美性乱| 国产乱码精品一区二区三区中文 | 亚洲网站在线观看 | 国产日韩久久久久69影院 | 国产精品一区二区久久 | jdav视频在线观看免费 | 中文在线观看视频 | 99av成人精品国语自产拍 | 欧美日韩a | 日韩淫片免费看 | 超碰最新在线 | 国产日韩欧美二区 | 日韩区| 国产精品无码久久久久 | 国产目拍亚洲精品99久久精品 | 欧美精品福利 | 国产a爽一区二区久久久 | 婷婷福利视频导航 | 一本大道久久a久久精二百 国产成人免费在线 |