How to calculate baud-rate for LCD 8080 Bus with the FlexIO

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to calculate baud-rate for LCD 8080 Bus with the FlexIO

936 Views
rickyrocky
Contributor I

Hi All,

My board is i.mxRT1064, and use 8080 16 Bit Interface for LCD display with FlexIO2.

It needs to call  FLEXIO_MCULCD_Init() in  fsl_flexio_mculcd.c to initialize flexio mcu_lcd.

I must pass config->baudRate_Bps as a parameter as below.

 

FLEXIO_MCULCD_Init(FLEXIO_MCULCD_Type *base, flexio_mculcd_config_t *config, uint32_t srcClock_Hz)

typedef struct _flexio_mculcd_config
{
    bool enable;           /*!< Enable/disable FlexIO MCULCD after configuration. */
    bool enableInDoze;     /*!< Enable/disable FlexIO operation in doze mode. */
    bool enableInDebug;    /*!< Enable/disable FlexIO operation in debug mode. */
    bool enableFastAccess; /*!< Enable/disable fast access to FlexIO registers,
                           fast access requires the FlexIO clock to be at least
                           twice the frequency of the bus clock. */
    uint32_t baudRate_Bps; /*!< Baud rate in Bps. */
} flexio_mculcd_config_t;

 

 

I have 2 questions about baudrate.

1. What is the unit of baudRate_Bps. (bit per second?, byte per second or baud per second?)

If it is "baud per second", are there any bits in a baud? And how to calculate to know the number of bits/baud?

2. How to calculate the max, min and suitable baurate with below condition:

   Flexio2 source clock: 120Mhz

   SW_PAD_CTL_PAD_GPIO_B0_00 SW PAD Control Register with SPEED field is 100Mhz

   I am a newbie, If possible, please explain in detail for clarity.

Thanks alot!

0 Kudos
5 Replies

904 Views
rickyrocky
Contributor I

Hi NXP Development Team,

Could you support me this issue?

0 Kudos

899 Views
jackking
Senior Contributor I

Sorry, I am not NXP staff, but I am using the flexiomculcd driver with 16 bit wide data bus.

I think it is as suggested by the name, bits per second. 

My config may help you, setting the speed to 20MHz (this is my understanding from the example):

#define BEAT_RATE     20000000
flexioMcuLcdConfig.baudRate_Bps = BEAT_RATE * 16;


 

0 Kudos

888 Views
rickyrocky
Contributor I

Hi @jackking 

Thanks for your concern.

My config may help you, setting the speed to 20MHz

Is there any calculate for the speed setting of 20Mhz? If has, please tell me that.

And do you know the limit of this speed?

I also looked at the NXP example, but I don't quite understand this definition name.

#define BEAT_RATE     20000000

Why is it BEAT_RATE and not BAUD_RATE?

Is there any relation between this BEAT_RATE is beat_command in AN5313 ? ( https://www.nxp.com/docs/en/application-note/AN5313.pdf

rickyrocky_0-1661240618488.png

0 Kudos

884 Views
jackking
Senior Contributor I

I assume it is called BEAT because BAUD is usually referring to a serial protocol. One BEAT in this case is the transmission of 16 bits and control lines, so it really isn’t  equivalent to a serial baud rate.

Since we are talking about a parallel data bus, the “baud” rate is actually the BEAT rate multiplied by the bus width.  This is probably because the FlexIO output could be configured as a serial protocol or a parallel protocol, but even in parallel protocol it is fed from a serial data stream into the shifters, so a baud rate makes sense for the config of the FlexIO data input.

For the speed, I configured it to match the max data rate of my display (20Mhz).  I assume it is limited by the clock config of FlexIO peripheral, but my display cannot handle any higher speed anyway.

 

 

 

0 Kudos

872 Views
rickyrocky
Contributor I

Hi @jackking 

Thank you for your interest in my question.

All that's left is how to calculate the appropriate baud rate base on pin frequency?

0 Kudos