ChibiOS 18.2 STM32H743-SerialDriver Topic is solved
Posted: Tue Jan 29, 2019 4:24 pm
Hi,
I changed the RT-STM32H743I-NUCLEO144 example project for STM32H7 in order to use more then one SerialPort, I decided to use UART7(SD7) and UART4(SD4). I made enabled them in halconf.h maped pin contected to UARTs
and send Strings through using sdWrite() function
I got strange output, becuase the Strings from one serialDriver shows paritly in second one output, givie for example: "UAUART7" in console. I know that the sizes of strings and declared in sdWrite are not the same, but shouldn't they work indepently or the data buffor is conected?
Morover after first launch there was an error in hal_serial_lld.h saying that STM32_UART4CLK and STM32_UART7CLK was undeclared but in hal_lld.h there was a similiar declarations STM32_USART4CLK STM32_USART7CLK and after chaning it the errors disapper, so I belivie is just a spelling mistake.
Regards
Damian
I changed the RT-STM32H743I-NUCLEO144 example project for STM32H7 in order to use more then one SerialPort, I decided to use UART7(SD7) and UART4(SD4). I made enabled them in halconf.h maped pin contected to UARTs
Code: Select all
//UART4
palSetPadMode(GPIOD, GPIOD_ZIO_D67, PAL_MODE_ALTERNATE(8));
palSetPadMode(GPIOD, GPIOD_ZIO_D66, PAL_MODE_ALTERNATE(8));
sdStart(&SD4, NULL);
//UART7
palSetPadMode(GPIOF, GPIOF_PIN6, PAL_MODE_ALTERNATE(7));
palSetPadMode(GPIOF, GPIOF_ZIO_D62, PAL_MODE_ALTERNATE(7));
sdStart(&SD7, NULL);
and send Strings through using sdWrite() function
Code: Select all
static THD_FUNCTION(Thread3, arg) {
(void)arg;
chRegSetThreadName("UART4andUART7");
while (true) {
sdWrite(&SD7, "UART7\n", 10);
chThdSleepMilliseconds(80);
sdWrite(&SD4, "UART4\n", 10);
chThdSleepMilliseconds(70);
}
}
I got strange output, becuase the Strings from one serialDriver shows paritly in second one output, givie for example: "UAUART7" in console. I know that the sizes of strings and declared in sdWrite are not the same, but shouldn't they work indepently or the data buffor is conected?
Morover after first launch there was an error in hal_serial_lld.h saying that STM32_UART4CLK and STM32_UART7CLK was undeclared but in hal_lld.h there was a similiar declarations STM32_USART4CLK STM32_USART7CLK and after chaning it the errors disapper, so I belivie is just a spelling mistake.
Regards
Damian