KenMacfarlane
Joined: 20 Sep 2005 Posts: 23 Location: Glasgow, Scotland, UK
|
Can't get #device HIGH_INTS = TRUE to compile |
Posted: Tue Mar 07, 2006 3:46 am |
|
|
I've got dual com port circular buffer based code, which I thought was working, but I'm finding that rda2 loses chars when rda is busy receiving a 6 char packet. I've been trying to promote rda2 to be the sole high priority interrupt (18f6621, pcwh v3.235) but to no avail - the compiler won't take it.
Shouldn't it accept these line? Excuse me for not posting the full application - I'll cut it down to manageable example code.
In summary, my code does this:
#include "18f6621.h"
#device HIGH_INTS = TRUE // doesn't work - "cannot change device type this far into code - but this is line 4 of main.c (1&2 are version tracking comments), before I "#include" any of my other files
& before the rda2 isr:
#int_rda2 HIGH // compiler complains invalid interrupt directive requires #device HIGH_INTS = TRUE
I'm deliberately not using the latest version because there's a problem with fputc hanging while sending out a 10 char string in v3.242 (and CCS have promised a fix: see thread 26107) - however I have tried this on v3.242, and it didn't work there either.
To forestall the obvious questions, yes, I have looked at ex_sisr.c (my code was based on it); & I have tried #priority, and it made no difference: #priority seems to be insufficent because it seems to only arbitrates as to which int gets to run when 2 are pending when e.g. GIE get re-enabled, by installing CCS interrupt arbitration routine, the code of which is hidden : please correct me if I'm wrong!
Thanks, experts & CCS...this forum is the way to do support & a wonderful resource. |
|
KenMacfarlane
Joined: 20 Sep 2005 Posts: 23 Location: Glasgow, Scotland, UK
|
Sorted my own problem? |
Posted: Tue Mar 07, 2006 4:01 am |
|
|
This compiles:
Code: |
// NoddyTester.c
#include "18f6621.h"
#device *=16 ICD=TRUE HIGH_INTS=TRUE
#int_rda2 HIGHvoid PerBarCodeChar_ISR(void){} // rcv'd char ISR for PIN_G2
main(){}
|
i.e. solution is that HIGH_INTS=TRUE doesn't like embedded spaces - my excuse is that I lifted the syntax from someone else's post & that the CCS manual is pretty light sparse about this. Sorry everybody! |
|