Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nodemcu freezes after several hours #4

Open
sunepedersen opened this issue Mar 16, 2016 · 2 comments
Open

Nodemcu freezes after several hours #4

sunepedersen opened this issue Mar 16, 2016 · 2 comments

Comments

@sunepedersen
Copy link

First, YOU ROCK!

Im trying to use your library on a Nodemcu that im trying to abuse to the max for a electric vehicle controller (electric skateboard) - see our open source project here www.faradaymotion.com

Anyways the Nodemcu code that I wrote, includes your library for controlling LED's and additionally I use servo output, serial communication with a motorcontroller, Nunchuk input, Wifi controller input etc.. So a lot of stuff is going on and I have had some stability issues in the past (all in a test rig and few driving boards) but now its quite stable without the LED library. However I want to start using the LED's, and with your library I still get some random freezes, however after may hours of non stop operation.

Im not very good at C++ and im coming from a web/windows development background and im also not an expert in the esp8266 so I have not debugged too much yet other than disabling the other libraries/functionalities and then seeing if the problem still occurs and it does not.

The setup that I have includes another microcontroller that watches if I have restarts on the Nodemcu unit so I can tell that your library is not causing restarts (the interrupt driven ones did (neopixels etc)), but the freezes are causing it to not do any of the tasks it should continue to perform.

You can see the code here:
https://github.com/sunepedersen/faradaymotion-spine-3dmodels/tree/master/Software/Arduino

Let me know your clever thought on this. Any help to resolve the problem would be greatly appreciated.

BR
Sune Pedersen

@angelfromhell
Copy link

Very nice work, it helped me a lot to get started, however i am a bit wondering

can it be that there is a read and write Access at the same time.
as i can see in the code Show() the data is written but there is no locking of the read function.

this could cause when also very rare in your implementation due to the 8x interpolation a read/write Access at the same time (race condition)

nicer normally is to use a draw buffer and a Pixel buffer, and after writing swap the pointers in the dma buffer ( either in the Interrupt handler ) or before doing, halt the Interrupt

other hint: instead of doing
extern c
{
Header file
}

it is nicer and easier to do in the dma Header file
ifdef cplusplus
extern C {
endif

and at the end of the file
#ifdef cplusplus
}
#endif
( exact Syntax you should look up on the web )

@JoDaNl
Copy link
Owner

JoDaNl commented Mar 23, 2016

Hi,

Due to business trip I have little time. Will look into your question in the weekend.

Regards,
Jos

op 22 mrt. 2016 15:45, angelfromhell notifications@github.com schreef:
Very nice work, it helped me a lot to get started, however i am a bit wondering

can it be that there is a read and write Access at the same time.
as i can see in the code Show() the data is written but there is no locking of the read function.

this could cause when also very rare in your implementation due to the 8x interpolation a read/write Access at the same time (race condition)

nicer normally is to use a draw buffer and a Pixel buffer, and after writing swap the pointers in the dma buffer ( either in the Interrupt handler ) or before doing, halt the Interrupt

other hint: instead of doing
extern c
{
Header file
}

it is nicer and easier to do in the dma Header file
ifdef cplusplus
extern C {
endif

and at the end of the file
#ifdef cplusplus
}
#endif
( exact Syntax you should look up on the web )


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#4 (comment)

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

No branches or pull requests

3 participants