UART does not work when CSD is used

Version 1


       Question: I have an UART and CSD in my project.  When I start CSD, the UART stops working.  What could be the reason?

    Response: In 21x34 & 24x94 family of devices, CSD user module uses clock dividers (VC1, VC2 & VC3).

    In 21x34, CSD uses VC1, VC2 & VC3 clock dividers. Values of these dividers depend on scanning & resolution set by user (Refer CSD datasheet for more information).

    If UART user module uses clock divider for baud rate generation, baud rate may change since CSD overwrites the divider values.

    A few options to implement CSD + UART in 21x34:

    Option 1: Use CSDADC (CSDADC with VC2 clock source), Counter16, TX8SW & RX8 user modules.

    Out of four available digital blocks, CSDADC uses one digital block, Counter16 uses two digital blocks & RX8 uses one digital block.TX8SW does not use any digital block (Software implementation).

    Counter16 is a 16 bit counter which can be used for baud rate generation. Input clock to Counter16 can be 24MHz SysClk & its period can be set to get desired baud rate which is independent of CSDADC configuration.

    TX8SW is used for transmission while RX8 is used for reception of data.

    Option-2: If the desired baud rate is 19.2kbps or above, you can also use an 8 bit counter for baud rate generation, an an UART user module with CSDADC.  8 bit counter uses 1 digital block and UART uses 2 digital blocks.

    Option-3: If the scan speed is going to be constant in the project, refer CSDADC user module data sheet and find out the value of VC1 divider.  Now use VC1 as the source for the counter8 for baud rate generation.  This way, baud rate of less than 19.2kbps can also be used.

    CSD and UART in CY8C24x94:

    Option-1: In CY8C24x94, CSD uses ony VC1 divider. Depending on scanning speed set by the user VC1 can vary between 2, 4 & 8.

    Now the user can use VC2 & VC3 clock dividers for baud rate generation by setting their values according to the VC1 clock divider that is set by the CSD.

    Option-2: Another way is to use CSD with PRS8 as clock source, which uses only one digital block, along with Counter16, TX8SW & RX8 user modules.  Or for baud rates 19.2kbps and above, Counter8 and UART.