Hello.
I want to set my baudrate to 9600 and I have found a function description to set baudrate by configuring the fractional divisors found below. It provide an equation to calculate the baudrate but I'm not yet familiar with the parameters what would be the specific values to use. What value should I input with these parameters?
/*! * @brief Set baudrate by configuring the fractional dividors. * * @details Baudrate is calculated as per below equation. * * Baudrate = (UARTCLK / (nDivM + nDivN/2048)*pow(2,nOSR+2)* nDivC)). * * @param [in] hDevice Device handle obtained from adi_uart_Open(). * @param [in] nDivC Specify the "nDivC" in the above equation. * @param [in] nDivM Specify the "nDivM" in the above equation. * @param [in] nDivN Specify the "nDivN" in the above equation. * @param [in] nOSR Specify the "nOSR" " in the above equation. * * @return Status * - #ADI_UART_SUCCESS Successfully set the baudrate for the device. * - #ADI_UART_INVALID_HANDLE [D] Invalid UART device handle. * - #ADI_UART_DEVICE_IN_USE [D] Device is in use * - #ADI_UART_INVALID_PARAMETER [D] Input for baud rate values are out of range. * * @sa adi_uart_GetBaudRate() * @sa adi_uart_EnableAutobaud(); * * @note It is expected that initialization of the power management * driver is done before calling this function. * */