[STM32H7]

STM32H7 环境安装与DEMO测试

[复制链接]
634|11
手机看帖
扫描二维码
随时随地手机跟帖
昱枫|  楼主 | 2020-10-22 20:22 | 显示全部楼层 |阅读模式


最近收到一块STM32H7A3 NUCLEO

安装MDK 的支持库,下载stm32cubeh7工程实例

1. MDK 支持包下载
keil 支持包
https://keilpack.azureedge.net/pack/Keil.STM32H7xx_DFP.2.6.0.pack

这个下载好费劲,网络特慢,下了第6次才下载完成,下次有空放在百度云上

stm32cubeh7 库以及demo
https://www.st.com/zh/embedded-software/stm32cubeh7.html


环境安装完成



简单的修改工程,LED1 亮状态,LED2 1s钟闪烁一次
[code]int main(void)
{
  /* This sample code shows how to use GPIO HAL API to toggle LED1 and LED2 IOs
    in an infinite loop. */

  /* STM32H7xx HAL library initialization:
       - Systick timer is configured by default as source of time base, but user
         can eventually implement his proper time base source (a general purpose
         timer for example or other time source), keeping in mind that Time base
         duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and
         handled in milliseconds basis.
       - Set NVIC Group Priority to 4
       - Low Level Initialization
     */
  HAL_Init();

  /* Configure the system clock to 280 MHz */
  SystemClock_Config();
  
  /* -1- Enable GPIO Clock (to be able to program the configuration registers) */
  LED1_GPIO_CLK_ENABLE();
  LED2_GPIO_CLK_ENABLE();

  /* -2- Configure IO in output push-pull mode to drive external LEDs */
  GPIO_InitStruct.Mode  = GPIO_MODE_OUTPUT_PP;
  GPIO_InitStruct.Pull  = GPIO_PULLUP;
  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;

  GPIO_InitStruct.Pin = LED1_PIN;
  HAL_GPIO_Init(LED1_GPIO_PORT, &GPIO_InitStruct);
  GPIO_InitStruct.Pin = LED2_PIN;
  HAL_GPIO_Init(LED2_GPIO_PORT, &GPIO_InitStruct);
        //HAL_GPIO_TogglePin(LED1_GPIO_PORT, LED1_PIN);
        HAL_GPIO_WritePin(LED1_GPIO_PORT, LED1_PIN,GPIO_PIN_SET);
       
  /* -3- Toggle IO in an infinite loop */
  while (1)
  {
   
    HAL_GPIO_TogglePin(LED2_GPIO_PORT, LED2_PIN);
    /* Insert delay 100 ms */
    HAL_Delay(1000);
  }
}



371745f91793e21408.png


使用特权

评论回复
yljon| | 2020-10-22 21:17 | 显示全部楼层
板子怎么撸到滴

使用特权

评论回复
评论
香水城 2020-10-23 09:32 回复TA
@昱枫 :牛! 分享下经验啊 
昱枫 2020-10-22 21:56 回复TA
收到3块了 
香水城| | 2020-10-23 09:35 | 显示全部楼层
其实 STM32CubeIDE 也挺好的,你可以试试。

关键还是免费的。

使用特权

评论回复
xxdcq| | 2020-10-23 10:16 | 显示全部楼层
我也费了好多劲才把开发环境建立起来

使用特权

评论回复
不爱说话| | 2020-10-23 17:14 | 显示全部楼层
点灯的开箱视频和帖子太多了。

使用特权

评论回复
评论
昱枫 2020-10-23 19:56 回复TA
最近收到的板子太多,都有交报告,没的法,得分时开发 
isageko| | 2020-10-23 22:42 | 显示全部楼层
MDK是官网没有吗 板子是个好板子

使用特权

评论回复
远芳侵古道| | 2020-10-23 23:58 | 显示全部楼层
STM32CubeIDE在哪里找??免费的吗?@香水城

使用特权

评论回复
hjl2832| | 2020-10-24 10:00 | 显示全部楼层
我也在活动中获得了一块,找个时间也试试,写个心得贴上来。现在在考虑做一个MIPI转RGB的转接板,手上有7寸的RGB电容屏,然后前段时间有幸获得了电堂送的MP157的开发板,想试试TFT这块的功能(MP157的接口是MIPI,没有RGB)。

使用特权

评论回复
昱枫|  楼主 | 2020-10-24 20:11 | 显示全部楼层
hjl2832 发表于 2020-10-24 10:00
我也在活动中获得了一块,找个时间也试试,写个心得贴上来。现在在考虑做一个MIPI转RGB的转接板,手上有7寸 ...

还有送157啊,啥互动

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

53

主题

674

帖子

4

粉丝