comparison Discovery/Src/stm32f4xx_hal_msp_hw2.c @ 1036:5865f0aeb438 Puls_Integration

Radio data integration: Added functionality for displaying radio data as debug message. The USART3 has been configurated for receiption and a function for the visualization of the data has been added to the demo unit (draft implementation). For activation the radio as well as the logger functionality needs to be activated via compile switch. Note that at the moment bluetooth and radio DMA may not be operated in parallel.
author Ideenmodellierer
date Sun, 10 Aug 2025 15:28:59 +0200
parents 879709909dd6
children
comparison
equal deleted inserted replaced
1035:5b913cdaa9dc 1036:5865f0aeb438
628 { 628 {
629 /* USER CODE BEGIN USART3_MspInit 0 */ 629 /* USER CODE BEGIN USART3_MspInit 0 */
630 630
631 /* USER CODE END USART3_MspInit 0 */ 631 /* USER CODE END USART3_MspInit 0 */
632 /* Peripheral clock enable */ 632 /* Peripheral clock enable */
633 __USART3_CLK_ENABLE(); 633 USART_RADIO_RX_GPIO_CLK_ENABLE();
634 634
635 /**USART3 GPIO Configuration 635 /**USART3 GPIO Configuration
636 PC10 ------> USART3_TX 636 PB11 ------> USART3_RX
637 PC11 ------> USART3_RX 637 */
638 */ 638 GPIO_InitStruct.Pin = USART_RADIO_RX_PIN;
639 GPIO_InitStruct.Pin = GPIO_PIN_10|GPIO_PIN_11;
640 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 639 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
641 GPIO_InitStruct.Pull = GPIO_PULLUP; 640 GPIO_InitStruct.Pull = GPIO_PULLUP;
642 GPIO_InitStruct.Speed = GPIO_SPEED_LOW; 641 GPIO_InitStruct.Speed = GPIO_SPEED_LOW;
643 GPIO_InitStruct.Alternate = GPIO_AF7_USART3; 642 GPIO_InitStruct.Alternate = USART_RADIO_RX_AF;
644 HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); 643 HAL_GPIO_Init(USART_RADIO_RX_GPIO_PORT, &GPIO_InitStruct);
644
645 HAL_NVIC_SetPriority(USART_RADIO_IRQn, 0, 1);
646 HAL_NVIC_EnableIRQ(USART_RADIO_IRQn);
645 647
646 /* USER CODE BEGIN USART3_MspInit 1 */ 648 /* USER CODE BEGIN USART3_MspInit 1 */
647 649
648 /* USER CODE END USART3_MspInit 1 */ 650 /* USER CODE END USART3_MspInit 1 */
649 } 651 }
704 706
705 /**USART3 GPIO Configuration 707 /**USART3 GPIO Configuration
706 PC10 ------> USART3_TX 708 PC10 ------> USART3_TX
707 PC11 ------> USART3_RX 709 PC11 ------> USART3_RX
708 */ 710 */
709 HAL_GPIO_DeInit(GPIOC, GPIO_PIN_10|GPIO_PIN_11); 711 HAL_GPIO_DeInit(USART_RADIO_RX_GPIO_PORT, USART_RADIO_RX_PIN);
710 712
711 /* USER CODE BEGIN USART3_MspDeInit 1 */ 713 /* USER CODE BEGIN USART3_MspDeInit 1 */
712 714
713 /* USER CODE END USART3_MspDeInit 1 */ 715 /* USER CODE END USART3_MspDeInit 1 */
714 } 716 }