logo elektroda
logo elektroda
X
logo elektroda

Trouble reading analog signals on BK7231N via P26/ADC1, P24/ADC2, P28/ADC4, P22/ADC5, and P21/ADC6

cuemaxx 870 5
ADVERTISEMENT
  • #1 20644311
    cuemaxx
    Level 2  
    Hi,

    I have a BK7231N and have successfully configured the battery monitoring via P23/ADC3 readout so far. However, I would like to read another analog signal. Per datasheet, the BK7231N has additional ADCs: P26/ADC1, P24/ADC2, P28/ADC4, P22/ADC5 and P21/ADC6. However, when I set those pins to "ADC" via webconfig and assign a channel, the channel on the web UI reads '-1.00'. Reading out P23/ADC3 works completely fine.
    Could that be due to hal_adc_bk7231.c:18 having the wrong GPIOs for the remaining ADCs or did I miss something else?

    Thanks for your help and this nice project! :)
    - cuemaxx
  • ADVERTISEMENT
  • #2 20645380
    p.kaczmarek2
    Moderator Smart Home

    Hello, thank you for reporting the issue. I will try to look into it and come back to you within the following days.

    Or maybe.... I can just apply changes now and push them to the branch:
    https://github.com/openshwprojects/OpenBK7231T_App/pull/871
    I am not able to test right now. I just entered the GPIO indices you've listed. Can you download the automatic build from Github and check if they are working as you want?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20645522
    cuemaxx
    Level 2  

    Thanks for your reply and for the commit! However, the changes are not yet in main... How long will it take or what would need to be done for that?
  • ADVERTISEMENT
  • #4 20645844
    p.kaczmarek2
    Moderator Smart Home

    They are merged into main releases for now. I decided I can try doing that because I don't think we can break anything more by committing those changes.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #5 20646106
    cuemaxx
    Level 2  

    Thanks for pushing the commit - it seems like we found the culprit: indeed works now :)
ADVERTISEMENT