roberttidey / espI2sClockGen

Flexible clock and pulse generator using I2S interface on esp8266
7 stars 2 forks source link

wifi stops working after i2scBegin(); #1

Open rokitski opened 3 years ago

rokitski commented 3 years ago

Noticed first that wifi functionality was unstable - worked for ~10 seconds and stopped. Traced it to a call of i2scBegin(); in setupEnd(); function. When call to i2scBegin(); is disabled in setupEnd() the app works as expected. Wifi stops immediately after clock configuration is set. Clock setting actually produces expected pattern, as verified by a scope, however wifi stops and further pulse generator configuration change is possible only after the app is restarted. I'm testing this app on NodeMCU 1.0.

roberttidey commented 3 years ago

If you are using the manual wifi set up did you try the autoreconnect method as mentioned when issue was under espsignalgenerator?

I don't have any problems with wifi when using the original wifiManager method.

When you say wifi stops immediately after setting after clock configuration is set can you clarify? If wifi stopped as soon as i2scBegin() is called then I don't see how you could initiate any pulse train. Is it stopping after say setting frequency manually and pressing Generate Clock or only when you do a Generate Pulses from the pulses tab

rokitski commented 3 years ago

I've commented out i2scBegin() in setupEnd() function. This is how it looks now: void setupEnd() { i2scInit(512, 1000000, -1, 0, 0); i2scSetMSArrayItem(0, 16, 16, 0); // i2scBegin(); } With this change I can set the clock once from the web page, or set pulse sequence. It works only once, because when I set the clock o pulse sequence i2scBegin() is still called inside the handler functions. When I dug inside i2scBegin(), it looks like wifi stops working when line 278 in file i2sTXcircular.c is called ("I2SC |= I2STXS; //Start transmission"). This call is inside i2scBegin() function definition. To set the clock second time I need to restart the board, since after the first setting wifi stops and I can't reach the web server any more.

On Sat, Sep 18, 2021 at 2:12 PM roberttidey @.***> wrote:

If you are using the manual wifi set up did you try the autoreconnect method as mentioned when issue was under espsignalgenerator?

I don't have any problems with wifi when using the original wifiManager method.

When you say wifi stops immediately after setting after clock configuration is set can you clarify? If wifi stopped as soon as i2scBegin() is called then I don't see how you could initiate any pulse train. Is it stopping after say setting frequency manually and pressing Generate Clock or only when you do a Generate Pulses from the pulses tab

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/roberttidey/espI2sClockGen/issues/1#issuecomment-922374518, or unsubscribe https://github.com/notifications/unsubscribe-auth/AULMAAO6L5HXYSL5LCFDGNTUCT6DZANCNFSM5EJMSUJQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.