R
R
Rudtoha2018-11-14 13:18:58
Electronics
Rudtoha, 2018-11-14 13:18:58

Card timing issue?

Hello. I am making a card reader project using LPC11u12, which has the built-in ability to communicate with a smart card via UART. To ensure the desired frequency, you need to fill in the DLL and DLM registers according to the following rule:

uint32_t divider = ((( sys_clk / ((F/D) / 2) ) / baudrate + 1) >> 1;

LPC_USART->DLM = (divider >> 8) & 0xff;	
LPC_USART->DLL = divider & 0xff;

The problem is: F / D * baudrate is the card clocking frequency, which means that they can be replaced directly by the value of this notorious frequency. BUT nothing works in this case.
uint32_t divider = (((sys_clk * 2) / Freq) + 1) >> 1;

I will say right away that the divisor values ​​are identical, but the desired frequency is not provided.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2018-11-15
@Rudtoha

BUT nothing works in this case.

Does it work with the original formula? What are the values ​​of sys_clk, F, D and baudrate?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question