You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some caces, I have to change the filters and masks of one of my MCP2515s (yes I have 2, and they have to work together), after that, I have to recall the "begin" method.
In the LoopBackDemo, when I tried to call begin again with "settings.mReceiveBufferSize = 31;" (Just for testing), the Arduino hangs.
Then, I tried setting "settings.mReceiveBufferSize = 8;", and discovered that I can call begin twice, it hangs at the 3rd call.
So I think when begin is called, this driver allocates the recieve buffer to a new space of RAM, not using the old space, and this filled the RAM up.
Maybe I'm wrong, I'm not familiar with C++.
Any solutions? Or I just missed something?
The text was updated successfully, but these errors were encountered:
So I think when begin is called, this driver allocates the recieve buffer to a new space of RAM, not using the old space, and this filled the RAM up.
You are right, when ACAN2515::begin is called, the receive and transmit buffers are allocated, and current release does not deallocate them before allocation. On the first ACAN2515::begin call it is ok because the buffers are not allocated.
A workaround is to insert the deallocation instruction in the ACANBuffer16.h file :
public: bool initWithSize (const uint16_t inSize) {
delete [] mBuffer ; // Line to insert
mBuffer = new CANMessage [inSize] ;
Il will add this line in the future 1.1.1 release.
Best regards,
Pierre
Le 16 janv. 2019 à 10:58, qwec01 ***@***.***> a écrit :
In some caces, I have to change the filters and masks of one of my MCP2515s (yes I have 2, and they have to work together), after that, I have to recall the "begin" method.
In the LoopBackDemo, when I tried to call begin again with "settings.mReceiveBufferSize = 31;" (Just for testing), the Arduino hangs.
Then, I tried setting "settings.mReceiveBufferSize = 8;", and discovered that I can call begin twice, it hangs at the 3rd call.
So I think when begin is called, this driver allocates the recieve buffer to a new space of RAM, not using the old space, and this filled the RAM up.
Maybe I'm wrong, I'm not familiar with C++.
Any solutions? Or I just missed something?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#4>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ASys1F_4FlDHujlTM_i0d4sWyxf26wJLks5vDvfegaJpZM4aCs4v>.
In some caces, I have to change the filters and masks of one of my MCP2515s (yes I have 2, and they have to work together), after that, I have to recall the "begin" method.
In the LoopBackDemo, when I tried to call begin again with "settings.mReceiveBufferSize = 31;" (Just for testing), the Arduino hangs.
Then, I tried setting "settings.mReceiveBufferSize = 8;", and discovered that I can call begin twice, it hangs at the 3rd call.
So I think when begin is called, this driver allocates the recieve buffer to a new space of RAM, not using the old space, and this filled the RAM up.
Maybe I'm wrong, I'm not familiar with C++.
Any solutions? Or I just missed something?
The text was updated successfully, but these errors were encountered: