Pl022 debugging memo

Source: Internet
Author: User

Remember to set the address 0x67800030 to 17th location 1. The purpose is to enable the internal power supply of the chip of the gpio (data cable, clock line, and gpio power supply corresponding to the chip line selection) Where spi1 is located. This power supply is called vdd_nfs. Note that the power supply on the DVB board of V2 can be directly provided through the patch cord jp12, so if the patch cord is directly provided by the external side with a voltage of 1 V8, then spi1 can also be used.

The above problem is found because in the test, spi1 is always found to have no CLK output, and other data lines have no signal. When the register corresponding to the spi1 controller is modified, it is found that the value of the Register changes normally. Therefore, it is concluded that the spi1 controller itself is working normally, but its corresponding gpio is not pulled. However, the gpio function configuration is incorrect. However, after checking the relevant registers configured by the gpio function, it is found that the selection of these gpio functions is normal. Then, you can determine whether the hardware of these gpios is normal by configuring these gpio functions as function 1, that is, common gpio, and then configuring it as the output direction, then set the relevant register to make it pull high and low, and found that it did not move. In this case, it seems that gpio hardware is faulty. However, during the gpio test, these gpios are normal. Therefore, it is certain that I have some problems with gpio configuration. Another colleague specialized in gpio testing. After communicating with him, he pointed out which group of gpio is used by spi1 is not powered. Solve the problem!

By the way, you can select and configure gpio functions.

Each 16 gpios is divided into one group. Assume that you want to configure gpio_70, then divide 70 by 16, and the operator is more than 4 6. Therefore, the gpio is in the fourth group, and the Register offset in the group is 6, that is, 6th bits.

Each gpio group contains 80 32bit registers. Assume that the registers corresponding to gpio start with the register 0x6e000000, that is, the first group starts with 0x6e000080, the second group starts with 0x6e000100, the third group starts with 0x6e000180, and the fourth group starts with 0x6e000200.

Select the gpio function at 0x6f000000 (see The GPD tab ). The vast majority of gpios can be configured with 4 features.

For the gpio_70 function, select two bits in the 0x6f000084 register [27:26.

After the function Selection is complete (Here we select the first function, that is, the gpio function, so that we need the second step)

Step 2: Configure gpio

Direction: Set the 6th bits of the register 0x6e000200 to 1 to indicate the output.

Mask: Set the 6th-bit value of register 0x6e000204 to 1. This is the mask.

Pull height: Set the 6th bits of the register 0x6e000208 to 1, which indicates the pull height.

Finished.

[] Of 0x67800040 is set to 1. You can configure the vio voltage of the chip to 3.3 V.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.