Murph- / gentlenav

Automatically exported from code.google.com/p/gentlenav
0 stars 0 forks source link

UART1 ISR optimization #39

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

In the function _U1TXInterrupt(void)
change:

<code>
if (txchar) { U1TXREG = txchar; }
<\code>

to:

<code>
while (txchar && (U1STAbits.UTXBF == 0)) {
U1TXREG = txchar;
txchar = udb_serial_callback_get_char_to_send(); }
<\code>

Also, in the function udb_init_USART(void)
change:

<code>
U1STA  = 0b0000010100010000;
<\code>

to:

<code>
U1STA  = 0b1000010100010000 ;
<\code>

This is setting the UTXISEL bit so it would be the same as simply adding the 
line U1STAbits.UTXISEL=1; after the current r713 version.

What is the expected output? What do you see instead?
same thing but lower cpu usage

What version of the product are you using? On what operating system?
r713

Original issue reported on code.google.com by magicrub on 29 Nov 2010 at 6:33

GoogleCodeExporter commented 9 years ago
Doh! It somehow got labeled as a "defect" instead of "enhancement". I can't 
figure out how to change it, if anyone knows could they do it for me pretty 
please? Thanks.

Original comment by magicrub on 29 Nov 2010 at 6:35

GoogleCodeExporter commented 9 years ago
Is this relevant any more? To review.

Original comment by uavflightdirector on 31 Jul 2013 at 8:24

GoogleCodeExporter commented 9 years ago
doubt it, I'll check into it tonight.

Original comment by magicrub on 31 Jul 2013 at 9:32

GoogleCodeExporter commented 9 years ago
Changed to enhancement.
To change labels you need to delete the original

Original comment by uavflightdirector on 3 Aug 2013 at 7:00

GoogleCodeExporter commented 9 years ago
doesn't look relevant to v4_x or _mw4

Original comment by kd0...@gmail.com on 3 Aug 2013 at 5:50