Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Peripherals / Hardware
Reload this Page HSS driver problem (IXP425)
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Peripherals / Hardware Is your hardware supported? Having trouble getting some hardware working? Post here!

Reply
 
Thread Tools Display Modes
Old 05-08-2008   #1 (permalink)
KPal
Just Joined!
 
Join Date: May 2007
Posts: 20
HSS driver problem (IXP425)

Hello.

I have a problem with corrupted data, readed from /dev/hssdriver (hssdriver.ko).

I don't find any information or sample code with read function from HSS driver.

Please, help me.
KPal is offline   Reply With Quote
Old 05-08-2008   #2 (permalink)
KPal
Just Joined!
 
Join Date: May 2007
Posts: 20
I have a board (like IXDP425) with IXP425 and Linux.
I need to use HSS interface to read (and write) a data from it and then send throw Ethernet (UDP).
I use ixp400AccessLibrary-2_4, IPL_IDS_FoundationLibrary_V1_1 and BSD_IDS_HSS_Drv_V1_1.
Driver allows me to read/write in channilized mode from/to “/dev/hssdriver”.

I open and init (as showed in codelets) hssdev with 32 IX_DSP_TS_V64K timeslots
#define IX_DSP_CODELET_NUM_TIMESLOT 32
IX_HSSACC_CLK_SPEED_2048KHZ
TX: IX_HSSACC_SYNC_CLK_DIR_OUTPUT
RX: IX_HSSACC_SYNC_CLK_DIR_INPUT

fdDev = open("/dev/hssdriver", O_RDWR);
if(!fdDev)
{
perror("open:");
return 1;
}
//Initialize HSS port
res = ioctl(fdDev, IX_DSR_HSS_INIT, &hss_port_config);
if (res != 0)
{
printf("HssPortInit: Init HSS failed .. \n");
return 1;
}
printf("HssPortInit: Init HSS Ok!\n");


Then i read from HSS dev, sorted data (because circular buffer is PCM buff * 2) and send it to socket.

BYTE pcHssReadBuffRaw[32*80*2];

BYTE pcHssReadBuff[32*80*2];

btCurCycleBuf = 0;

while(1)

{

res = read(fdDev, pcHssReadBuffRaw, sizeof(pcHssReadBuffRaw));

for(int n=0; n<32; n++)

pcHssReadBuff[n*80] = pcHssReadBuffRaw[n*80*2 + btCurCycleBuf*80];

if(btCurCycleBuf==0) btCurCycleBuf=1; else btCurCycleBuf=0;

sendto(...);
}

And i find, that data readed from hssdev is not right.
I find, that when i insert in while(1) cycle printf("\n"), the situation is more better.
Also i find, that there are different situation, when i run this read programm from terminal console or from telnet 127.0.0.1.


P.S.
And also one moment: on default, the parametr in HssDriverFunc.c is #define NO_RACE_CONDITION 1

But in this case, the read function is not blocked while data from HSS are not received.

I change NO_RACE_CONDITION to 0.

Is this corrected?
KPal is offline   Reply With Quote
Old 05-30-2008   #3 (permalink)
KPal
Just Joined!
 
Join Date: May 2007
Posts: 20
This problem was beacuse i used a channilized driver for my task.
I need a channel on 32 timeslots, but channalized mode has not supported this mode.
Now i writing a HSS packetized driver.
KPal is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 06:18 AM.

Powered by vBulletin 3.6.8 ©2000 - 2007, content relevant URLs by vBSEO, Property of Core Root.

Content Relevant URLs by vBSEO 3.0.0