added prescaler for 16 bit pwm in LPC1347 target

Fork of mbed-dev by mbed official

Revision:
42:367d7b10ab62
Parent:
0:9b334a45a8ff
Child:
144:ef7eb2e8f9f7
--- a/targets/hal/TARGET_NXP/TARGET_LPC43XX/serial_api.c	Wed Dec 30 20:00:09 2015 +0000
+++ b/targets/hal/TARGET_NXP/TARGET_LPC43XX/serial_api.c	Mon Jan 04 09:30:11 2016 +0000
@@ -134,8 +134,7 @@
                    | 0 << 2; // Rx Line Status irq enable
     
     // set default baud rate and format
-    is_stdio_uart = (uart == STDIO_UART) ? (1) : (0);   
-    serial_baud  (obj, is_stdio_uart ? 115200 : 9600);
+    serial_baud (obj, 9600);
     serial_format(obj, 8, ParityNone, 1);
     
     // pinout the chosen uart
@@ -160,8 +159,11 @@
     uart_data[obj->index].sw_cts.pin = NC;
     serial_set_flow_control(obj, FlowControlNone, NC, NC);
     
+    is_stdio_uart = (uart == STDIO_UART) ? (1) : (0);
+
     if (is_stdio_uart) {
         stdio_uart_inited = 1;
+        serial_baud (obj, STDIO_BAUD);
         memcpy(&stdio_uart, obj, sizeof(serial_t));
     }
 }