Attachments are accessible only for community members.
Jan 03, 2013
01:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 03, 2013
01:00 PM
3 Replies
Anonymous
Not applicable
Jan 03, 2013
07:04 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 03, 2013
07:04 PM
Global variables are convenient but, Software engineering said, Should be decrease using of Global variables. I'm used to do this strategy. In case of PSoC1 Some additional considerations are needed, I think. 1) In interruption handler Have to use PAGE0 RAM area (it's better). And use VOLATILE statement with global variable. 2) If need to keeping value Use a static variable as possible, It behaves like a local variable. +++ Happy New Year for all Pal +++
Attachments are accessible only for community members.
Jan 04, 2013
06:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 04, 2013
06:13 AM
Jan 04, 2013
07:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 04, 2013
07:38 AM
The linked document concerning performance of local variables does not take into account that we here with PSoCs have different architectures. Take the PSoC3 where we have a lot (more than 2) of different memory areas with different access models and the situation that the stack is not usable for local var allocation. Here we have (again: "normally") no difference between global and local vars. Looking at the PSoC1 core which comes with just two registers there IS a difference between the performance of bank0-, bankN vars and locals. PSoC5 has got a modern core where there are no differences between memory accesses on the stack or in SRam.
Bob