I was able to start linuxcnc with the pktgyro component loaded, everything seems to be fine. But while the machine is running I am getting an error:
hm2: hm2_7i76e.0.pktuart.0: Overrun error, no stop bit
From what I was able to gather, the error has errno 111 (defined in /src/hal/drivers/mesa-hostmot2/pktuart_errno.h):
#define HM2_PKTUART_RxOverrunError (111) // Overrun error (no stop bit when expected) (sticky), Bit 1
I think it may be caused by wrong bit mask "rtapi_s32 rx_mode" of the hm2_pktuart_setup function (
linuxcnc.org/docs/2.8/html/man/man3/hm2_pktuart_setup.3hm2.html
):
int hm2_pktuart_setup(char *name, int bitrate, rtapi_s32 tx_mode, rtapi_s32 rx_mode, int txclear, int rxclear)
If I am on the right path, bit 1 of the rx_mode bit mask should be the problem. According to the manual:
Bit 1 : Overrun error (no stop bit when expected) (sticky)
I am not sure if I got it right: When the bit 1 of the rx_mode bit mask is set to 1, the stop bit is expected or vice versa?
I also could not find whether the bit 0 of the bit mask is the MSB or LSB.
Thank you guys.