Hello! I'm try to implement connection between LPC11u12 and smart card via UART. To provide the right clock to the smart card I should to fill UART DLL and DLM registers this way:
uint32_t divider = ((( sys_clk / ((scale) / 2) ) / baudrate) + 1) >> 1;
LPC_USART->DLM = (divider >> 8) & 0xff;
LPC_USART->DLL = divider & 0xff;
It is work correctly. But (scale/2)/baudrate it is a card clock and initialy equal to 3.57MHz. When I change this equation to value in Hz, it doesnt work. It is stgange, bacause value of divider with equation and value are absolutely the same! Where is a mistake??
P.S. I saw the LPC example