Content originally posted in LPCWare by JGold on Tue Sep 07 08:42:28 MST 2010
I am running the RDB1768cmsis_UART example on my board, and the initialization of UART0 works fine, but when I change the code to initialize UART2, it causes a hard fault after this line:
[LEFT][SIZE=2][SIZE=2]C Code:[/SIZE]
[SIZE=2]LPC_UART2->LCR[/SIZE][SIZE=2] = 0x83; [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// 8 bits, no Parity, 1 Stop bit, DLAB=1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f5f]
[/COLOR][/SIZE]Debugger Assembly:
0x000003ac <UART0_Init+164>: strb r2, [r3, #12][/LEFT]
[LEFT][SIZE=3]I have no problems with UART0 and 1, but keep having Hard Faultys with UART2 and 3.[/SIZE][/LEFT]
[LEFT][SIZE=3]Thoughts?[/SIZE][/LEFT]
[/SIZE]