The chip is PIC24FJ256GB210
The #UTXEN bit on UART #3 will not set.
It sets fine on UART #1, using the exact same instruction sequence. Same thing for UART #2.
WORKS...
096E6 204000 mov.w #0x400,0x0000 111: Mov #Uart_1_Status_Control_Pattern, W0 ;Defined in CONSTANT.INC file
096E8 881110 mov.w 0x0000,0x0222 112: Mov W0, U1STA ;ibid, page 230 Reg 17-2
FAILS...
09748 204000 mov.w #0x400,0x0000 248: Mov.W #Uart_3_Status_Control_Pattern, W0 ;Defined in CONSTANT.INC file
0974A 881290 mov.w 0x0000,0x0252 249: Mov.W W0, U3STA ;ibid, page 230, Reg 17-2
So I thought, "ah, it's a single bit that I want, and the full word move on top of all the read-only bits is somehow causing the problem. I'll just do a single bit set".
No, still won't set that bit.
FAILS...
09754 A84253 bset.b 0x0253,#2 256: Bset.W U3STA, #UTXEN ;DEBUG DEBUG DEBUG Date: 2013-02-18 Time: 11:37:07
--UPDATE--
I am able to set the bit in MpLab. What's the difference ?
I am really confused. What else could be involved here that prevents that bit from being set ?