libretiny-eu / libretiny

PlatformIO development platform for IoT modules
http://docs.libretiny.eu/
MIT License
382 stars 55 forks source link

PA15 not working on T102_V1.1 Board but works on wr2 #227

Open ModuloFS opened 6 months ago

ModuloFS commented 6 months ago

Hello,

i am using ESPhome to flash my Tekin SP22 smart plug. It has a T102_V1.1 board with an RTL8710BN chip on it. Sadly GPIO PA15, which is driving the Relay is not working. If i change the output in my switch-section of the config yaml of esphome to PA14 the output works perfectly fine. So i think it is not a config problem.

-EDIT-

If i change the board from t102_v1.1 to wr2 the output is working perfectly!! Maybe the board config is not correct.

-EDIT-

BTW. If i want to add the power sensor i also get the same change interrupt error as described in this issue:

https://github.com/libretiny-eu/libretiny/issues/155

Here is my esphome config which is NOT working:

esphome:
  name: esphome-tekin-sp22

rtl87xx:
  board: t102-v1.1

logger:

web_server:
    version: 1

mdns:

ota:
  password: ""

wifi:
  ssid: "MY-NET"
  password: "MY-PW"

output:
  - platform: libretiny_pwm
    id: output_led_1
    pin:
        number: PA5
        inverted: true

light:
  - platform: monochromatic
    id: light_switch_1
    output: output_led_1

binary_sensor:
  - platform: gpio
    id: binary_switch_1
    pin:
      number: PA23
      inverted: true
      mode: INPUT_PULLUP
    on_press:
      then:
        - switch.toggle: switch_1

switch:
  - platform: gpio
    id: switch_1
    name: Relay 1
    pin:
        number: PWM1
        mode: OUTPUT
    on_turn_on:
      - light.turn_on: light_switch_1
    on_turn_off:
      - light.turn_off: light_switch_1

status_led:
  pin: 
    number: PA18
    inverted: true

And here is the config which IS working:

esphome:
  name: esphome-tekin-sp22

rtl87xx:
  board: wr2

logger:

web_server:
    version: 1

mdns:

ota:
  password: ""

wifi:
  ssid: "MY-NET"
  password: "MY-PW"

output:
  - platform: libretiny_pwm
    id: output_led_1
    pin:
        number: PA5
        inverted: true

light:
  - platform: monochromatic
    id: light_switch_1
    output: output_led_1

binary_sensor:
  - platform: gpio
    id: binary_switch_1
    pin:
      number: PA23
      inverted: true
      mode: INPUT_PULLUP
    on_press:
      then:
        - switch.toggle: switch_1

switch:
  - platform: gpio
    id: switch_1
    name: Relay 1
    pin:
        number: PWM1
        mode: OUTPUT
    on_turn_on:
      - light.turn_on: light_switch_1
    on_turn_off:
      - light.turn_off: light_switch_1

status_led:
  pin: 
    number: PA18
    inverted: true
fasax1284 commented 5 months ago

some problem with PA15 pin not work

alexl2709 commented 5 months ago

I had got the same problem. After the changing name board to wr2 - works