1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
“GPIOXButoNo.IIT”函数中是否存在bug?
代码是: 返回WICEDEGGPIOIOIIT(Button & Gt;GPIO,(Button & Gt;Durial==WieDeIdActhvithHig))?输入: 如果一个按钮被设置为低电平,使得GPIO连接到地上,它被按下了,难道微电路不应该提供一个上拉,恢复输入到非激活状态吗?活动高:反之亦然:GPIO在按钮被按下时变高,然后当按钮被释放时需要下拉以将其恢复为非活动状态。 当尝试在SDK 5.1中设置ButnOnMyMeor时,我遇到了这个问题。 以上来自于百度翻译 以下为原文 Is there a bug in the `gpio_button_init` function? The code is: return wiced_gpio_init( button->gpio, ( button->polarity == WICED_ACTIVE_HIGH )? INPUT_PULL_UP: INPUT_PULL_DOWN ); If a button is set up as active-low, so that the GPIO is connected to ground went it is pressed, shouldn't the micro therefor provide a pull UP, to restore the input to the non-active state? And vice versa for active-high: GPIO goes high while button is pressed, then a pull DOWN is needed to return it to inactive when the button is released. I ran into this when trying to set up the button_manager in SDK 5.1 . |
|
相关推荐
3个回答
|
|
你好,安得烈:
我会调查这个问题,顺便问一下,当你配置GPIO函数时,你会遇到一些问题吗? 你现在使用的是哪个EVB或芯片? 以上来自于百度翻译 以下为原文 Hi Andrew: I will look into this case, by the way do you meet some issues when you configure the GPIO functions? and which evb or chip you are using now? |
|
|
|
我看到的问题是,片上PU/PD没有被正确激活。 修补这条线: 返回WICEDEGGPIOIOIIT(Button & Gt;GPIO,(Button & Gt;Durial==WieDeIdActhvithHig))?输入:PulthpulLyUp; GPIOXButnOnEnable()和WieDig-GPIOIN IpPuthGET()的相应更改使我的配置与ButnOnMyMeor一样工作。芯片上的PU被打开,IRQ被调用,点击/保持/双击事件是可检测的。 我希望我没有错过一些明显的东西,这个逻辑看起来是颠倒的,但始终通过GPIOXBut纽库。 我不使用EVM,我正在定制设计的硬件(产品原型)。微型是STM32 F4。 我有一个单独的但后续的问题是按钮管理器在一个活跃的低按钮存在一定的噪声或缓慢上升的边缘时表现得很好,并且检测0或1ms持续时间事件,而不是一个限定的“点击”事件。如果有机会,我会跟进范围跟踪。 以上来自于百度翻译 以下为原文 The issue that I was seeing was that that the on-chip PU/PD was not being activated correctly. Patching this line to: return wiced_gpio_init( button->gpio, ( button->polarity == WICED_ACTIVE_HIGH )? INPUT_PULL_DOWN: INPUT_PULL_UP ); and corresponding changes in gpio_button_enable() and wiced_gpio_input_get() make my configuration with button_manager work as expected. On chip PU is switched on, IRQ's are called, and click/hold/double click events are detectable. I hope I am not missing something obvious; this logic just appears to be inverted, but consistently through the gpio_button library. I'm not using an EVM, I am working on custom-designed hardware (product prototype). The micro is STM32F4. A separate but follow-up issue I have is that button manager does perform too well in the presence of certain noise or slow rising edges for an active-low button, and detects 0 or 1ms duration events rather than a qualifying "click" event. I will follow up with scope traces, if I get a chance. |
|
|
|
是的,这是一个错误
我提出了一个内部案例。 艾伦 以上来自于百度翻译 以下为原文 Yes that is a bug I filed an internal case. Alan |
|
|
|
只有小组成员才能发言,加入小组>>
754个成员聚集在这个小组
加入小组2102 浏览 1 评论
1848 浏览 1 评论
3666 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1783 浏览 6 评论
1533 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
565浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
419浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
434浏览 2评论
380浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
912浏览 2评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-22 13:28 , Processed in 0.887543 second(s), Total 79, Slave 63 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号