I am having a crash that I beleive is due to SWI handle corruption. From the BIOS API I did not see a way to validate the handle which would be useful in trying to track down my corruption. I proved my assertion by doing a SWI_post(0x0) and the processor crashes and never returns from the call. Is there some way to validate the handle? The API's do not have return codes so I am looking for some suggestions. I am using BIOS 5.33 on c55x.
I don't think there is a good way to check for a invalid SWI handle because there is no way of determining a valid handle from an invalid one (except checking for it being NULL).
I would check on why the handle would become corrupt in the first place. How are you creating the SWI object? Statically or dynamically? Are you checking for the SWI_create()'s return value? Is your system stack large enough? From where are you calling the SWI_post? If you are calling it from a HWI, have you wrapped it with a HWI_enter and HWI_exit?
You could also place the SWI Object in a different memory segment if you think it might be getting corrupt by another task.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.