This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

omap 3530 mcbsp

Other Parts Discussed in Thread: OMAP3530

Hello,

I'm using the OMAP3530 board running Linux2.6  with mcbsp_test module.

when I run the insmod mcbsp_test.ko,

I want to sent  a word once, but it sent  the word  repeatedly, and I can see the DX,CLKX  and FSXsignals on scope,but  DX  always sent   word  repeatedly.,however I only sent it once,

I think that the FSX and CLKX  are  working,but  the DX's  running is out of my control.

see below the code modification ,you will  find the mistake if  is as my thought, thanks.

 

#include <plat/mcbsp.h>

 

static int _init mcbsp_init(void)

{

struct omap_mcbsp_reg_cfg mcbsp_cfg;

u32 reg,*DEVCONF;

*DEVCONF=(u32*)ioremap(CM_FCLKEN1_CORE,4);

reg=*DEVCONF;

reg|=(1<<9);

*DEVCONF=reg;//functional clock  enable

iounmap((void*)DEVCONF);

 

omap_mcbsp_set_io_type(OMAP_MCBSP1,OMAP_MCBSP_POLL_IO);

omap_mcbsp_request(OMAP_MCBSP1);

memset(&mcbsp_cfg,0.sizeof(struct omap_mcbsp_reg_cfg));

omap_mcbsp_config(OMAP_MCBSP1,&mcbsp_cfg);//mcbsp reset

 

mcbsp_cfg.spcr2|=XRST|FRST|GRST|XINTM(2);//TX ENABLE

mcbsp_cfg.xcr1|=XWDLEN1(5)|XFRLEN1(0);//TX WORD

mcbsp_cfg.srgr|=CLKGDV(80)|FWID(0);//SRG CLOCK divide

mcbsp_cfg.srgr2|=FSGM|FPER(0x1f);

mcbsp_cfg.pcr0|=CLKXM|CLKRM|FSXM|FSRM|FSXP|FSRP|CLKXP|CLKRP;//TX MASTER

omap_mcbsp_config(OMAP_MCBSP1,&mcbsp_cfg);

 

*DEVCONF=(u32*)ioremap(MCBSPLP_DXR_REG,4);

*DEVCONF=0x5;//send a date

iounmap((void*)DEVCONF);

 

register_chrdev(192,"mcbsp",&mcbsp_fops);

return 0;

}