STM32F407 USART transmit

0

I am doing the programming of a stm32f407 that communicates with a raspberry by usart.

stm32 code:

   while (1)
   {
    HAL_UART_Transmit_IT(&huart2, "hola mundo",10 );
    HAL_Delay(200);
   }

python code in PI:

import serial
ser=serial.Serial(
port='/dev/ttyAMA0',
baudrate= 115200,
parity = serial.PARITY_NONE,
stopbits = serial.STOPBITS_ONE,
bytesize = serial.EIGHTBITS,
timeout=1 
)

while 1:
   x=ser.readline()
   print (x)

stm32 configuration:

usart_t2 (pines-> pa2,pa3)
   reloj externo 8Mhz
   sysclk 168Mhz
   hclk 168Mhz

pi configuration

   uart (pines-> gpio14-gpio15)

The problem is that nothing is read in the pi.

    
asked by Quarkbite 05.06.2018 в 18:24
source

0 answers