hi,all
my deivce is TMS320C6713B . I configured McBSP in SPI clock mode with 8 bit data transfer,like this
MCBSP_XCR_RMK(
MCBSP_XCR_XPHASE_SINGLE,
MCBSP_XCR_XFRLEN2_DEFAULT,
MCBSP_XCR_XWDLEN2_DEFAULT,
MCBSP_XCR_XCOMPAND_DEFAULT,
MCBSP_XCR_XFIG_DEFAULT,
MCBSP_XCR_XDATDLY_1BIT,
MCBSP_XCR_XFRLEN1_OF(0),
MCBSP_XCR_XWDLEN1_8BIT,
MCBSP_XCR_XWDREVRS_DEFAULT
my problem is how to send several datas.I know CPU or EDMA can sever the MCBSP.once i use CPU polling to send datas,like this
while(!MCBSP_xrdy(hMcbsp0)); MCBSP_write(hMcbsp0,0xaa);
while(!MCBSP_xrdy(hMcbsp0)); MCBSP_write(hMcbsp0,0x55);
while(!MCBSP_xrdy(hMcbsp0)); MCBSP_write(hMcbsp0,0x00);
in order to see the timing of the signal , i get a 'while (1) ' out of the send data code like this
while(1) {
while(!MCBSP_xrdy(hMcbsp0)); MCBSP_write(hMcbsp0,0xaa);
while(!MCBSP_xrdy(hMcbsp0)); MCBSP_write(hMcbsp0,0x55);
while(!MCBSP_xrdy(hMcbsp0)); MCBSP_write(hMcbsp0,0x00); }
however i saw the timing in oscillscope , the order of the data was wrong. they didn't go out like 'aa 55 00' .
In my programm,i want to send some datas first ,then do some other operate(like take some GPIO high or low),at last send some datas again.
so how can i send several datas like 0X41,0X86,0X00,0XC0,0X01?
I also used the two MCBSPs communicate each other,one is SPI master,the other is SPI slave. But the last data was wrong all the time .
so what should i do when i use EDMA sever MCBSP working like the above?
I would really appreciate If I get answers for the above questions!!!