uart_configure() returns -134 (ENOTSUP) w/ 7 data bits on nrf52840dk

proj.conf:

CONFIG_GPIO=y
CONFIG_SERIAL=y
CONFIG_UART_ASYNC_API=y

nrf52840dk_nrf52840.overlay:

&pinctrl {
	uart1_default: uart1_default {
	   group1 {
		  psels = <NRF_PSEL(UART_TX, 1, 2)>,
				  <NRF_PSEL(UART_RX, 1, 1)>;
	   };
	};
 };
 
 &uart1 {
   compatible = "nordic,nrf-uarte";
   current-speed = <38400>;
   status = "okay";
   pinctrl-0 = <&uart1_default>;
   pinctrl-names = "default", "sleep";
 };

code:

	const struct uart_config uart_cfg = {
		.baudrate = 38400,
		.parity = UART_CFG_PARITY_NONE,
		.stop_bits = UART_CFG_STOP_BITS_1,
		.data_bits = UART_CFG_DATA_BITS_7,
		.flow_ctrl = UART_CFG_FLOW_CTRL_NONE
	};
	ret = uart_configure(uart, &uart_cfg);

Pretty straightforward.  I've looked through the nRF52840 Product Specification and there is no mention of data bits at all, only parity and stop bits, in the UART configuration section.  Does the nRF52840 only support 8-data bits?

If so, that's pretty crushing as I've invested a lot of time and my product requires 7 data bits.  Are there any other nRF SoC's that support 7 data bit UART?

Related