logo elektroda
logo elektroda
X
logo elektroda

HAL IRQ Shift with OpenBK7231T_App PR #1768 – Ongoing Testing and Results

divadiow 459 38
ADVERTISEMENT
  • #31 21642229
    divadiow
    Level 35  
    ESP8266 1768_merge_653594b2e0f7

    Code: Text
    Log in, to see the code


    Added after 3 [minutes]:

    is result of counter_r also needed now?

    Added after 21 [minutes]:

    W800 counter_r and f are bouncy

    1768_merge_653594b2e0f7

    Code: Text
    Log in, to see the code
  • ADVERTISEMENT
  • #32 21642245
    p.kaczmarek2
    Moderator Smart Home
    Ignore _r for now, it's not enabled on some platforms yet, and I would really assume that if _f works, then _r works as well. Or vice versa.

    Added after 1 [minutes]:

    max4elektroda wrote:
    Regarding pullup/pulldown:
    Iirc in some codes for interrupt handling the pin was "set to the opposite" of the event: raise would pulldown pin, fall would pullup pin.

    Interesting, might need to keep in mind for "on change".


    max4elektroda wrote:

    I had another PR for this ;-)
    My idea was to put all pin/role related config in one place, a simple text file, and generate a header file to be included instead of defining the enum here, the http names there...
    It's also possible to add things like "channel usage", but that's optional.
    Let me check the PR and its state not sure if i added the channel us in latest or not

    But that's the one that increased binary size?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #33 21642246
    divadiow
    Level 35  
    p.kaczmarek2 wrote:
    Which are missing now?


    added tracking table to first post
  • #34 21642249
    p.kaczmarek2
    Moderator Smart Home
    How much bouncy? For me, on W800, it was adding sometimes 1, sometimes 3, etc, sometimes 5.
    I solved it with a capacitor - just like we debounce buttons, with a capacitor. 100nF one connected between pin and ground. It removes tiny "bouncing" of switch contact, so it removes "ghost edge transitions" that happen due to the switch imperfections.
    Now, each press adds 1.
    Close-up of a 100nF capacitor connected between a pin and ground on a breadboard.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #35 21642256
    divadiow
    Level 35  
    this kind of bouncy
    Schematic diagram showing elastic components without resistors or capacitors.

    no, no resistors or capacitors. so maybe I ignore bouncy because it would be OK on real device. all that matters for this test is the counting and no crash?
  • ADVERTISEMENT
  • #36 21642270
    p.kaczmarek2
    Moderator Smart Home
    For me, on shown board with W800, with build:
    
    Built on Aug 22 2025 23:03:55 version int_hal_e09141bba965
    Online for 40 minutes and 38 seconds
    Device MAC: 28:6D:CD:CE:8E:C7
    Short name: w800CDCE8EC7, Chipset W800
    

    and with PB21 pin - Counter_f, with nothing connected (no resistor, no capacitor, no button) , nothing increases.
    Helpful post? Buy me a coffee.
  • #37 21642274
    divadiow
    Level 35  
    that build is a few runs back from last night?

    what do you need me to do on W800, if anything?
  • #38 21642359
    max4elektroda
    Level 20  
    p.kaczmarek2 wrote:
    But that's the one that increased binary size?

    https://github.com/MaxineMuster/OpenBK7231T_App/actions/runs/17175436952
    For most platforms it's less or same size, some are slightly larger, max 64 bytes (see below - I filtered out all with same size)

    The W800 gives an idea, how much it will increase with the additional information on channels and (that's just a wip state) filtering out unconfigured pins.
    This is also included in Windows simulator so it can be tested without flashing ...

    There are two small changes at the moment even without "#define ENABLE_USE_PINROLE_CHAN_DESC":

    I changed (hopefully improved) the text on the page a bit (maybe @divadiow can tell if it's understandable and maybe correct or really improve it ;-)).

    HAL IRQ Shift with OpenBK7231T_App PR #1768 – Ongoing Testing and Results

    And unconfigured pins or roles without any channels won't show a channel at all:

    HAL IRQ Shift with OpenBK7231T_App PR #1768 – Ongoing Testing and Results




    Size +/-    Filename                                                       1.18.158   rolerework_f9ecca72efef
    -1024       OpenXR872_XX.img                                                 798552                     797528
    -736        OpenRTL8710B_XX_ota.img                                         1266848                    1266112
    -384        OpenRTL8720E_XX.bin                                             1410144                    1409760
    -384        OpenRTL8720E_XX_ota.img                                         1328256                    1327872
    -368        OpenBK7231T_XX_berry.bin                                         872665                     872297
    -368        OpenBL602_XX_berry_OTA.bin                                       932896                     932528
    -368        OpenESP32S2_XX_4M.factory.bin                                   1038544                    1038176
    -368        OpenESP32S2_XX_4M.img                                            973008                     972640
    -368        OpenRTL8710B_XX.bin                                              633420                     633052
    -364        OpenBK7238_XX_irRemoteESP.bin                                    860297                     859933
    -364        OpenTR6260_XX.bin                                                654480                     654116
    -360        OpenBK7231N_XX_berry.bin                                         905217                     904857
    -360        OpenBK7231N_XX_irRemoteESP.bin                                   901141                     900781
    -360        OpenBK7231N_XX_tuyaMCU.bin                                       780781                     780421
    -360        OpenBK7231T_XX.bin                                               769569                     769209
    -360        OpenBK7231T_XX_irRemoteESP.bin                                   876501                     876141
    -360        OpenBK7231T_XX_tuyaMCU.bin                                       751461                     751101
    -360        OpenBL602_XX_berry.bin                                           928792                     928432
    -360        OpenBL602_XX.bin                                                 803776                     803416
    -352        OpenBK7231N_XX.bin                                               802129                     801777
    -352        OpenBK7231N_XX_powerMetering.bin                                 783909                     783557
    -352        OpenBK7231N_XX_sensors.bin                                       794233                     793881
    -352        OpenBK7231T_XX_powerMetering.bin                                 753221                     752869
    -352        OpenBK7231T_XX_sensors.bin                                       763185                     762833
    -352        OpenBL602_XX_OTA.bin                                             807872                     807520
    -352        OpenESP32C2_XX_2M.factory.bin                                    911600                     911248
    -352        OpenESP32C2_XX_2M.img                                            846064                     845712
    -352        OpenESP32C2_XX_4M.factory.bin                                   1039952                    1039600
    -352        OpenESP32C2_XX_4M.img                                            974416                     974064
    -352        OpenESP32C3_XX_4M.factory.bin                                   1145968                    1145616
    -352        OpenESP32C3_XX_4M.img                                           1080432                    1080080
    -352        OpenESP32C5_XX_4M.factory.bin                                   1233328                    1232976
    -352        OpenESP32C5_XX_4M.img                                           1167792                    1167440
    -352        OpenESP32S3_XX_4M.factory.bin                                   1064496                    1064144
    -352        OpenESP32S3_XX_4M.img                                            998960                     998608
    -352        OpenESP32_XX_4M.factory.bin                                     1064560                    1064208
    -352        OpenESP32_XX_4M.img                                              999024                     998672
    -352        OpenW600_XX.fls                                                  549664                     549312
    -336        OpenESP32C61_XX_4M.factory.bin                                  1178224                    1177888
    -336        OpenESP32C61_XX_4M.img                                          1112688                    1112352
    -336        OpenESP32C6_XX_4M.factory.bin                                   1241504                    1241168
    -336        OpenESP32C6_XX_4M.img                                           1175968                    1175632
    -320        OpenESP32C3_XX_2M.factory.bin                                   1017696                    1017376
    -320        OpenESP32C3_XX_2M.img                                            952160                     951840
    -320        OpenLN882H_XX.bin                                                761956                     761636
    -320        OpenRTL8721DA_XX.bin                                            1531648                    1531328
    -320        OpenRTL8721DA_XX_ota.img                                        1449760                    1449440
    -320        OpenRTL87X0C_XX.bin                                              952708                     952388
    -320        OpenRTL87X0C_XX_ota.img                                          887172                     886852
    -304        OpenESP8266_1MB_XX.factory.bin                                   814912                     814608
    -304        OpenESP8266_2MB_XX.factory.bin                                   814912                     814608
    -304        OpenESP8266_XX.img                                               749376                     749072
    -264        OpenRTL8710A_XX.bin                                              796076                     795812
    -264        OpenRTL8710A_XX_ota.img                                          751024                     750760
    -224        OpenECR6600_XX.bin                                               981749                     981525
    -96         OpenBK7238_XX_berry.rbl                                          574544                     574448
    -80         OpenBK7231N_UG_XX_berry.bin                                      568160                     568080
    -80         OpenBK7231N_UG_XX_powerMetering.bin                              504544                     504464
    -80         OpenBK7231N_XX_berry.rbl                                         568128                     568048
    -80         OpenBK7231N_XX_powerMetering.rbl                                 504512                     504432
    -80         OpenBK7238_XX.rbl                                                510592                     510512
    -36         OpenW600_XX_gz.img                                               334600                     334564
    -32         OpenBK7231T_ALT_XX.rbl                                           522736                     522704
    -32         OpenBK7231T_UG_XX.bin                                            479456                     479424
    -32         OpenBK7231T_UG_XX_irRemoteESP.bin                                547184                     547152
    -32         OpenBK7231T_XX_irRemoteESP.rbl                                   547152                     547120
    -32         OpenBK7231T_XX.rbl                                               479424                     479392
    -32         OpenBK7238_XX_irRemoteESP.rbl                                    570432                     570400
    -32         OpenBK7252_XX.rbl                                                530256                     530224
    -28         OpenLN882H_XX_OTA.bin                                            431040                     431012
    -16         OpenBK7231N_UG_XX_irRemoteESP.bin                                565392                     565376
    -16         OpenBK7231N_XX_irRemoteESP.rbl                                   565360                     565344
    -16         OpenBK7231T_UG_XX_berry.bin                                      544576                     544560
    -16         OpenBK7231T_XX_berry.rbl                                         544544                     544528
    -4          OpenXR806_XX_ota.img                                             494408                     494404
    8           OpenXR872_XX_ota.img                                             446516                     446524
    16          OpenBK7231N_UG_XX.bin                                            503808                     503824
    16          OpenBK7231N_UG_XX_sensors.bin                                    496960                     496976
    16          OpenBK7231N_UG_XX_tuyaMCU.bin                                    502464                     502480
    16          OpenBK7231N_XX.rbl                                               503776                     503792
    16          OpenBK7231N_XX_sensors.rbl                                       496928                     496944
    16          OpenBK7231N_XX_tuyaMCU.rbl                                       502432                     502448
    16          OpenBK7231T_UG_XX_tuyaMCU.bin                                    481008                     481024
    16          OpenBK7231T_XX_tuyaMCU.rbl                                       480976                     480992
    16          OpenBK7231U_XX.rbl                                               523376                     523392
    16          OpenECR6600_XX_ota.img                                           527252                     527268
    56          OpenBL602_XX_OTA.bin.xz                                          446392                     446448
    56          OpenBL602_XX_OTA.bin.xz.ota                                      446904                     446960
    64          OpenBK7252N_XX.rbl                                               515872                     515936
    744         OpenW800_XX_ota.img                                              415840                     416584
    1258        obkSimulator_XX.zip                                             2462844                    2464102
    1340        OpenW800_XX.fls                                                  694496                     695836
    

Topic summary

The discussion focuses on ongoing testing and development related to shifting interrupt handling to the Hardware Abstraction Layer (HAL) in the OpenBK7231T_App project, specifically pull request #1768. Testing involves multiple platforms including ESP8266, ESP32, and W600-based boards. Initial tests on ESP8266 revealed a crash due to missing ISR service installation before removing GPIO ISR handlers, prompting code adjustments such as adding guards to prevent double removal of interrupts. ESP32 testing showed progress with crash fixes applied, while W600 boards exhibited issues with pin acknowledgment and stack usage during interrupt assignments. Build environment challenges were noted, including lengthy package downloads and optimization of multi-platform builds on single machines. Strategies discussed include using pre-stored GCC toolchains from GitHub and managing build variants via manifest YAML files to reduce build times. The conversation includes debugging logs, ISR service management, and platform-specific interrupt handling nuances.
Summary generated by the language model.
ADVERTISEMENT