desgin
Full Member level 1
Hello All,
I am using STM32F072B - Discovery board.
I am beginner with this board.
Can you please tell me from below code, how to send text from UART1
in Pic18f Micro controller, i was sending this way:
UART2_Write_Text(ch_Data);
but here, by checking reference code - i used
HAL_UART_Transmit(&huart1, (uint8_t*)ch_Data, sizeof(ch_Data), 6);
please help me
Its very urgent!
waiting for reply!
Thanks in advance
I am using STM32F072B - Discovery board.
I am beginner with this board.
Can you please tell me from below code, how to send text from UART1
in Pic18f Micro controller, i was sending this way:
UART2_Write_Text(ch_Data);
but here, by checking reference code - i used
HAL_UART_Transmit(&huart1, (uint8_t*)ch_Data, sizeof(ch_Data), 6);
please help me
Its very urgent!
Code:
//My code------------------------------
char ch_Data[5];
void SystemClock_Config(void);
int main(void)
{
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
MX_CAN_Init();
MX_USART1_UART_Init();
BSP_LED_Init(LED3);
BSP_LED_Init(LED4);
BSP_LED_Init(LED5);
BSP_LED_Init(LED6);
__HAL_RCC_CLEAR_RESET_FLAGS();
MX_IWDG_Init();
while (1)
{
strcat(ch_Data,"D");
strcat(ch_Data,"E");
strcat(ch_Data,"S");
strcat(ch_Data,"G");
strcat(ch_Data,"I");
strcat(ch_Data,"N");
HAL_UART_Transmit(&huart1, (uint8_t*)ch_Data, sizeof(ch_Data), 6);
HAL_Delay(100);
WWDG_Feed();
BSP_LED_Toggle(LED3);
HAL_Delay(100);
BSP_LED_Toggle(LED4);
HAL_Delay(100);
}
}
//-------------------------------------------------------------------------
waiting for reply!
Thanks in advance
Last edited by a moderator: