AnsweredAssumed Answered

HOW TO GET WEIM 32BIT DATA IN MX51

Question asked by Arun kumar on Jun 7, 2016
Latest reply on Jun 9, 2016 by Arun kumar

hi eveyone,

I am using i.mx51 processor connected to FPGA through EMI bus. I want to read and write 32bit data from the FPGA. But Whenever i am going to read, i am getting only 16bit word. Right now i am using multiplexed asynchronous mode  to get 32bit word data. The Registers for configuration is all changed to 32bit. Please see the below confgurations and suggest me anyone, how to get 32bit data from EMI bus.

 

#define CSGCR1    0x00

#define CSGCR2    0x04

#define CSRCR1    0x08

#define CSRCR2    0x0C

#define CSWCR1    0x10

 

#define WEIM_CS5_OFFSET 0X78

 

__raw_writel(0x00F33089, (u32)weim_vbaddr + WEIM_CS5_OFFSET + CSGCR1);

__raw_writel(0x00000002, (u32)weim_vbaddr + WEIM_CS5_OFFSET + CSGCR2);

__raw_writel(0x32260000, (u32)weim_vbaddr + WEIM_CS5_OFFSET + CSRCR1);

__raw_writel(0, (u32)weim_vbaddr + WEIM_CS5_OFFSET + CSRCR2);

__raw_writel(0x72080F00, (u32)weim_vbaddr + WEIM_CS5_OFFSET + CSWCR1);


Read function in driver
static int mxc_emi_read(struct file *file, int *buf,size_t count, loff_t *f_pos)

{

    printk("Emi chipselect5 Read called\n");

    u32 temp;

    u32 address = buf[0];

    temp  =  readl(cs5addr+address);

    printk(KERN_INFO "Data read inside kernel %x\n",temp);

    return temp;

}

 

What changes have to made to read the 32bit data from FPGA ?

Outcomes