0

I am writing a UART communication protocol using an STM32F429-ZI Nucleo Board. I connected my board to my computer using a USB and also hooked up a logic analyzer to check what data is being sent. Looking a the logic analyzer results, the parity bits for inputted characters are all 0 when set to check for odd parity and all 1 when set to check for even parity. What could be causing this?

This is my initialization code for the STM32 board.

  UartHandle.Instance        = USARTx;

  UartHandle.Init.BaudRate   = 9600;
  UartHandle.Init.WordLength = UART_WORDLENGTH_8B;
  UartHandle.Init.StopBits   = UART_STOPBITS_1;
  UartHandle.Init.Parity     = UART_PARITY_ODD;
  UartHandle.Init.HwFlowCtl  = UART_HWCONTROL_NONE;
  UartHandle.Init.Mode       = UART_MODE_TX_RX;
  UartHandle.Init.OverSampling = UART_OVERSAMPLING_16;
  • not enough bits – 0___________ Jun 10 '20 at 21:47
  • What are you transmitting? Are you transmitting a-z or only a single character? What is your test code and how many bits do you see on your logic analyzer for every character? – Tarick Welling Jun 11 '20 at 10:21
  • I am transmitting keyboard input. So far I've only tried sending a-z characters. I don't know what you mean by test code, the logic analyzer is hooked up to my board directly. The analyzer shows one parity bit and eight additional bits for the character – Julia Lindell Jun 11 '20 at 14:08

0 Answers0