打印
[其他ST产品]

样板STM32G431评测

[复制链接]
507|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
当看到这个活动,很激动,并积极参加了,也期待到手之后学习学习,到了NUCLEO-G431RB评估板之后,就网上找找芯片资料.果然STM32资料丰富,以前玩8位-16位单片机比较多,这次捣鼓了一段时间,也问了下学长们。板子引出了很多接口,可以用杜邦线拓展很多测试模块,整体布局非常合理美观,看着舒服,板子标识很详细,看着图纸基本能找到相对应的参数,跳帽接口也很灵活,这个板还有很多要学习,继续加油吧。
/* Reset of all
peripherals, Initializes the Flashinterface and the Systick. */
  HAL_Init();
  /* Configure thesystem clock */
SystemClock_Config();
  /* Initialize allconfigured peripherals */
  /* USER CODEBEGIN 2 */
  /* -1- InitializeLEDs mounted on NUCLEO-G431RB RevC board */
BSP_LED_Init(LED2);
  /* -2- ConfigureExternal line 13 (connected to PC.13 pin) in interrupt mode */
  EXTI15_10_IRQHandler_Config();
  /* Infinite loop*/
  /* USER CODEBEGIN WHILE */
  while (1)
  {
  }
static void EXTI15_10_IRQHandler_Config(void)
{
GPIO_InitTypeDef  GPIO_InitStructure;
  /* Enable GPIOCclock */
__HAL_RCC_GPIOC_CLK_ENABLE();
  /* ConfigurePC.13 pin as input floating */
GPIO_InitStructure.Mode = GPIO_MODE_IT_FALLING;
GPIO_InitStructure.Pull = GPIO_NOPULL;
GPIO_InitStructure.Pin = USER_BUTTON_PIN;
HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);
  /* Enable and setlines 10 to 15 Interrupt to the lowest priority */
HAL_NVIC_SetPriority(EXTI15_10_IRQn, 2, 0);
HAL_NVIC_EnableIRQ(EXTI15_10_IRQn);
}
voidHAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
  if (GPIO_Pin == USER_BUTTON_PIN)
  {
    /* Toggle LED2 */
    BSP_LED_Toggle(LED2);
  }



使用特权

评论回复
沙发
kyzhd| | 2020-9-26 18:27 | 只看该作者
什么时候的活动?

使用特权

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

本版积分规则

6

主题

253

帖子

2

粉丝