ECOM COMM=7 error - Number of bits per character is unsupported

Hello,

I’m trying to establish a serial connection with 7 data bits using the ecom.reader sample on STM32F7508-DK.

I modified the connection string with bitsperchar=7 instead of bitsperchar=8. I’m now getting the following error:

Exception in thread "main" java.io.IOException: ECOM-COMM:E=7 7
     at java.lang.System.getStackTrace(Unknown Source)
     at java.lang.Throwable.fillInStackTrace(Throwable.java:82)
     at java.lang.Throwable.<init>(Throwable.java:37)
     at java.lang.Exception.<init>(Exception.java:18)
     at java.io.IOException.<init>(IOException.java:18)
     at ej.ecom.connection.comm.CommConnectionCreator.open(CommConnectionCreator.java:302)
     at ej.ecom.connection.comm.ConnectionFactory.open(ConnectionFactory.java:24)
     at ej.ecom.io.Connector.open(Connector.java:81)
     at ej.ecom.io.Connector.open(Connector.java:47)
     at com.microej.example.foundation.ecom.AbstractCommTest.openConnection(AbstractCommTest.java:25)
     at com.microej.example.foundation.ecom.uartreader.ExampleUARTReader.launch(ExampleUARTReader.java:51)
     at com.microej.example.foundation.ecom.uartreader.ExampleUARTReader.main(ExampleUARTReader.java:41)
     at java.lang.MainThread.run(Thread.java:855)
     at java.lang.Thread.runWrapper(Thread.java:464)

The documentation explains that this number of bits per character is unsupported: ECOM Comm — MicroEJ Documentation

Is there a way to support it?

Regards,

Fabrice

Hi Fabrice,

The values supported for the different parameters of the serial communication (baudrate, bitsperchar, parity & stopbits) depends on the backend implementation.
You can check the LLCOMM_BUFFERED_CONNECTION_IMPL_configureDevice() function provided by your VEE Port.

Best regards,
Rémy

Hi Rémy,

That’s right, after checking the VEE Port sources, I can see that the implementation is not done for 7 data bits: VEEPort-STMicroelectronics-STM32F7508-DK/stm32f7508_freertos-bsp/projects/microej/comm/src/LLCOMM_UART.c at cc38befe38ba343ea20ec6dd52332adc4ffa4c74 · MicroEJ/VEEPort-STMicroelectronics-STM32F7508-DK · GitHub

I will update my implementation to support it.

Thanks for the help!

Fabrice

1 Like