- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a function that's interacting with a serial NOR flash chip over SPI. But every time it executes, it seems like it's terminated early after a second or so. I noticed this because it would be printing out messages, and then all of a sudden stop and the messages from the next function starts to print. I don't even know where to begin troubleshooting this. Is there a length limit on how long a function would run? I'm using ThreadX by default and not using any thread management functions yet. I also noticed that the problem went away when I put the device under GDB. It seems like having breakpoints in the middle of the function forces it to run till completion. Any ideas why?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think it was because the thread ran out of stack space. I changed the application stack size to 8k and it's working now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you let us know the platform in which you are seeing this problem?
Can you provide the example code so that we can see and find out the issue. Please attach the project in the thread so that we can have a look.
Regards,
Ajay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think it was because the thread ran out of stack space. I changed the application stack size to 8k and it's working now.