i.MX6Q (TQIMX6Q/TQE9) Study Notes——UART Transplantation of New BSP

Publisher:变形金刚Latest update time:2020-12-30 Source: eefocusKeywords:I  TQE9  BSP Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.


Keywords:I  TQE9  BSP Reference address:i.MX6Q (TQIMX6Q/TQE9) Study Notes——UART Transplantation of New BSP

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

[bsp layer][nrf52832][nrf52840][nrf52810][nrf52820][bsp_led] LED configuration and use
Re-encapsulate a layer of functions for bsp layer functions for easy calling. void bsp_led_init(void); void bsp_led_deinit(void); void bsp_led_on(bsp_led_t ch); void bsp_led_off(bsp_led_t ch); void bsp_led_toggle(bsp_led_t ch); /******************************************************************************** * @fi
[Microcontroller]
Mouser Electronics launches sale of NXP i.MX RT117F EdgeReady crossover processor for 3D facial recognition
December 5, 2022 – Mouser Electronics is now stocking NXP Semiconductors’ i.MX RT117F crossover processor . The processor expands on NXP's renowned EdgeReady product portfolio to provide a secure, low-cost embedded 3D facial recognition solution. With this innovative solution, developers of smart locks and other acces
[Internet of Things]
Mouser Electronics launches sale of NXP i.MX RT117F EdgeReady crossover processor for 3D facial recognition
Industry cloud platforms will change the I&O operating model of Chinese enterprise IT departments
In response to the call for promoting enterprise digital transformation in the 14th Five-Year Plan, China's infrastructure and operations (I&O) leaders have begun looking for products that are more suitable for the needs of specific vertical industries based on existing general (public/private/hybrid) cloud products
[Network Communication]
Industry cloud platforms will change the I&O operating model of Chinese enterprise IT departments
RW61X: Wi-Fi 6 tri-band device in a secure i.MX RT MCU
Currently, there are at least 100 connected devices using different wireless standards in smart homes and modern buildings. NXP RW61x is a highly integrated, secure, tri-band wireless MCU that provides a powerful solution for this need through simple and efficient wireless connectivity. RW61x
[Embedded]
RW61X: Wi-Fi 6 tri-band device in a secure i.MX RT MCU
Torque motor controller troubleshooting - what to do if the three-phase output is unbalanced (I)
It is normal for the three-phase imbalance of the analog circuit. Too much difference in phase will cause imbalance. In mild case, the winding will be unstable. In severe case, the current in two phases will be large, causing heat and even burning the motor. analyze: 1. The consistency of thyristor is to
[Embedded]
Intel's 13th generation mobile Core series will include i7-13620H and i5-13420H models
Hardware leaker @momomo_us claims that Intel will launch two more mobile 13th generation Core CPUs. Intel confirmed that the Raptor Lake mobile CPU will be available before the end of this year. It looks like Intel is preparing at least four new mobile CPUs, two of which are already known. According to previous report
[Home Electronics]
Intel's 13th generation mobile Core series will include i7-13620H and i5-13420H models
[MCU framework][bsp layer][AT32F415][bsp_exti] EXTI configuration and use
7.2.1 Main features The main features of the EXTI controller are as follows: ● Each interrupt/event has independent trigger and mask ● Each interrupt line has a dedicated status bit ● Support up to 23 software interrupt/event requests ● Detect external signals with pulse widths lower than the APB2 clock width. Refer t
[Microcontroller]
[MCU framework][bsp layer][AT32F415][bsp_exti] EXTI configuration and use
Lenovo launches new monitor L24i-30: with three-sided narrow bezel design
Lenovo recently launched a new monitor - Lenovo L24i-30, which is a 23.8-inch WLED monitor with a three-sided narrow bezel design. Lenovo named it 3-side NearEdgless. Lenovo says the monitor is aimed at casual gamers and professionals, specifically those who want a monitor that can handle both entertainment and work
[Mobile phone portable]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号