We have configured the system UART when the kernel started, but the tqimx6q development board has brought out the 5-way TTL interface of imx6q, among which uart1 and uart2 are converted to 232 interfaces. This article will configure these 5-way Uart interfaces.
DTS Configuration
Since the kernel already has the uart controller driver for imx6q, we only need to configure the pinctrl of each port. According to the schematic diagram of tqimx6q, we make the following modifications to our DTS:
...
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1_2>;
status = "okay";
};
&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2_3>;
status = "okay";
};
&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3_2>;
status = "okay";
};
&uart4 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart4_1>;
status = "okay";
};
&uart5 {
pintctrl-names = "default";
pinctrl-0 = <&pinctrl_uart5_1>;
status = "okay";
};
...
&iomuxc {
pinctrl-names = "default";
uart1 {
pinctrl_uart1_2: uart1grp-2 {
fsl,pins = <
MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA 0x1b0b1
MX6QDL_PAD_SD3_DAT6__UART1_RX_DATA 0x1b0b1
MX6QDL_PAD_EIM_D20__UART1_RTS_B 0x1b0b1
MX6QDL_PAD_EIM_D19__UART1_CTS_B 0x1b0b1
>;
};
};
uart2 {
pinctrl_uart2_3: uart2grp-3 {
fsl,pins = <
MX6QDL_PAD_EIM_D26__UART2_TX_DATA 0x1b0b1
MX6QDL_PAD_EIM_D27__UART2_RX_DATA 0x1b0b1
MX6QDL_PAD_EIM_D28__UART2_CTS_B 0x1b0b1
MX6QDL_PAD_EIM_D29__UART2_RTS_B 0x1b0b1
>;
};
};
uart3 {
pinctrl_uart3_2: uart3grp-2 {
fsl,pins = <
MX6QDL_PAD_EIM_D24__UART3_TX_DATA 0x1b0b1
MX6QDL_PAD_EIM_D25__UART3_RX_DATA 0x1b0b1
>;
};
};
uart5 {
pinctrl_uart5_1: uart5grp-1 {
fsl,pins = <
MX6QDL_PAD_KEY_COL1__UART5_TX_DATA 0x1b0b1
MX6QDL_PAD_KEY_ROW1__UART5_RX_DATA 0x1b0b1
>;
};
};
};
After the modification, recompile and burn the DTB. The new DTB can start the kernel normally.
Test Methods
There are many ways to test the serial port. You can write a special test program to test it. There are a lot of information about this on the Internet, so I won’t give examples here. This article uses a lazy way to temporarily modify bootargs in uboot to the following content:
setenv bootargs 'noinitrd console=ttymxc1,115200 root=/dev/mmcblk0p1 rw rootfstype=ext4 init=/linuxrc'
Then execute the boot command. At this time, the serial terminal connected to uart2 can see the kernel boot log, and of course, you can enter the Linux console normally. The other three serial ports are TTL. I don't have such a level conversion module, so I won't test it.
At this point, all serial ports of tqimx6q have been ported.
Previous article:i.MX6Q (TQIMX6Q/TQE9) study notes - USB HOST transplantation of the new version of BSP
Next article:i.MX6Q (TQIMX6Q/TQE9) study notes - new version of BSP KEY, LED
Recommended ReadingLatest update time:2024-11-16 08:52
- Popular Resources
- Popular amplifiers
- Siemens PLC from Beginner to Mastery with Color Illustrations (Yang Rui)
- Siemens S7-1200-PLC Programming and Application Tutorial (3rd Edition) (Edited by Shi Shouyong)
- Siemens Motion Control Technology and Engineering Applications (Tongxue, edited by Wu Xiaojun)
- Modern Compiler Principles C Language Description (Ampel)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Low-pass filter, high-pass filter, integral circuit, differential circuit
- TI C6000 Hardware Architecture Optimization Strategy
- Full of useful information! How to choose a rectifier bridge?
- Design of RFID reader system using MF RC500 reader and AT89S51 microcontroller
- [New Year's Flavor Competition] Northeast New Year's Eve Dinner is Coming
- Drum motor starting noise
- If China had not developed the Internet in the first place and instead invested in underlying development, it is estimated that China would be no less powerful than Europe and the United States now, right?
- TMS320F28335 project development record 9_28335 interrupt system
- Why is there a data document in alldatasheet when the official website doesn't have one?
- [AT-START-F403A Review] 1. Unboxing and Environment Setup