Skip to content

reset by SCLK reset pattern while initializing - #23

Open
RadoMmm wants to merge 1 commit into
CuriousScientist0:mainfrom
RadoMmm:InitReset
Open

reset by SCLK reset pattern while initializing#23
RadoMmm wants to merge 1 commit into
CuriousScientist0:mainfrom
RadoMmm:InitReset

Conversation

@RadoMmm

@RadoMmm RadoMmm commented Apr 5, 2025

Copy link
Copy Markdown

I've got the board without RESET pin so ADS is not reset when I invoke software reset or press the RST button on the controller board. If the ADC gets into wrong state there is no way to fix it except unplugging whole device. (It happens to me sometimes when tuning on/off some circuits). I've implemented the alternative reset procedure to initialization, could be useful for others

@CuriousScientist0

Copy link
Copy Markdown
Owner

Have you tried sendDirectCommand(RESET)?

@RadoMmm

RadoMmm commented Apr 6, 2025

Copy link
Copy Markdown
Author

I've tested it now, it is interesting problem. Board is currently powered by USB from PC, but there is power supply and transformer ready for production use. When I turn on/off the mains supply couple times, the ADS goes wild probably due to some induced voltage.
There is your example project running cycling the inputs at max speed. When this happens, speed suddenly drops somewhere to 0.5 - 2 lines per second. It seems ADC registers changes maybe randomly, most noticeable it turns itself to LSB mode.
It can be also seen when reading the status register.
Initial (normal) value in example sketch:
Value of STATUS register is: 54 (0011 0110)
After the problem occurs:
Value of STATUS register is: 124 (0111 1100)

Reset button on the ESP board is not resetting the ADC in the original library witohut RST button defined and value of Status register is still 124 although InitializeADC() should set it. The sendDirectCommand(RESET) works though. It sets the STATUS register to 48 (default after reset).
I cannot reproduce the problem when cycling conversion it not running, so probably interference changes some bit of cycling command which is changed to setting the status register to wrong values (sets the LSB).
This is the hardware problem, but I definitely need to restart the ADC in the initialization, at least for myself I'd keep the CLK reset for case ADC would get into state when it cannot accept the commands (for example restart in the moment when ADC is expecting data, not command).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants