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

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 1850|回復: 0
收起左側

STM32F407ZET6串口調(diào)試程序

[復制鏈接]
ID:721429 發(fā)表于 2020-4-3 09:13 | 顯示全部樓層 |閱讀模式
使用到了串口123,并且可以和HC-05藍牙模塊進行通信,發(fā)送/接收數(shù)據(jù)

單片機源程序如下:
  1. /* Includes ------------------------------------------------------------------*/
  2. #include "main.h"
  3. #include "stm32f4xx.h"
  4. #include "USART.h"
  5. #include "usart3.h"

  6. /** @addtogroup Template_Project
  7.   * @{
  8.   */

  9. /* Private typedef -----------------------------------------------------------*/
  10. /* Private define ------------------------------------------------------------*/
  11. /* Private macro -------------------------------------------------------------*/
  12. /* Private variables ---------------------------------------------------------*/
  13. static __IO uint32_t uwTimingDelay;
  14. RCC_ClocksTypeDef RCC_Clocks;

  15. /* Private function prototypes -----------------------------------------------*/
  16. static void Delay(__IO uint32_t nTime);

  17. /* Private functions ---------------------------------------------------------*/

  18. /**
  19.   * @brief  Main program
  20.   * @param  None
  21.   * @retval None
  22.   */
  23. int main(void)
  24. {
  25.   
  26.   char str3[] = "hahahahaha\r\n";
  27.    /*設置Systick為ms級*/
  28.   SysTick_Config(SystemCoreClock/1000-1);
  29.           
  30.    /*設置中斷優(yōu)先級占比*/
  31.   NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
  32.           


  33.     /*配置調(diào)試串口*/
  34.    gec_debug(115200);
  35.    usart3_init(9600);

  36.   while (1)
  37.   {       
  38.     usart3_send_string(str3);
  39.                  
  40.   }
  41.    
  42. }

  43. /**
  44.   * @brief  Inserts a delay time.
  45.   * @param  nTime: specifies the delay time length, in milliseconds.
  46.   * @retval None
  47.   */
  48. void Delay(__IO uint32_t nTime)
  49. {
  50.   uwTimingDelay = nTime;

  51.   while(uwTimingDelay != 0);
  52. }

  53. /**
  54.   * @brief  Decrements the TimingDelay variable.
  55.   * @param  None
  56.   * @retval None
  57.   */
  58. void TimingDelay_Decrement(void)
  59. {
  60.   if (uwTimingDelay != 0x00)
  61.   {
  62.     uwTimingDelay--;
  63.   }
  64. }

  65. #ifdef  USE_FULL_ASSERT

  66. /**
  67.   * @brief  Reports the name of the source file and the source line number
  68.   *         where the assert_param error has occurred.
  69.   * @param  file: pointer to the source file name
  70.   * @param  line: assert_param error line source number
  71.   * @retval None
  72.   */
  73. void assert_failed(uint8_t* file, uint32_t line)
  74. {
  75.   /* User can add his own implementation to report the file name and line number,
  76.      ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */

  77.   /* Infinite loop */
  78.   while (1)
  79.   {
  80.   }
  81. }
  82. #endif

  83. /**
  84.   * @}
  85.   */


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

所有資料51hei提供下載:
STM32串口調(diào)試.7z (94.41 KB, 下載次數(shù): 38)




評分

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

查看全部評分

回復

使用道具 舉報

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

本版積分規(guī)則

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

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

快速回復 返回頂部 返回列表
主站蜘蛛池模板: 精久久| 国产精品一二三区 | 久久亚洲二区 | 看毛片网站 | 国产在线对白 | 成人av免费看 | 亚洲国产一区视频 | 亚洲导航深夜福利涩涩屋 | 国产黄色av网站 | 成人h视频在线 | 国产精品久久久久久 | 天天爽夜夜爽精品视频婷婷 | 日本一区高清 | 亚洲精品成人在线 | www.97zyz.com| 国产视频一视频二 | 国产一区久久精品 | 天天天操| 日韩欧美在线观看 | 国产精品一区二区久久久久 | 成年人黄色免费视频 | 欧美精品一二三 | 午夜免费av | 中文字幕在线视频观看 | 亚洲欧美一区二区三区在线 | 国产精品一区二区三 | 欧美日韩中文在线 | 99精品网| 欧美综合久久 | 一a一片一级一片啪啪 | 午夜成人免费视频 | 精品国产成人 | 亚洲第一区久久 | 国产成人在线视频播放 | 亚洲一区二区不卡在线观看 | 综合一区二区三区 | 欧美国产精品 | 日本又色又爽又黄又高潮 | 国产小视频在线看 | 国产精品一区二区久久 | 国产真实精品久久二三区 |