|
|
View previous topic :: View next topic |
Author |
Message |
tonymcc
Joined: 27 Jul 2010 Posts: 15 Location: Northampton UK Home of the 'Big Sheds'
|
PIC24FJ128GA010 UART2 operation |
Posted: Thu Aug 04, 2011 5:20 am |
|
|
I am using the above processor under IDE V4.119 with ICD-U64 V2.88. Due to problems with CCSLOAD and this chip (I must detail this to CCS when time allows) I am using an ICD3 and MPLAB to program the chip for standalone operation.
I have successfully built an application using UART2 receiving in interrupt (standard ISR with a circular buffer) and sending acknowledgements to a coupled processor within the main code. This has worked for days during debugging with the coupled system, with my code running in debug. My application is rather large and, without the UART2 'add-on' operates fine as standalone code, and indeed still does. It's just that as soon as I go from debug to standalone, the UART segment gives up.
I am initialising the ISR for the UART RX at several points in my code - I know once should be enough but I was getting some drop-outs, even in debug. Am I missing something in the switch from debug to standalone? As I say, the main bulk of the code works fine. I apologise for not including any sample code here but, as I say, my code is big at around 7000 lines, but I suspect that this problem is to do with something that debug 'adds' to my code, that disappears as soon as I run standalone.
Any ideas would be appreciated. I am stuck in North China at present with an excellent Company who know NOTHING about the CCS debug environment or PIC processors. help...
Cheers,
Tony McCormick |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Thu Aug 04, 2011 10:01 am |
|
|
Quote: | I am initialising the ISR for the UART RX at several points in my code - I know once should be enough but I was getting some drop-outs, even in debug. |
The observation seems to indicate, that there are bugs in your code (or compiler introduced bugs - whatsoever), you didn't yet locate. I personally prefer MPLAB and Microchip adapters for hardware debugging. I'm convinced, that any software issue can be revealed using this tools.
It's obviously more complicated to catch faults in non-debug mode, but if the problems can't be reproduced in debug mode, you should be at least able to narrow down the problem, e.g. determining the kind of failure, dumping SFR states and similar stuff. |
|
|
tonymcc
Joined: 27 Jul 2010 Posts: 15 Location: Northampton UK Home of the 'Big Sheds'
|
|
Posted: Thu Aug 04, 2011 2:25 pm |
|
|
Thanks for your contact FvM, every little helps in these remote situations. We shall try some cut-down code today to see if we an isolate the problem.
thanks again
Tonym |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|