Here’s the solution for this error message
zephyr/drivers/serial/uart_nrfx_uarte.c:2087:6:
error: 'const struct uarte_nrfx_config' has no member named 'timer'
2087 | (.timer = NRFX_TIMER_INSTANCE( \
| ^~~~~
Modbus uses an interrupt approach. However, LTE serial communication is not using interrupts.
It is necessary to set UART0 not to use interrupts.
So to the existing Modbus configuration options in prj.conf
file:
CONFIG_MODBUS_ROLE_CLIENT=y
CONFIG_MODBUS=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_LINE_CTRL=n
CONFIG_UART_SC16IS7XX=y
You need to add this line:
CONFIG_UART_0_INTERRUPT_DRIVEN=n
It looks like adding the line ‘CONFIG_UART_0_INTERRUPT_DRIVEN=n’ no longer works with LTE v2.
Below is the error message I’m getting:
warning: UART_1_NRF_HW_ASYNC (defined at drivers/serial/Kconfig.nrfx:151) has direct dependencies UART_1_ASYNC && HAS_HW_NRF_UARTE1 && UART_NRFX && SERIAL with value n, but is currently being y-selected by the following symbols:
- CTR_LRW_IF (defined at /home/chester/skeleton/chester/drivers/ctr_lrw_if/Kconfig:7), with value y, direct dependencies DT_HAS_HARDWARIO_CTR_LRW_IF_ENABLED (value: y), and select condition DT_HAS_HARDWARIO_CTR_LRW_IF_ENABLED (value: y)
error: Aborting due to Kconfig warnings
CMake Error at /home/chester/skeleton/zephyr/cmake/modules/kconfig.cmake:348 (message):
command failed with return code: 1
Call Stack (most recent call first):
/home/chester/skeleton/nrf/cmake/modules/kconfig.cmake:29 (include)
/home/chester/skeleton/zephyr/cmake/modules/zephyr_default.cmake:129 (include)
/home/chester/skeleton/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
/home/chester/skeleton/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:13 (find_package)
This is the Modbus configuration I used with LTEv1, but it won’t compile with LTEv2 unless I comment out the ‘CONFIG_UART_INTERRUPT_DRIVEN=y’ line:
CONFIG_GPIO=y
CONFIG_MODBUS_BUFFER_SIZE=128
CONFIG_MODBUS_ROLE_SERVER=y
CONFIG_MODBUS_LOG_LEVEL_WRN=y
CONFIG_MODBUS_FP_EXTENSIONS=n
CONFIG_MODBUS=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_0_INTERRUPT_DRIVEN=n
CONFIG_UART_LINE_CTRL=n
CONFIG_UART_SC16IS7XX=y
Please help!
Best,
David
Hi David,
lately we have extended LTEv2 CHESTER Control catalog application with X2 modbus shield and I was told that there weren’t any issues regarding UART interrupt configuration in prj.conf.
From the logs, it seems like the LoRa could be enabled? Is it necessary, can you try to completely get rid of the lora in the project? Looks like CTR_LRW_IF
means it is enabled.
Or maybe, LRW is using UART1, try CONFIG_UART_1_INTERRUPT_DRIVEN=n
If you don’t succeed, I will look at it in more detail and test it in the project.
Thanks, Martin! I’ve already disabled the LRW, but adding CONFIG_UART_1_INTERRUPT_DRIVEN=n
allowed me to compile without errors. I haven’t tested it yet, but it looks promising!
Best,
David