diff --git a/mcu-atoms3.yaml b/mcu-atoms3.yaml index 1f74537..a7d1e2b 100644 --- a/mcu-atoms3.yaml +++ b/mcu-atoms3.yaml @@ -79,6 +79,10 @@ external_components: - source: github://randybb/esphome-components components: [m5stack_keyboard] refresh: 1h + # TEMP: esphome#23831 (OTA over CANopen, CiA 302-3); drop once merged + - source: github://pr#23831 + components: [canopen] + refresh: 1h packages: common: !include common/common.yaml @@ -88,6 +92,11 @@ packages: vars: light_id: status_frame +logger: + logs: + # canbus logs every frame at DEBUG, which slows the loop during SDO block transfers + canbus: INFO + i2c: - id: i2c_grove sda: 2 @@ -105,6 +114,8 @@ canbus: tx_pin: 5 can_id: 3 bit_rate: 500kbps + # IDF default is 5 frames; an SDO block (16 segments in ~8 ms) overflowed it (EMCY 0x8110, partial block acks) + rx_queue_len: 32 canopen: - id: can_open @@ -150,6 +161,10 @@ script: uint8_t d[5] = {0, 0, 0, 0, (uint8_t) (millis() / 100)}; id(pkp).send_frame(0x195, d, sizeof(d)); +ota: + - platform: canopen + canopen_id: can_open + # CardKB sends only the press (Shift/Sym/Fn resolved in the CardKB): a consumer reacts to a change of key_count # and reads the key from key_code (both in the same frame), or watches key_event alone (count % 255 << 8 | key) canopen_entities: diff --git a/mcu-can-node-1.yaml b/mcu-can-node-1.yaml index bd1dc5e..cc8f949 100644 --- a/mcu-can-node-1.yaml +++ b/mcu-can-node-1.yaml @@ -31,6 +31,11 @@ external_components: packages: common: !include common/common.yaml +logger: + logs: + # canbus logs every frame at DEBUG, which slows the loop during SDO block transfers + canbus: INFO + canbus: - platform: esp32_can id: can_bus @@ -38,6 +43,8 @@ canbus: tx_pin: 23 can_id: 1 bit_rate: 500kbps + # IDF default is 5 frames; an SDO block (16 segments in ~8 ms) overflowed it (EMCY 0x8110, partial block acks) + rx_queue_len: 32 canopen: id: can_open diff --git a/mcu-can-node-2.yaml b/mcu-can-node-2.yaml index 89ccccc..1f6b57c 100644 --- a/mcu-can-node-2.yaml +++ b/mcu-can-node-2.yaml @@ -35,6 +35,11 @@ external_components: packages: common: !include common/common.yaml +logger: + logs: + # canbus logs every frame at DEBUG, which slows the loop during SDO block transfers + canbus: INFO + canbus: - platform: esp32_can id: can_bus @@ -42,6 +47,8 @@ canbus: tx_pin: 23 can_id: 2 bit_rate: 500kbps + # IDF default is 5 frames; an SDO block (16 segments in ~8 ms) overflowed it (EMCY 0x8110, partial block acks) + rx_queue_len: 32 canopen: id: can_open diff --git a/mcu-m5stickc-plus.yaml b/mcu-m5stickc-plus.yaml index 25fb371..d9c2b98 100644 --- a/mcu-m5stickc-plus.yaml +++ b/mcu-m5stickc-plus.yaml @@ -107,6 +107,11 @@ m5stack_mini_joyc: id: joy_button name: Joystick Button +logger: + logs: + # canbus logs every frame at DEBUG, which slows the loop during SDO block transfers + canbus: INFO + canbus: - platform: esp32_can id: can_bus @@ -115,6 +120,8 @@ canbus: can_id: 4 bit_rate: 500kbps mode: LISTENONLY # TEMP: the node does not see the bus on RX (GPIO32), keep it off the bus + # IDF default is 5 frames; an SDO block (16 segments in ~8 ms) overflowed it (EMCY 0x8110, partial block acks) + rx_queue_len: 32 canopen: - id: can_open