关于i.mx537中cs0与其他cs设备有干扰,寻求解决方法

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

关于i.mx537中cs0与其他cs设备有干扰,寻求解决方法

ソリューションへジャンプ
658件の閲覧回数
yuelu
Contributor I

关于i.mx537中cs0与其他cs设备有干扰,目前cs0连接NorFlash,C3连接FPGA,在擦写NorFlash是FPGA的值也发生改变,已经按照手册设置IOMUXC,问题还是存在。

/* Config CS0 settings for nor flash */

static void weim_cs_config(void)

{

  u32 reg;

  void __iomem *base, *iomuxc_base;

  iomuxc_base = ioremap(MX53_BASE_ADDR(IOMUXC_BASE_ADDR), SZ_4K);

  printk(KERN_INFO "iomuxc_base=0x%x\n",iomuxc_base);

  reg = readl(iomuxc_base + 0x4);

  reg &= ~0xFFF;

  reg |= 0b001001001001;

  writel(reg, (iomuxc_base + 0x4));

  iounmap(iomuxc_base);

  base=ioremap(MX53_BASE_ADDR(WEIM_BASE_ADDR), SZ_4K);

  printk(KERN_INFO "weim_base=0x%x\n",base);

  //cs0

  __raw_writel(0b01000111111100101111100000110001, base + 0x00);

  __raw_writel(0x0, base + 0x04);

  __raw_writel(0b00100000000000000111011101110111, base + 0x08);

  __raw_writel(0b00000000000000000111001101110111, base + 0x0c);

  __raw_writel(0b00111111111000111111111111111111, base + 0x10);

  __raw_writel(0x0, base + 0x14);

  //cs1

  __raw_writel(0b01000111111100101111100000110001, base + 0x18);

  __raw_writel(0x0, base + 0x1c);

  __raw_writel(0b00100000000000000111011101110111, base + 0x20);

  __raw_writel(0b00000000000000000111001101110111, base + 0x24);

  __raw_writel(0b00111111111000111111111111111111, base + 0x28);

  __raw_writel(0x0, base + 0x2c);

  //cs2

  __raw_writel(0b01000111111100101111100000110001, base + 0x30);

  __raw_writel(0x0, base + 0x34);

  __raw_writel(0b00100000000000000111011101110111, base + 0x38);

  __raw_writel(0b00000000000000000111001101110111, base + 0x3c);

  __raw_writel(0b00111111111000111111111111111111, base + 0x40);

  __raw_writel(0x0, base + 0x44);

  //cs3

  __raw_writel(0b01000111111100101111100000110001, base + 0x48);

  __raw_writel(0x0, base + 0x4c);

  __raw_writel(0b00100000000000000111011101110111, base + 0x50);

  __raw_writel(0b00000000000000000111001101110111, base + 0x54);

  __raw_writel(0b00011111111000111111111111111111, base + 0x58);

  __raw_writel(0x0, base + 0x5c);

  __raw_writel(0x00000000, (base + 0x90));

  iounmap(base);

  return;

}

ラベル(2)
0 件の賞賛
1 解決策
551件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi yue

please recheck IOMUX IOMUXC_GPR1 ADDRSn, ACT_CSn

fields. Also it may be useful to test with i.MX53 OBDS:

IMX53_QSB_OBDS "On-Board Diagnostic Suit for the i.MX53 Quick Start Board"

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX53QSB&fpsp=1&tab=Design_Tools_Tab

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
552件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi yue

please recheck IOMUX IOMUXC_GPR1 ADDRSn, ACT_CSn

fields. Also it may be useful to test with i.MX53 OBDS:

IMX53_QSB_OBDS "On-Board Diagnostic Suit for the i.MX53 Quick Start Board"

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX53QSB&fpsp=1&tab=Design_Tools_Tab

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
550件の閲覧回数
yuelu
Contributor I

谢谢,,最终发现是FPGA的片选问题,修改FPGA后问题已经解决。

0 件の賞賛