From: Thomas D. D. <to...@wa...> - 2025-06-22 16:52:00
|
On 6/21/25 22:23, Paul Fertser wrote: I found a what but not a why. Near the start of main, I launch core 1. core1_main starts some DMA, PIO, allocates an alarm pool starts a repeating timer, then exits. For now, there is nothing for core1_main to do. All the action of core 1 is in the timer callback, DMA, or PIO. Stopping core1_main from exiting fixed the problem. Interestingly, delaying the exit of core1_main by 250 msec, also fixed the problem. The alarm pool variable was on the stack! If core1_main exited too soon, something messed up core 0 and the web page was not available. The repeating timer fired at least one time after core1_main exited. Making the alarm pool variable static (as it should have been) also fixed the problem. This will be mixed with some code I don't control, so I want to limit variable scope. Here is the question: Why did cycling power also fix the problem? There is no OS, so memory use should be static. Something in core 0 is using the stack allocated to core1_main. Maybe in cyw43? I don't think pico-sdk. Thanks for your help. Sorry for the noise. We did find one problem. Is someone going to make the change in git? Tom Dean |