rt1052 flexio_spi max speed can't over 40Mhz

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

rt1052 flexio_spi max speed can't over 40Mhz

2,062 次查看
oneofzero
Contributor I

 flexio_spi_master_config_t userConfig;
FLEXIO_SPI_MasterGetDefaultConfig(&userConfig);
userConfig.baudRate_Bps = 60*1000*1000;

I set it over 40Mhz not effect ,it always 40Mhz 。Is this  max speed? or other problem?

0 项奖励
回复
3 回复数

2,045 次查看
RaRo
NXP TechSupport
NXP TechSupport

Hello @oneofzero,

Could you please tell us what FLEXIO clock frequency value are you using?

Also, are you looking to an example as a guide for your development? If so, could you please tell us which one? Otherwise, it could be useful to take a look to the RT1052's SDK flexio_spi examples.

Warm regards, Raul.

0 项奖励
回复

2,027 次查看
oneofzero
Contributor I

I am currently driving a ST7789 SPI LCD, with a resolution of 320X240X16bit. It takes about 30ms to refresh a screen with spi, so the SPI speed is only 40Mhz.

I modified the code according to the example of “boards\evkbimxrt1050\driver_examples\flexio\spi\edma_lpspi_transfer\master”

image.png

I changed MASTER_FLEXIO_SPI_CLOCK_PRE_DIVIDER to 1 MASTER_FLEXIO_SPI_CLOCK_DIVIDER also changed to 1

MASTER_FLEXIO_SPI_CLOCK_FREQUENCY is now 120X1000X1000hz

I also tried to make this MASTER_FLEXIO_SPI_CLOCK_FREQUENCY bigger, but it didn’t work.

The baudRate_Bps of flexio_spi_master_config_t can’t break through the speed of 40Mhz. No matter what value I change it to.

 

I have tested this LCD on the ESP32-S3, and it can run stably at 80MHz. The refresh rate can reach up to 60fps.

0 项奖励
回复

2,000 次查看
RaRo
NXP TechSupport
NXP TechSupport

Hello @oneofzero,

As mentioned in the i.MX RT1050 Processor Reference Manual. Chapter 49 Flexible I/O (FlexIO): the maximum baud rate value you could have for SPI Master is: MASTER_FLEXIO_SPI_CLOCK_FREQUENCY / 4.

RaRo_0-1702048926097.png

[Section 49.4.3. SPI Master]

Nonetheless, the maximum MASTER_FLEXIO_SPI_CLOCK FREQUENCY that that the xRT1050 RM is 120MHz:

RaRo_1-1702048926099.png

[Table 14-5. System Clock Frequency Values]

So, you might not be able to reach a higher baud rate/frequency value than 40MHz, since the guaranteed value is from 30MHz.

Warm regards, Raul.

0 项奖励
回复