- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What I'm using : cy8c4248LQI-583 (it's custom board)
Long story short, my firmware using multiple funcition inside while(1) loop. But sometimes it getting into CY_ISR(IntDefaultHandler) and every function is paused. 80% sure it is hardware problem(because of bad PCB design). But for the temporary measure, I want to add CySoftwareReset(); into CY_ISR(IntDefaultHandler). Like this code below
CY_NORETURN
CY_ISR(IntDefaultHandler)
{
/***************************************************************************
* We must not get here. If we do, a serious problem occurs, so go into
* an infinite loop.
***************************************************************************/
#if defined(__GNUC__)
if (errno == ENOMEM)
{
#ifdef CY_BOOT_INT_DEFAULT_HANDLER_ENOMEM_EXCEPTION_CALLBACK
CyBoot_IntDefaultHandler_Enomem_Exception_Callback();
#endif /* CY_BOOT_INT_DEFAULT_HANDLER_ENOMEM_EXCEPTION_CALLBACK */
while(1)
{
CySoftwareReset();
/* Out Of Heap Space
* This can be increased in the System tab of the Design Wide Resources.
*/
}
Does this can work? Or I can't add any code?
Best regards, BK.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
You can edit the source file but, each time you Build and Clean, the edited source will be over-written with new Generated Source files. You can just do Build and you're code will remain in place, but any significant changes to schematic or C functions, will cause the same effect as Build and Clean. So, your mileage may vary.
Since the default ISR has a 'callback' feature, use that instead. Here's a thread on how to do that. (Ignore the fact that the thread deals with a bootloader).
Solved: CmOStart.c -- No return exception handler -- callb... - Infineon Developer Community
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
You can edit the source file but, each time you Build and Clean, the edited source will be over-written with new Generated Source files. You can just do Build and you're code will remain in place, but any significant changes to schematic or C functions, will cause the same effect as Build and Clean. So, your mileage may vary.
Since the default ISR has a 'callback' feature, use that instead. Here's a thread on how to do that. (Ignore the fact that the thread deals with a bootloader).
Solved: CmOStart.c -- No return exception handler -- callb... - Infineon Developer Community
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks! It helped me a lot.