Stm32g0xx_hal_uart.h를 따라가면 아래와 같이 먼가 있긴 하다.(귀찮아..)
#define UART_ADVFEATURE_NO_INIT 0x00000000U /*!< No advanced feature initialization */ #define UART_ADVFEATURE_TXINVERT_INIT 0x00000001U /*!< TX pin active level inversion */ #define UART_ADVFEATURE_RXINVERT_INIT 0x00000002U /*!< RX pin active level inversion */ #define UART_ADVFEATURE_DATAINVERT_INIT 0x00000004U /*!< Binary data inversion */ #define UART_ADVFEATURE_SWAP_INIT 0x00000008U /*!< TX/RX pins swap */ #define UART_ADVFEATURE_RXOVERRUNDISABLE_INIT 0x00000010U /*!< RX overrun disable */ #define UART_ADVFEATURE_DMADISABLEONERROR_INIT 0x00000020U /*!< DMA disable on Reception Error */ #define UART_ADVFEATURE_AUTOBAUDRATE_INIT 0x00000040U /*!< Auto Baud rate detection initialization */ #define UART_ADVFEATURE_MSBFIRST_INIT 0x00000080U /*!< Most significant bit sent/received first */
#define USART_CR2_MSBFIRST_Pos (19U) #define USART_CR2_MSBFIRST_Msk (0x1UL << USART_CR2_MSBFIRST_Pos) /*!< 0x00080000 */ #define USART_CR2_MSBFIRST USART_CR2_MSBFIRST_Msk /*!< Most Significant Bit First */
#define UART_ADVFEATURE_MSBFIRST_DISABLE 0x00000000U /*!< Most significant bit sent/received first disable */ #define UART_ADVFEATURE_MSBFIRST_ENABLE USART_CR2_MSBFIRST /*!< Most significant bit sent/received first enable */
The USART can also communicate synchronously. It can operate as a SPI in Master or Slave mode with programmable clock polarity (CPOL) and phase (CPHA) and programmable data order with MSB or LSB first. The clock is output (in case of Master mode) or input (in case of Slave mode) on the CK pin. No clock pulses are provided during the start and stop bits. When the USART is configured in SPI slave mode, it supports the Transmit underrun error and the NSS hardware or software management.
(그런데.. 진짜 데이터가 111110 이면 어떡해야 하지? 어짜피 5개가 되었으니 1111100이 되는건가?)
Because a flag sequence consists of six consecutive 1-bits, other data is coded to ensure that it never contains more than five 1-bits in a row. This is done bybit stuffing: any time that five consecutive 1-bits appear in the transmitted data, the data is paused and a 0-bit is transmitted.
HDLC transmits bytes of data with the least significant bit first (not to be confused withlittle-endianorder, which refers to byte ordering within a multi-byte field).
TheNRZIcoding scheme transmits a 0 bit as a signal transition, and a 1 bit as no change. In this case, bit stuffing is most easily described as the insertion of a 0 bit after a long run of 1 bits.
$ minicom --help Usage: minicom [OPTION]... [configuration] A terminal program for Linux and other unix-like systems.
-b, --baudrate : set baudrate (ignore the value from config) -D, --device : set device name (ignore the value from config) -s, --setup : enter setup mode -o, --noinit : do not initialize modem & lockfiles at startup -m, --metakey : use meta or alt key for commands -M, --metakey8 : use 8bit meta key for commands -l, --ansi : literal; assume screen uses non IBM-PC character set -L, --iso : don't assume screen uses ISO8859 -w, --wrap : Linewrap on -H, --displayhex : display output in hex -z, --statline : try to use terminal's status line -7, --7bit : force 7bit mode -8, --8bit : force 8bit mode -c, --color=on/off : ANSI style color usage on or off -a, --attrib=on/off : use reverse or highlight attributes on or off -t, --term=TERM : override TERM environment variable -S, --script=SCRIPT : run SCRIPT at startup -d, --dial=ENTRY : dial ENTRY from the dialing directory -p, --ptty=TTYP : connect to pseudo terminal -C, --capturefile=FILE : start capturing to FILE -F, --statlinefmt : format of status line -R, --remotecharset : character set of communication partner -v, --version : output version information and exit -h, --help : show help configuration : configuration file to use
These options can also be specified in the MINICOM environment variable. This variable is currently unset. The configuration directory for the access file and the configurations is compiled to /etc/minicom.
Report bugs to <minicom-devel@lists.alioth.debian.org>.