Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    无法配置寄存器

    MR Series
    2
    7
    2007
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      WB15779898961 LV 5 last edited by

      在使用D1-H进行驱动编写时无法配置寄存器。
      28df405e-175c-4163-bd39-b00741abfed9-image.png
      50cdcac9-4f3b-49f0-b7e2-3bac1d4a8243-image.png

      W 1 Reply Last reply Reply Quote Share 0
      • W
        WB15779898961 LV 5 @WB15779898961 last edited by

        @wb15779898961 #define UART_TIMER (0x0200190c)
        #define UART_GPIO (0x02000034)
        #define UART0_BASE (0x02500400)
        #define UART0_MCR (0x02500410)
        #define UART0_FCR (0x02500408)
        #define UART0_HALT (0x025004A4)
        #define UART0_LCR (0x0250040C)
        #define UART0_DLL (0x02500400)
        #define UART0_DLH (0x02500404)
        #define UART0_USR (0x0250047C)
        #define UART0_THR (0x02500400)寄存器的地址

        whycan 1 Reply Last reply Reply Quote Share 0
        • whycan
          whycan晕哥 LV 9 @WB15779898961 last edited by

          @wb15779898961
          现在有什么问题呢?

          W 2 Replies Last reply Reply Quote Share 0
          • W
            WB15779898961 LV 5 @whycan last edited by

            @whycan 我往串口的寄存器里配置,配置不成功,打印出来全是0

            1 Reply Last reply Reply Quote Share 0
            • W
              WB15779898961 LV 5 @whycan last edited by

              @whycan 我的操作方法是,先定义了寄存器的地址,然后在init中用ioremap函数进行物理地址虚拟地址的映射,然后配置寄存器,最后打印出来的值全部是0.完全没有配置上。
              0e1b7d4d-e40d-48a9-bb3e-d27df5b639d9-image.png
              ea914756-ae1b-4590-927c-7a11926d78d9-image.png
              377a9866-a8bb-4416-ab54-5b08e95a71e8-image.png

              whycan 1 Reply Last reply Reply Quote Share 0
              • whycan
                whycan晕哥 LV 9 @WB15779898961 last edited by

                @wb15779898961

                用 devmem 命令先测试,记得kernel配置开启CONFIG_DEVMEM。

                W 1 Reply Last reply Reply Quote Share 0
                • W
                  WB15779898961 LV 5 @whycan last edited by

                  @whycan devmem是在哪吒板子的终端输入嘛,然后config_devmem在内核哪里配置。麻烦您教我一下。

                  1 Reply Last reply Reply Quote Share 0
                  • 1 / 1
                  • First post
                    Last post

                  Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

                  行为准则 | 用户协议 | 隐私权政策