完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
times New Roman;background-color:#cce8cf;"/>
大家好,我在做OMAP3530相关的项目,我现在遇到的问题是不知道如何调试OMAP3530ARM这一端(DSP那一端可以采用CCS加JTAG模式)有什么好的方法或者硬件么?还有如何配置一个GPIO口(比如gpio_22)为可接收输入中断,寄存器逻辑设置是什么过程?求各位给我指点下迷津。 |
|
相关推荐
10 个讨论
|
|
或者你帮我看看这篇文章问题出在哪里? All, I currently have an issue setting up an interrupt on the OMAP 3530 IVA module(a.k.a DSP) . I am trying to use GPIO 22 and 23 for the interrupt. I first configure the appropriate padconfig register to Mux_Mode_4 and input enable // gpio 22 pSTBCtx->Hardware_Context.pPadConfig->CONTROL_PADCONF_ETK_D8=(MUX_MODE_4|INPUT_ENABLE); // gpio 23 pSTBCtx->Hardware_Context.pPadConfig->CONTROL_PADCONF_ETK_D9=(MUX_MODE_4|INPUT_ENABLE); I then setup the bank 1 registers as shown below #define GPIO_22_BIT_OFFSET (1<<22) #define GPIO_23_BIT_OFFSET (1<<23) #define SCHEDULE_REQUEST GPIO_22_BIT_OFFSET #define COLLECTION_DONE GPIO_23_BIT_OFFSET pSTBCtx->Hardware_Context.pBank1->OE|=SCHEDULE_REQUEST|COLLECTION_DONE; pSTBCtx->Hardware_Context.pBank1->RISINGDETECT|=SCHEDULE_REQUEST|COLLECTION_DONE ; pSTBCtx->Hardware_Context.pBank1->SETIRQENABLE2=SCHEDULE_REQUEST ; pSTBCtx->Hardware_Context.pBank1->SETIRQENABLE2=COLLECTION_DONE ; At this point I see the following in the Bank registers. pBank1 0x48310000 OMAP_GPIO_REGS * hex NotEdited REVISION 0x00000025 REG32 hex NotEdited zzzReserved01 0x48310004 unsigned int[3] hex NotEdited SYSCONFIG 0x00000015 REG32 hex NotEdited SYSSTATUS 0x00000001 REG32 hex NotEdited IRQSTATUS1 0x00400000 REG32 hex NotEdited IRQENABLE1 0x00000000 REG32 hex NotEdited WAKEUPENABLE 0x00000000 REG32 hex NotEdited RESERVED_0024 0x00000000 REG32 hex NotEdited IRQSTATUS2 0x00400000 REG32 hex NotEdited IRQENABLE2 0x00C00000 REG32 hex NotEdited CTRL 0x00000000 REG32 hex NotEdited OE 0xFFDE3FFF REG32 hex NotEdited DATAIN 0x000100BC REG32 hex NotEdited DATAOUT 0x00010000 REG32 hex NotEdited LEVELDETECT0 0x00000000 REG32 hex NotEdited LEVELDETECT1 0x00000000 REG32 hex NotEdited RISINGDETECT 0x00C00000 REG32 hex NotEdited FALLINGDETECT 0x00000000 REG32 hex NotEdited DEBOUNCENABLE 0x00000000 REG32 hex NotEdited DEBOUNCINGTIME 0x00000000 REG32 hex NotEdited zzzReserved02 0x48310058 unsigned int[2] hex NotEdited CLEARIRQENABLE1 0x00000000 REG32 hex NotEdited SETIRQENABLE1 0x00000000 REG32 hex NotEdited zzzReserved03 0x48310068 unsigned int[2] hex NotEdited CLEARIRQENABLE2 0x00C00000 REG32 hex NotEdited SETIRQENABLE2 0x00C00000 REG32 hex NotEdited zzzReserved04 0x48310078 unsigned int[2] hex NotEdited CLEARWAKEUPENA 0x00000000 REG32 hex NotEdited SETWAKEUPENA 0x00000000 REG32 hex NotEdited zzzReserved05 0x48310088 unsigned int[2] hex NotEdited CLEARDATAOUT 0x00010000 REG32 hex NotEdited SETDATAOUT 0x00010000 REG32 hex NotEdited zzzReserved06 0x48310098 unsigned int[2] hex NotEdited As you can see the IRQSTATUS2 indicates that the GPIO 22 has triggered. I now enable the Wugen with following call #define EVENT_ID_BANK_1 73 HWI_enableWugen(EVENT_ID_BANK_1); I read the WUGEN_MEVTSET1 register below: 0xEFFFFFFF This indicates that IRQ 28 is unmasked(I think). However when I read the WUGEN_PENDEVT0 register. I get: 0x00008000 I think the value should be 0x1xxxxxxx. I then map the event to an interrupt: #define HWINT_BANK6 7 HWI_eventMap(HWINT_BANK6,EVENT_ID_BANK_1); I then Plug the ISR //The ISR needs to be plugged HWI_dispatchPlug(HWINT_BANK6,Gpio_Bank6_ISR,-1,NULL); Finally I enable the IER //The corresponding IER bit needs to be enabled. C64_enableIER(1< Any ideas? Thanks, Ram |
|
|
|
|
|
huchuanchun 发表于 2019-8-26 09:48 设置电平触发为GPIODETECT1 和GPIODETECT2 上升沿触发为RISINGDETECT 下降沿触发为FALLENDETECT 这些在Technical Reference Guide里都有的 |
|
|
|
|
|
huchuanchun 发表于 2019-8-26 10:07 兄弟,你的要求还真不少呀,还要包括GPIO的焊板, 输入输入出模式。 上升还是下降沿。 正好这做两在做这一块东西,就满足你一下吧 测试,比如选两个GPIO引脚 分别是gpio_14, gpio_15,假如我们用gpio_14来输出一个脉冲,gpio_15来检测并生成成一个上升沿触发的中断。(这个只是一个简单测试,如果你需要外面来信号,请自己保证信号已经消抖动) 1, 这两个引脚中1K电阻连接起来。(不连电阻也行,不过连电阻放心一些) 2, 用TI的PINMUX UTILITY那个工具,算出PADCONF寄存器的设置。 3, gpio_14 gpio_15都属于gpio_bank1 复位GPIO1_SYSCONFIG 48310010[1]位操作写入1 4, GPIO1_OE寄存器0x48310034, 第14位写0设gpio_14为输出,第15位写1设置gpio_15为输入。 5, 注册一个GPIO15的中断服务程序 6, GPIO_RISINGDETECT 0x48310048第15位写1,开放上升尚触发 7, 如果你是在ARM下测试,写GPIO_SETIRQENABLE1 0x48310064第15位,使能gpio_15的中断。如果是在DSP下,则写GPIO_IRQENABLE2 测试,这时你可以往GPIO_SETDATAOUT写0各1, 然后在从0变到1的过程中,就应该进行你的中断程序了. |
|
|
|
|
|
只有小组成员才能发言,加入小组>>
532 浏览 1 评论
386 浏览 1 评论
584 浏览 2 评论
NA555DR VCC最低电压需要在5V供电,为什么用3.3V供电搭了个单稳态触发器也使用正常?
831 浏览 3 评论
MSP430F249TPMR出现高温存储后失效了的情况,怎么解决?
689 浏览 1 评论
AT32F407在USART2 DMA发送数据时,接包接到了要发送的数据,程序还是处于等待传输完成的标识判断中,为什么?
137浏览 29评论
720浏览 23评论
请问下tpa3220实际测试引脚功能和官方资料不符,哪位大佬可以帮忙解答下
294浏览 20评论
请教下关于TAS5825PEVM评估模块原理图中不太明白的地方,寻求答疑
249浏览 14评论
两个TMP117传感器一个可以正常读取温度值,一个读取的值一直是0,为什么?
100浏览 13评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-1-12 02:27 , Processed in 1.183500 second(s), Total 70, Slave 61 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号