- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings,
I keep on losing my ISR code wirtten inside CY_ISR(intoncmp_Interrupt) function in intoncmp.c file. After writing and saving it remains there but when i upload the code or open the file some other time , code vanishes automaticaly.
How can i resolve this issue?
Thanks
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How can i resolve this issue?
Don't use this way of injecting code into generated files. When they are re-generated they might get overwritten.
There are some clearly marked placed where you may insert declarations or code. Only those areas will survive a re-buld.
There are two other ways to control the code flow for interrupt handlers:
Using the Component_StartEx() API (explained in the component's datasheet)
or using "macro callbacks" (explained in Creator Help)
I (personally) do not tamper one of the generated .c files (to be quite honest, I rarely do look into them at all). I prefer using StartEx() which allows me to delete from time to time all the generated files (keeping a workspace bundle quite small) and re-generate them at need.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are always welcome!
Be creative 😉
Bob