Commit Graph

64 Commits

Author SHA1 Message Date
aleks
bc1f50dc0f freemodbus: fix rts enable fail when transmit frame 2022-11-09 02:31:15 +00:00
aleks
baa0aad20e freemodbus: fix modbus rs485 rts enable fail v42 2022-11-09 02:31:15 +00:00
aleks
f11e17f886 freemodbus: fix port enable disable sequence for tcp master and slave 2022-03-08 09:40:08 +01:00
aleks
106fcdcc1c modbus: fix tcp slave destroy issues
Closes https://github.com/espressif/esp-idf/issues/8211
2022-03-08 09:30:59 +01:00
Alex Lisitsyn
073da59d27 freemodbus: allow address gaps in master data dictionary (support of UID field in MBAP) (backport v4.3) 2022-02-18 05:40:49 +00:00
aleks
9204605d98 freemodbus: fix port contains lgpl licensed files
Initial version of freemodbus master port files have been added to ESP-IDF based on https://github.com/armink/FreeModbus_Slave-Master-RTT-STM32.
The overall repository license, at the time of adding these files, has been BSD 3-clause. However at that time, several port files carried LGPL license headers. As the author of these files confirmed in https://github.com/armink/FreeModbus_Slave-Master-RTT-STM32/issues/61#issuecomment-977828450, this wasn't intentional. ESP-IDF version of modbus master port has been rewritten to target FreeRTOS instead of RT-Thread, but the license headers remained from the original version. This commit corrects this, replacing the license of these files with BSD 3-clause.
2021-11-29 14:15:23 +01:00
aleks
158384043d freemodbus: fix invalid error handling for duplicate param_key 2021-11-25 01:16:10 +08:00
Michael (XIAO Xufeng)
48997e82c0 Merge branch 'bugfix/modbus_fix_compiler_err_when_tcp_is_disabled_v43' into 'release/v4.3'
freemodbus: fix compiler err when tcp is disabled (backport v4.3)

See merge request espressif/esp-idf!14789
2021-11-24 14:13:04 +00:00
Alex Lisitsyn
de7f5305a7 freemodbus: fix compiler err when tcp is disabled (backport v4.3) 2021-11-24 14:13:03 +00:00
Alex Lisitsyn
4f716817e0 freemodbus: fix issues when modbus master and slave work simultaneously (backport v4.3) 2021-10-28 03:08:12 +00:00
Michael (XIAO Xufeng)
43d2a6eeed Merge branch 'bugfix/modbus_add_task_affinity_and_callbacks_v43' into 'release/v4.3'
freemodbus: add affinity option for modbus stack tasks (backport v4.3)

See merge request espressif/esp-idf!14540
2021-10-19 04:11:51 +00:00
aleks
5b52358092 freemodbus: check/fix reinitialization issues (tcp master and slave examples) 2021-10-15 16:50:33 +08:00
aleks
33fe673e85 freemodbus: add affinity option for modbus stack tasks 2021-10-12 17:38:39 +08:00
Alex Lisitsyn
86b7acc932 Merge branch 'bugfix/freemodbus_change_max_task_prio_v43' into 'release/v4.3'
Bugfix/freemodbus change max task prio (backport v4.3)

See merge request espressif/esp-idf!13732
2021-10-05 07:47:21 +00:00
aleks
002e6b8cec freemodbus: increase max priority of modbus tasks
allows to avoid issues with modbus processing when higher priority tasks are used in user application
2021-07-29 14:27:04 +08:00
aleks
0d0f4adbf8 freemodbus: fix mb zero based reg address in the iterator
Fixes https://github.com/espressif/esp-idf/issues/6571
2021-07-28 11:34:19 +02:00
yuanjm
1ef91c72e2 components: Use CONFIG_LWIP_IPV6 to strip IPv6 function in components 2021-04-12 05:42:50 +00:00
aleks
6238c49479 freemodbuss: fix event processing after merge 2021-03-19 13:59:54 +01:00
aleks
321ee21c4c freemodbus: fix mb controller parity propagation issues
Closes https://github.com/espressif/esp-idf/issues/6377
2021-02-16 10:47:43 +01:00
Marius Vikhammer
04df1f3a42 CI: enable example builds for C3
Enables building C3 examples in CI.

Fixes related warnings/errors and disables examples that cannot run.
2021-02-09 12:04:02 +08:00
Alex Lisitsyn
96b77a28b1 freemodbus: add support for list of area descriptors for each register area
add multi register area descriptors into concrete port (initial)
add create/destroy of area descriptors into concrete port
add  the list of descriptors in common slave interface structure and init/destroy in concrete slave port
move r/w callback functions into common slave
final update of common slave interface wrappers add override API option in concrete port
update slave examples to check new  feature
2021-01-28 12:29:32 +08:00
Marius Vikhammer
0301c66bf0 esp32c3: Disable components that are not yet supported 2020-12-31 09:27:38 +11:00
Angus Gratton
66fb5a29bb Whitespace: Automated whitespace fixes (large commit)
Apply the pre-commit hook whitespace fixes to all files in the repo.

(Line endings, blank lines at end of file, trailing whitespace)
2020-11-11 07:36:35 +00:00
Marius Vikhammer
9b552ce004 docs: add warning for doxygen version
Running with a newer doxygen version than what's
used in CI may raise warnings locally that are not
present when built by CI
2020-09-03 13:48:40 +08:00
Alex Lisitsyn
d0b9829eef examples: freemodbus add tcp support for common master/slave iface
Add TCP port files to provide Modbus TCP interface for communication
Add freemodbus add tcp support for common master/slave iface and tcp example based on socket API
The communication between master and slave checked for each example serial_master, serial_slave (use ModbusPoll TCP)
update tcp example according netif changes, fix ci issues
update TCP slave implementation
update example_test.py to to set IP through stdin
update API documentation
event bit instead of semahore to lock communication resource
update default options and master/slave port files

Closes https://github.com/espressif/esp-idf/issues/858
Closes IDF-452
2020-07-22 00:34:04 +08:00
aleks
30e97e0920 freemodbus: fix memcmp result truncated to 1 byte
Coverity ID: 291158
2020-06-18 12:33:02 +02:00
Alex Lisitsyn
b28b62b194 freemodbus: fix fragmented response frame causes next value fail
drop uart ll driver fix: soc: prevent speculative reads from FIFO at -O2 optimization
(new compiler fixes this issue)
2020-06-15 15:20:42 +08:00
aleks
3bbdfb75ad freemodbus: fix event processing failure after destroy
Closes https://github.com/espressif/esp-idf/issues/5275
2020-05-13 15:59:36 +02:00
Alex Lisitsyn
b1fe4c4cc6 freemodbus: add extern c block into common header for cpp 2020-04-17 17:56:50 +08:00
Alex Lisitsyn
3abdd2207d freemodbus: fix long buffer failure
check master read write functions with array of registers)
fix master serial processing code and modbus controller to work with register array
modbus_master: add reading and writing of test value array (58 registers) to check failure is gone
remove parameter temporary buffer from modbus controller to allow more than 24 byte writes
driver: fix issue with TOUT feature
driver: fix uart_rx_timeout issue
driver: fix issue with rxfifo_tout_int_raw not triggered when received fifo_len = 120 byte and all bytes read out of fifo as result of rxfifo_full_int_raw
driver: add function uart_internal_set_always_rx_timeout() to always handle tout interrupt
examples: call uart_internal_set_always_rx_timeout() to handle tout interrupt correctly
examples: update examples to use tout feature
driver: reflect changes of uart_set_always_rx_timeout() function, change uart.c
driver: change conditions to trigger workaround for tout feature in uart.c
driver: change uart_set_always_rx_timeout()
freemodbus: fix tabs, remove commented code
driver: remove uart_ll_is_rx_idle()
2020-03-30 22:05:48 +08:00
Angus Gratton
11fac8637a docs: Resolve doxygen & Sphinx warnings 2020-02-07 16:37:45 +11:00
Felipe Neves
429712c6eb freertos: moved all xtensa specific files into a separated folder 2020-01-27 16:05:30 -03:00
Alex Lisitsyn
ba1ee4092a freemodbus: fix merge issues 2019-12-10 14:30:25 +08:00
Alex Lisitsyn
44444208b7 freemodbus: update poll event processing
update modbus poll event loop processing to process multiple events
2019-12-10 14:27:09 +08:00
Angus Gratton
ecaf816c0b Merge branch 'bugfix/freemodbus_fix_clang_warnings' into 'master'
freemodbus: fix clang warnings of freemodbus stack

See merge request espressif/esp-idf!5193
2019-11-28 07:06:19 +08:00
houwenxiang
f27ae9b0e2 feature: Add uart hal support. 2019-11-26 20:01:50 +08:00
aleks
6e14b6265b freemodbus: fix merge issues 2019-11-26 11:25:12 +01:00
aleks
cf4c95532f freemodbus: fix clang warnings 2019-11-26 10:37:14 +01:00
Alex Lisitsyn
67f62a79c1 freemodbus: add modbus master ascii
add support of modbus master ascii
rename base dir name of master and slave example to be mb_slave, mb_master to avoid conflict with sdio/slave example test
add Kconfig option to enable ASCII and RTU mode separately
update ASCII options + remove cast for errors
added baudrate for examples into Kconfig
updated magic numbers for timer timeout
put ascii private definitions into one file
2019-11-26 13:16:25 +08:00
chenjianqiang
9f9da9ec96 feat(timer): refator timer group driver
1. add hal and low-level layer for timer group
2. add callback functions to handle interrupt
3. add timer deinit function
4. add timer spinlock take function
2019-11-21 14:14:19 +08:00
Alex Lisitsyn
cfdd5f0ef7 freemodbus: configure timer handler placement
place timer interrupt handler into flash by default;
add default settings for timer and UART interrupts to place them into IRAM into example defaults;
CONFIG_FMB_TIMER_PORT_ENABLED default = n, when enabled, the UART_ISR_IN_IRAM set to y
2019-11-12 22:16:55 +08:00
Alex Lisitsyn
1ab9e81729 freemodbus: fix nvs access failure
place timer handler functions into IRAM
update timer port handlers
fix communication issues
fix offset issue in example
add kconfig option to place handlers into IRAM
2019-11-08 16:55:42 +08:00
Alex Lisitsyn
4bac558ab3 freemodbus: fix a bug with destroy function of modbus controller and fix port destroy functions
adds timer interrupt handle and free it in vMBXXXPortTimerClose() in master and slave timer port
assign modbus controller interface pointer to NULL in destroy function after free
2019-10-31 23:23:24 +08:00
Angus Gratton
6990a7cd54 Merge branch 'master' into feature/esp32s2beta_update 2019-08-19 15:03:43 +10:00
Michael (XIAO Xufeng)
264ffbeb14 timer_group: use the LL 2019-08-09 13:46:31 +08:00
Angus Gratton
04ae56806c Merge branch 'master' into feature/esp32s2beta_update 2019-08-08 15:26:58 +10:00
Angus Gratton
24d26fccde Merge branch 'master' into feature/esp32s2beta_update 2019-08-08 13:44:24 +10:00
Anton Maklakov
afbaf74007 tools: Mass fixing of empty prototypes (for -Wstrict-prototypes) 2019-08-01 16:28:56 +07:00
chenjianqiang
4cc962353c feat(uart): update uart driver for esp32s2beta 2019-07-18 15:57:00 +08:00
Renz Christian Bagaporo
9b350f9ecc cmake: some formatting fixes
Do not include bootloader in flash target when secure boot is enabled.
Emit signing warning on all cases where signed apps are enabled (secure
boot and signed images)
Follow convention of capital letters for SECURE_BOOT_SIGNING_KEY
variable, since it is
relevant to other components, not just bootloader.
Pass signing key and verification key via config, not requiring
bootloader to know parent app dir.
Misc. variables name corrections
2019-06-21 19:53:29 +08:00