PSoC4S Plus : Setup time and hold time of SCB (UART)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MiNe_85951
Level 7
Level 7
Distributor - TED (Japan)
50 likes received 500 replies posted 50 solutions authored

Dear Sirs and Madams,

 

Our customer is considering RS-232C using CY8C4126AXI-S445.

Since it is RS-232, communication uses the SCB's UART component, but there was an inquiry about the setup time and hold time of PSoC4S Plus.

When I confirm for the SCB component datasheet, there is no mention of setup time and hold time for the UART.

 

(1) Does UART have a concept of setup time and hold time?

(2) I understand that UART depends on the total error between PSoC4 Plus and connected devices.

 In the case of RS-232C, does the error include not only clock error but also driver/receiver delay?

 

Regards,

 

0 Likes
1 Solution
BiBi_1928986
Level 7
Level 7
First comment on blog 500 replies posted 250 replies posted

Hello.

(1) The UART RX pin is continuously sampled so no setup time.  The 'hold' time might be considered the duration of 1 bit-time.  But from a classical digital hardware design perspective, there is no hold time for a UART RX input.

(2) Driver/receiver only present a constant delay to the signals.  They don't lengthen/shorten the bit time.

Of more importance, is the PSoC4 internal IMO clock accuracy: +/-2%.  This on its own will throw off the intended bit rate.  The TRM and SCB component datasheets mention using an external oscillator (or crystal, depends on PSoC device family) to either trim the IMO (against WCO) or bypass IMO externally using ECO, in order to have accurate bit rates.

So depending on customer requirements, an external ECO (or WCO ) may be required in the design.

View solution in original post

5 Replies
BiBi_1928986
Level 7
Level 7
First comment on blog 500 replies posted 250 replies posted

Hello.

(1) The UART RX pin is continuously sampled so no setup time.  The 'hold' time might be considered the duration of 1 bit-time.  But from a classical digital hardware design perspective, there is no hold time for a UART RX input.

(2) Driver/receiver only present a constant delay to the signals.  They don't lengthen/shorten the bit time.

Of more importance, is the PSoC4 internal IMO clock accuracy: +/-2%.  This on its own will throw off the intended bit rate.  The TRM and SCB component datasheets mention using an external oscillator (or crystal, depends on PSoC device family) to either trim the IMO (against WCO) or bypass IMO externally using ECO, in order to have accurate bit rates.

So depending on customer requirements, an external ECO (or WCO ) may be required in the design.

MiNe_85951
Level 7
Level 7
Distributor - TED (Japan)
50 likes received 500 replies posted 50 solutions authored

BiBi-san,

 

I didn't understand whether the concept of setup time and hold time existed in UART, but your very easy-to-understand explanation helped me understand it.

 

Also, your comment about driver-induced delays was helpful.


Now that I understand that it is correct that RS-232C, like UART, is affected only by the clock error relative to the baud rate, I will discuss clock accuracy with the customer.

 

Regards,

0 Likes

@MiNe_85951 ,

Most UART designs can tolerate up to +/- 4% baud rate tolerance.   Smaller tolerance is better.

Len
"Engineering is an Art. The Art of Compromise."
MiNe_85951
Level 7
Level 7
Distributor - TED (Japan)
50 likes received 500 replies posted 50 solutions authored

Len-san,

 

It's been a while, thank you for your comment.

 

I understood that the error for UART is about 4% considering the entire data frame, but I lacked understanding of the concepts of setup time and hold time.

 

PSoC4S supports ECO in Bootloadble, but we are having this discussion because UART Bootloader does not support ECO.

 

Regards,

0 Likes
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

@MiNe_85951 -san

I'm looking at the UART (SCB) datasheet.   I see no references to required setup and hold times for the UART function.

I do see setup and hold times for the SPI configurations.

Since the UART is a (Universal ASYNCHRONOUS Receiver Transmitter), the inputs and outputs as considered asynchronous to both sides of the communication.   Therefore, setup and hold times have little to no value here.

SPI (and I2C) on the other hand require the inputs and outputs on both sides to be synchronous to the master supplied clock.  In this case setup and hold times are important.   In fact, the setup and hold times are the primary limiting factors for the maximum SPI/I2C transfer speeds.

I hope this helps.

Len
"Engineering is an Art. The Art of Compromise."