AnsweredAssumed Answered

Question about UART Data Packing

Question asked by yli on Sep 11, 2014
Latest reply on Sep 24, 2014 by Jithul_Janardhanan

Hi,

 

The HW manual says "

The UART provides packed and unpackedmodes of data transfer to and rom the internal memory of the processors. This mode is set using the UARTPACK bit (bit 0) in the UARTMODE register. In unpacked mode, the data word is appended to the left with 24 zeros during transmission or reception. In packed mode, two words of data are transmitted or received with their corresponding higher bytes filledwith zeros. For example, consecutive data words 0xAB and 0xCD are packed as 0x00CD 00AB in the receiver, and 0x00CD 00AB is transmitted as two words of 0xAB and 0xCD successively from the transmitter. Packing is available in both I/O and DMA modes.

"

 

So if UARTPACK = 0

  • in TX, 0x000000AB in memory will go out of UART as 0xAB
  • in RX, 0xAB from UART will arrive at memory as 0x000000AB

and if UARTPACK = 1

  • in TX, 0x00AB in memory will go out of UART as 0xAB
  • in RX, 0xAB from UART will arrive at memory as 0x00AB

 

Is there a way so that

  • in TX, 0xAB in memory will go out of UART as 0xAB
  • in RX, 0xAB from UART will arrive at memory as 0xAB

Outcomes