No software support for UARTE various data bits lenghts

I am developing a modbus server application for nrf54L15 in nrf sdk v3.2.3. But I ran into an issue where using MODBUS_MODE_ASCII requires UART_CFG_DATA_BITS_7. The modbus library tries to use seven databits for the ascii mode, but when configuring the serial, it fails due to the serial library rejecting any other data bits length than eight.

This is being set in modbus_serial.c:

if (ctx->mode == MODBUS_MODE_ASCII) {
	uart_cfg.data_bits = UART_CFG_DATA_BITS_7;
} else {
	uart_cfg.data_bits = UART_CFG_DATA_BITS_8;
}

and the problem is in uart_nrfx_uarte.c:

if (cfg->data_bits != UART_CFG_DATA_BITS_8) {
	return -ENOTSUP;
}

But to my understanding, nrf45L15 should support various data bit lengths, according to the datasheet (8.25.5 Data frame size):

"UARTE implements a configurable data frame size of 4 bits to 9 bits"

So is there really no software support for the new hardware or am I doing something wrong?

Parents Reply
  • Hello FedericaMayorga,

    I tried to comment it out, not only that, I also change other parameters in the sdk code, because the condition is just a hard stop, but removing it does not change the frame size.

    #if NRF_UARTE_HAS_FRAME_SIZE
    	uarte_cfg.frame_size = NRF_UARTE_FRAME_SIZE_8_BIT;
    	uarte_cfg.endian = NRF_UARTE_ENDIAN_MSB;
    #endif

    But nothing I tried worked.
    Also, I feel like changing the SDK libraries is not really a long-term solution, and I was hoping to get a statement from the Nordic developer team regarding this issue.

Children
Related