TI中文支持网
TI专业的中文技术问题咨询交流网站

am335x gpmc FPGA通信问题

通信方式:异步,地址数据复用,虽然设定是使用24根线,但使用低16bit地址,8bit数据

问题:发现写的时候波形不对,地址和数据都不对

以下是我的config配置:

#define STNOR_GPMC_CONFIG1 0x00000200#define STNOR_GPMC_CONFIG2 0x00070900#define STNOR_GPMC_CONFIG3 0x00020201#define STNOR_GPMC_CONFIG4 0x06010701#define STNOR_GPMC_CONFIG5 0x0009070C#define STNOR_GPMC_CONFIG6 0x08000000

在cs_request后,读出来的config7是0x00000f41

pin config:

{"gpmc_ad0.gpmc_ad0", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad1.gpmc_ad1", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad2.gpmc_ad2", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad3.gpmc_ad3", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad4.gpmc_ad4", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad5.gpmc_ad5", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad6.gpmc_ad6", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad7.gpmc_ad7", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad8.gpmc_ad8", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad9.gpmc_ad9", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad10.gpmc_ad10", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad11.gpmc_ad11", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad12.gpmc_ad12", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad13.gpmc_ad13", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad14.gpmc_ad14", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_ad15.gpmc_ad15", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_a0.gpmc_a0", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA},
{"gpmc_a1.gpmc_a1", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA},
{"gpmc_a2.gpmc_a2", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA},
{"gpmc_a3.gpmc_a3", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA},
{"gpmc_a4.gpmc_a4", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA},
{"gpmc_a5.gpmc_a5", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA},
{"gpmc_a6.gpmc_a6", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA},
{"gpmc_a7.gpmc_a7", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA},
{"gpmc_a8.gpmc_a8", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA},
{"gpmc_wait3.gpmc_wait3", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_wpn.gpmc_wpn", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_csn3.gpmc_csn3", OMAP_MUX_MODE0 | AM33XX_PULL_DISA},
{"gpmc_advn_ale.gpmc_advn_ale", OMAP_MUX_MODE0 | AM33XX_PULL_DISA},
{"gpmc_oen_ren.gpmc_oen_ren", OMAP_MUX_MODE0 | AM33XX_PULL_DISA},
{"gpmc_wen.gpmc_wen", OMAP_MUX_MODE0 | AM33XX_PULL_DISA},

在执行echo指令的时候波形抓出来:

好像上传不了图片

qingzhu wei:

有人在吗?可否指导下?

govin huang:

我的电脑无法发新贴,只能在这里请教了!

AM335X 是否可以将nand配置在CS0使用0x10000000地址256M宽度!然后配置访问FPGA的CS1~CS3配置在0x08000000这边的地址!

//CS1 HWREG(GPMC_CONFIG_REGS + 0xA8) = 0x00000000; HWREG(GPMC_CONFIG_REGS + 0x90) = 0x28001200; HWREG(GPMC_CONFIG_REGS + 0x94) = 0x000f1001; HWREG(GPMC_CONFIG_REGS + 0x98) = 0x22060411; HWREG(GPMC_CONFIG_REGS + 0x9C) = 0x0e097018; HWREG(GPMC_CONFIG_REGS + 0xA0) = 0x000d1010; HWREG(GPMC_CONFIG_REGS + 0xA4) = 0x09070000; HWREG(GPMC_CONFIG_REGS + 0xA8) = 0x00000F48; //CS2 HWREG(GPMC_CONFIG_REGS + 0xD8) = 0x00000000; HWREG(GPMC_CONFIG_REGS + 0xC0) = 0x28001200; HWREG(GPMC_CONFIG_REGS + 0xC4) = 0x000f1001; HWREG(GPMC_CONFIG_REGS + 0xC8) = 0x22060411; HWREG(GPMC_CONFIG_REGS + 0xCC) = 0x0e097018; HWREG(GPMC_CONFIG_REGS + 0xD0) = 0x000d1010; HWREG(GPMC_CONFIG_REGS + 0xD4) = 0x09070000; HWREG(GPMC_CONFIG_REGS + 0xD8) = 0x00000F49; //CS3 HWREG(GPMC_CONFIG_REGS + 0x108) = 0x00000000; HWREG(GPMC_CONFIG_REGS + 0xF0) = 0x28001200; HWREG(GPMC_CONFIG_REGS + 0xF4) = 0x000f1001; HWREG(GPMC_CONFIG_REGS + 0xF8) = 0x22060411; HWREG(GPMC_CONFIG_REGS + 0xFC) = 0x0e097018; HWREG(GPMC_CONFIG_REGS + 0x100) = 0x000d1010; HWREG(GPMC_CONFIG_REGS + 0x104) = 0x09070000; HWREG(GPMC_CONFIG_REGS + 0x108) = 0x00000F4a;

我配置完这个后,访问0x08000000~0x0affffff中任意个地址都出现地址异常!直接就死掉!

跟踪后都是跳到了

LDR PC,Reset_Addr ; Reset LDR PC,Undefined_Addr ; Undefined instructions LDR PC,SWI_Addr ; Software interrupt (SWI/SVC) LDR PC,Prefetch_Addr ; Prefetch abort LDR PC,Abort_Addr ; Data abort LDR PC,Unused_Addr ; RESERVED LDR PC,IRQ_Addr ; IRQ LDR PC,FIQ_Addr ; FIQ

中的LDR PC,Abort_Addr ; Data abort这里?

请求解答::::是不能这样配置还是我什么地方有问题???????

govin huang:

{"gpmc_a0.gpmc_a0", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA},{"gpmc_a1.gpmc_a1", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA},{"gpmc_a2.gpmc_a2", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA},{"gpmc_a3.gpmc_a3", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA},{"gpmc_a4.gpmc_a4", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA},{"gpmc_a5.gpmc_a5", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA},{"gpmc_a6.gpmc_a6", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA},{"gpmc_a7.gpmc_a7", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA},{"gpmc_a8.gpmc_a8", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA},

应该配置成OMAP_MUX_MODE4才是地址复用16~24吧!!

govin huang:

读出来的config7是0x00000f41配置,你访问的是什么地址?访问0x01000000~地址吗?

qingzhu wei:

回复 govin huang:

govin huang

读出来的config7是0x00000f41配置,你访问的是什么地址?访问0x01000000~地址吗?

govin huang:

回复 govin huang:

已经解决,mmu地址配错了

qingzhu wei:

回复 govin huang:

govin huang

已经解决,mmu地址配错了

赞(0)
未经允许不得转载:TI中文支持网 » am335x gpmc FPGA通信问题
分享到: 更多 (0)