Forum Discussion
Altera_Forum
Honored Contributor
16 years agoalt_write_flash - single threaded
I'm currently experimenting with uC/OS-II with NicheStack on Nios II. Things are going well except for situations where I am writing 128K of data to flash using alt_write_flash(). I noticed in the...
Altera_Forum
Honored Contributor
16 years agoIf your stack sizes are fine then it sounds more like some sort of memory overrun or corruption of some sort. Maybe it is in your code like you mentioned. I don't know how your code interacts with the network stack but I would say if you are doing reads from the network stack and then processing, maybe try reading and throwing away the data instead of processing it to see if the problem persists.
Are you able to trace into the call stack right to the point of corruption? I would use the Eclipse debugger and follow the code path into alt_flash_write() or alt_flash_write_block() and watch the memory area that you know gets corrupted closely as you step through each call. I wonder if you can still reproduce the problem as you step through the code.