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

 找回密碼
 立即注冊(cè)

QQ登錄

只需一步,快速開始

搜索
查看: 4541|回復(fù): 2
打印 上一主題 下一主題
收起左側(cè)

DP83848與STM32F4進(jìn)行網(wǎng)絡(luò)通信原理圖源程序

[復(fù)制鏈接]
跳轉(zhuǎn)到指定樓層
樓主
ID:587294 發(fā)表于 2019-10-12 15:18 | 只看該作者 |只看大圖 回帖獎(jiǎng)勵(lì) |倒序?yàn)g覽 |閱讀模式
DP83848與STM32F4進(jìn)行網(wǎng)絡(luò)通信電路原理圖如下:


單片機(jī)源程序如下:
  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****/
復(fù)制代碼

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


評(píng)分

參與人數(shù) 1黑幣 +50 收起 理由
admin + 50 共享資料的黑幣獎(jiǎng)勵(lì)!

查看全部評(píng)分

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

使用道具 舉報(bào)

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

使用道具 舉報(bào)

板凳
ID:699515 發(fā)表于 2020-3-3 15:46 | 只看該作者
謝謝分享下載學(xué)習(xí)啊
回復(fù)

使用道具 舉報(bào)

本版積分規(guī)則

手機(jī)版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術(shù)交流QQ群281945664

Powered by 單片機(jī)教程網(wǎng)

快速回復(fù) 返回頂部 返回列表
主站蜘蛛池模板: 欧美精品一二三区 | 成人毛片视频免费 | 国产福利在线免费观看 | 精品一区二区三区在线观看国产 | 雨宫琴音一区二区在线 | 日韩视频在线一区 | 亚洲国产精品成人无久久精品 | 97久久久久久久久 | www.99re| 欧美一级视频免费看 | 久久国产一区二区三区 | 天堂在线中文字幕 | 国产一区2区 | 麻豆av在线免费观看 | 狠狠操狠狠操 | 一区二区三区视频 | 久久6视频 | 丁香久久 | 国产精品视频一区二区三区四蜜臂 | 欧美三级视频在线观看 | 久久亚洲一区 | 国产精品久久久久久一级毛片 | 国产日韩精品一区二区 | 亚洲高清在线播放 | 亚洲图片一区二区三区 | 99re视频在线观看 | 国产精品久久久久无码av | 成人av免费| 国产99久久精品一区二区永久免费 | 欧美性一级 | 瑞克和莫蒂第五季在线观看 | 91久久| 欧美午夜精品理论片a级按摩 | 久久99精品久久久久久噜噜 | 亚洲精品www | 日本激情视频在线播放 | 99re热精品视频 | 97精品一区二区 | h在线免费观看 | 日韩综合色| 国产区一区二区三区 |