-
Notifications
You must be signed in to change notification settings - Fork 6
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
1.4.4 stack on startup is sometimes larger #18
Comments
Hi Alex, I am not aware of such a issue. The startup sequence should be deterministic. But since there is real hardware involved, it could happen that the path through the code is slightly different depending on what values are obtained from the device. For example, the PLL lock time may vary slightly each time resulting in more or less repetitions when polling its state via SPI. Just to make sure, when you talk about startup, you mean the Best regards, |
On the same device through different power cycles, the stack will vary on startup. The behavior is the same across multiple units. I only noticed this after upgrading to 1.4.4. It might be occurring on 1.3.5 but didn't cause a hardfault because it used less overall stack. Stack is measured in nuttx with top. |
Ok, thanks for the information. |
Yes I increased the stack and the hardfault was resolved. But I would like to know what the library is doing internally that it can dynamically change the amount of stack required. |
I recently updated to 1.4.4. I noticed that I started getting a random hardfault on boot and traced it to the AFBR driver sometimes using more stack causing it to overrun the amount allocated to the task.
Currently I have 1872 bytes allocated to the task. After increasing that, I found that the AFBR sometimes uses 2068 on startup instead of 1876.
Upon power cycling, it appears to be random how much stack it uses. Can you tell me why this is the case?
The text was updated successfully, but these errors were encountered: