TLC5973 interface with iMX8MP

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

TLC5973 interface with iMX8MP

1,631 次查看
bgaurav1718
Contributor III

Hello. 
I need to interface iMX8MP with TLC5973 for controlling RGB led. I am planning to use libgpiod library to bit-bang the gpio. But I am really skeptical regarding obtaining the desired minimum frequency of 300kHz. Since libgpiod is a user-space library, numerous layers of delays may be involved in between. One alternative I can think of is kernel-space driver but again, handling the task-preemption might be next issue.

Here is a snapshot from TLC5973's datasheet where the information regarding frequency is provided. You may refer to the attached datasheet for further information.

bgaurav1718_0-1723793799101.png

Also, here is a post about the frequency limitation of libgpiod:

bgaurav1718_1-1723793877782.png

 

 

I am looking for suggestions that I can implement to obtain the desired frequency. Also, if it is not possible, what are my possible alternatives to control RGB led through a single gpio pin?

 

TLC5973 datasheet 

RGB Led Datasheet 

标记 (2)
0 项奖励
回复
3 回复数

1,591 次查看
joanxie
NXP TechSupport
NXP TechSupport

how do you connect TLC5973 with imx8mp, and how do you set the frequency? is your code is based on nxp source code? or just a standalone gpio sample code to control TLC5973? you demands is that gpio of imx8mp can be set to 300khz?

0 项奖励
回复

1,583 次查看
bgaurav1718
Contributor III
The SDI pin of TLC is connected to one of the gpio pins.
Regrading frequency, the datasheet mentions the range between 100kHz and 3000kHz. I tried using libgpiod library but the frequency is too low.
Yes, if I can set the frequency of gpio around 300kHz, I think I can communicate with the TLC effectively.
0 项奖励
回复

1,518 次查看
joanxie
NXP TechSupport
NXP TechSupport

I missed the code you post here for the libgpiod, after you tried libgpiod(even change the code for (int i = 0; i < 20000; ++i)), what frequency do you get? what do you mean too slow?

0 项奖励
回复