简体   繁体   English

在MCF5282上将端口DD用作GPIO

[英]Using Port DD as GPIO on MCF5282

I've got a MCF5282 that I'm trying to use PDD4 as a GPIO on. 我有一个MCF5282,我正在尝试将PDD4用作GPIO。 In my setup code, I've got: 在我的设置代码中,我得到了:

MCF5282_GPIO_DDRDD = 0x10;    /* cs on dd4. */
MCF5282_GPIO_PORTDD = 0x10; /* active-low. */

And in my main loop, I've got: 在我的主循环中,我得到了:

MCF5282_GPIO_PORTDD = (mainloop_cnt & 0x10);

Which should give me a nice square wave on the oscilloscope, but the port doesn't seem to be doing as I say. 这应该在示波器上给我一个不错的方波,但该端口似乎没有像我所说的那样工作。 Am I missing some setup steps? 我是否缺少一些设置步骤? I can't find anything in the 5282 manual about a “Port DD pin-assignment register” to repurpose it from its “primary” role as DDATA. 我在5282手册中找不到任何有关“端口DD引脚分配寄存器”的内容,无法将其用作DDATA的“主要”角色。

Edit 2011-03-01: We never figured this out, we just used a different pin for GPIO. 编辑2011-03-01:我们从来没有想过,我们只是为GPIO使用了不同的引脚。

您可能需要清除芯片配置寄存器中的PSTEN才能禁用DDATA,请参阅《 MCF5282和MCF5216 ColdFire微控制器用户手册》第27-4页

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在起重机中使用GPIO发光LED - Glowing an LED using GPIO in craneboard 如何从ARM微控制器的GPIO端口读取值? - How to read value from GPIO port of an ARM microcontroller? 在GDB(Eclipse)中使用堆栈跟踪调试Coldfire MCF5235上的未知程序异常 - Using stack trace to debug unknown program exception on Coldfire MCF5235 in GDB (Eclipse) 关于使用Eclipse CDT在MCF5485EVB板上进行远程调试 - Regarding remote debugging on MCF5485EVB board using Eclipse CDT 是否可以使用GPIO引脚进行SPI操作? - Is it possible to do SPI operation using GPIO Pins? 如何在不使用高级库的情况下读取或写入 Raspberry Pi 4 上的 GPIO 引脚? - How do you read or write to GPIO pins on a Raspberry Pi 4 without using a high-level library? 在不使用linux API的情况下获取gpio的价值。 汇编代码中有没有办法? - Get value of a gpio without using linux API. Is there a way in assembly code? 如何使用C代码引用Arduino Uno中的特定GPIO引脚? - How to refer to a specific GPIO pin in an Arduino Uno using C code? 如何使用GPIO唤醒Android嵌入式主板暂停 - How to wake up an Android Embedded Board from Suspend by using a GPIO 如何在ARM Cortex M4 TM4C123G微控制器中使用GPIO端口控制(GPIOPCTL)? - How to use GPIO Port Control (GPIOPCTL) in ARM Cortex M4 TM4C123G microcontroller?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM