View previous topic :: View next topic |
Author |
Message |
temtronic
Joined: 01 Jul 2010 Posts: 9221 Location: Greensville,Ontario
|
|
Posted: Fri Jan 13, 2012 10:54 am |
|
|
In a previous post you've got what appears to be a 32bit math operation that will disable interrupts.....that takes a LOT of time and I can see the UART buffer being overrun unless coding that we haven't seen takes care of that situation. |
|
|
cassioriguela
Joined: 25 Oct 2011 Posts: 27
|
|
Posted: Fri Jan 13, 2012 11:36 am |
|
|
temtronic wrote: | In a previous post you've got what appears to be a 32bit math operation that will disable interrupts.....that takes a LOT of time and I can see the UART buffer being overrun unless coding that we haven't seen takes care of that situation. |
Thanks for response, temtronic.
As Dennis said, For disabling interrupt it's need call a function in ISR that is called in the main code, right ? But, my code doesn't do it.
Thanks... |
|
|
Douglas Kennedy
Joined: 07 Sep 2003 Posts: 755 Location: Florida
|
|
Posted: Sat Jan 14, 2012 4:26 am |
|
|
in your ISR you have
pRxInicio = (pRxInicio + 1) % ZIGBEE_BUFFER_RX_SIZE;
looks like modulo math to me. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9221 Location: Greensville,Ontario
|
|
Posted: Sat Jan 14, 2012 6:36 am |
|
|
and if
.. ZIGBEE_BUFFER_RX_SIZE is NOT a nice binary number (8,16,32)
then the code for the % code gets real messy and TIME consuming ! |
|
|
Douglas Kennedy
Joined: 07 Sep 2003 Posts: 755 Location: Florida
|
|
Posted: Sat Jan 14, 2012 3:10 pm |
|
|
>>> Warning 216 "main.c" Line 5396(0,1): Interrupts disabled during call to prevent re-entrancy: (@PUTCHAR_3_)
>>> Warning 216 "main.c" Line 5396(0,1): Interrupts disabled during call to prevent re-entrancy: (@DIVS3232A)
Looks like a clue ... the compiler using internal functions with putchar and with divs 232 maybe a software uart with calls both in main and in an ISR.
Both pins have to be hardware uart pins for the hardware uart to be active.
If you don't want to specify the pins use UART1..UART2 etc. |
|
|
cassioriguela
Joined: 25 Oct 2011 Posts: 27
|
|
Posted: Sun Jan 15, 2012 6:24 pm |
|
|
Hello my friends,
It's working now. I was looking for instruction that was generating warnings, so I found a fprintf statement that i was using for debug. The warning disappeared when i commented this statement and It starts to work perfectly. I don't know the relationship with fprintf instruction and my ISR function. If some CCS guru, like PcmProgrammer or Ttelmah, could explain to me, I will be glad.
Thank you all !!! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19496
|
|
Posted: Mon Jan 16, 2012 2:39 am |
|
|
The hint has to be in the putchar_3 warning. Somewhere in an ISR (possibly not one you have posted), there must be another putc/printf, that is using the same port used for the debug.
Best Wishes |
|
|
cassioriguela
Joined: 25 Oct 2011 Posts: 27
|
|
Posted: Mon Jan 23, 2012 4:52 am |
|
|
Thanks for response, Ttelmah
You were right. I was using a fprintf instruction for debugging trap conflicts interrupts so it was causing the problem.
Thank you !! |
|
|
|