This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

virtual com port using stm32l053r8 cube libaries in keil (via USB to virtual com port)

how to display a string from stm32l053r8 nucleo using cube libraries in keilv5 (via USB to virtual com port)
****************************************
code:

if( HAL_ADC_Start(&hadc) != HAL_OK) return 0; if (HAL_ADC_Start_DMA(&hadc, (uint32_t*)ADC1ConvertedValues, 2048) != HAL_OK) // return 0; temp=HAL_ADC_GetValue ( &hadc );

need to display the temp value through usb in virtual com port (teraterm)

Parents
  • Configure the USART and pins, PA2 and PA3 on the Nucleo's as I recall. Check the manual for the pins and USART# specific to the L0 part.

    If you want to use printf(), then you'll need to add semi-hosting code to redirect/retarget the STDIO input and output functions to code you provide that talks to the USART.

    if you can use sprintf(), you can create a string, and then add routines to send the string a character at a time out the USART.

Reply
  • Configure the USART and pins, PA2 and PA3 on the Nucleo's as I recall. Check the manual for the pins and USART# specific to the L0 part.

    If you want to use printf(), then you'll need to add semi-hosting code to redirect/retarget the STDIO input and output functions to code you provide that talks to the USART.

    if you can use sprintf(), you can create a string, and then add routines to send the string a character at a time out the USART.

Children