2016-04-24 10:02 AM
hi
I try to setup serial trough y´the USART1 on stm32f7-discovery using cubemx to make the project.When using usart6 everything works fine but with usart1 trough vcp i can not get it up and running.in my main.c i have only made 3 lines of code ..everything else come from cubemxWha can the problem be ?/* Initialize all configured peripherals */ MX_GPIO_Init(); MX_USART6_UART_Init(); MX_USART1_UART_Init(); /* USER CODE BEGIN 2 */ /* USER CODE END 2 */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) { uint8_t data[20] = ''test \n\r''; HAL_UART_Transmit(&huart6,data,20,1000); HAL_UART_Transmit(&huart1,data,20,1000);2016-04-25 03:41 AM
Hi,
Please try to share your .ioc file and mention which CubeMX version you have used.Regards2016-04-25 09:10 AM
hi
Thanks for looking into this ... cubemx 4.0 and the board are stm32f7g-discovery MB1191B I did only add the 3 lines you see in above post. in my serial program i can see the VCP port but no reaction. Hjalmar ________________ Attachments : uart4.ioc : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hzcu&d=%2Fa%2F0X0000000bOa%2FI44Xn8P2b6Iaj0OlpAyV5DSjst9uTrFChwotsiNZ67E&asPdf=false2016-04-25 09:53 AM
hi
now updated to 4.0 .. only add 3 lines of code nothing changed ...usart6 works very fine but usart1 trough VCP do not SystemClock_Config(); /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_USART1_UART_Init(); MX_USART6_UART_Init(); /* USER CODE BEGIN 2 */ /* USER CODE END 2 */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) { uint8_t data[20] = ''test \n\r''; HAL_UART_Transmit(&huart6,data,20,1000); HAL_UART_Transmit(&huart1,data,20,1000); /* USER CODE END WHILE */ ________________ Attachments : usart1_6_test.ioc : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hzcp&d=%2Fa%2F0X0000000bOb%2FPQA64tUDwvfhZ9V4OwHQNKdibpwWVf8h7A_wEk0yb1c&asPdf=false2016-04-28 10:53 PM
Hi
No more help from ST on this very important issue ...it is a very easy way to transmit data to pc without making ftdi etc ..Hjalmar2016-04-29 04:30 AM
Hi skovholm_hansen.hjal,
Try to select SYSCKL as USART1 clock source and tell me if this resolve the issue ? -Hannibal-2016-05-02 08:30 AM
SUPER ........SOLVED ...
It works like a charm ...But sorry where to find that information ?Can you please pin point out the mage in the manual for the chip ?Just so i can find such answers my self in the future ...Thanks...you make my day ;o)Hjalmar2016-05-10 11:53 AM