Content originally posted in LPCWare by kaldap on Sun Apr 26 14:17:26 MST 2015
Well I did not notice this 0:)
But I finally got it working... ;-)
The root of all evil is the
Quote:
Important: If the fractional divider is active (DIVADDVAL > 0) and DLM = 0, the value of
the DLL register must be 3 or greater.
which cannot be met with the 44.2368MHz but correct frequency can be calculated using the baudrate equation.
In this case the Chip_UART_SetBaudrateFDR uses this invalid calculated value and transmission is working fine but reception is not.
So I had to double the main clock and set system divisor to 2 to get into 0-50MHz for MCU and use UART DLL=3/DLM=0 without fractional divider.
Btw Chip_UART_SetBaud has also a bug. It does not return baudrate as stated in commentary but baudrate multiplied by 16.
There should be
Quote:
return clkin / (16 * div);
.
Mentioning it here, don't know where to report LPCOpen bugs 0:)
Thanks!