Skip to content

hawyar/STM32L4-HAL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blink LED:

void Blink(uint32_t delay);

Blink with a 500ms delay

Blink(500);

Transmit Data

void UART_Transmit(UART_HandleTypeDef *huart, uint8_t *data, uint16_t size);

Set USART1 to Asynchronous mode with:

  • Baud Rate: 115200
  • Data Bits: 8 (including parity)

Connect to the serial port with the set baud rate.

screen /dev/tty.usbmodem114203 115200

Now send data and the text should appear on the terminal.

uint8_t data[] = "Ping!\r\n";
UART_Transmit(&huart1, data, sizeof(data));

Note:

  • Add the -u _printf_float flag to the GCC linker.

About

HAL for STM32 B-L475E-IOT01A

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published