Software Archive
Read-only legacy content
17061 Discussions

HSS driver problem (IXP425)

kpal
Beginner
717 Views

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.

0 Kudos
7 Replies
kpal
Beginner
717 Views
I have a board (like IXDP425)with IXP425 and Linux.
I needto 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 .. 
");

 return 1;

}

printf("HssPortInit: Init HSS Ok!
"); 

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("
"), 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.
0 Kudos
kpal
Beginner
717 Views

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?

0 Kudos
James_M_Intel1
Employee
717 Views

We don't currently have an IXP expert that monitors this forum. For IXP support I recently added this post to the web site:
http://software.intel.com/en-us/forums/showthread.php?t=58713

As more information becomes available, I'll update the page at the link above.

0 Kudos
clubjwp
Beginner
717 Views
i have faced a similar problem beacuse i had used a channelized driver. but channalized mode has not supported this mode. i also need help, please gimme the solution
JWP


0 Kudos
zhanghf
Beginner
717 Views

Quoting - clubjwp

i have faced a similar problem beacuse i had used a channelized driver. but channalized mode has not supported this mode. i also need help, please gimme the solution
JWP



I also had used a channelized driver,andI found that I can't call ixHSSACCInit () function successfully when I use . I need help.
0 Kudos
kpal
Beginner
717 Views

I solved this problem for me: i changed channalized driver and made from it packetized driver.
In packetized mode i received and send right data.

0 Kudos
pierluigi_passaro
717 Views
Quoting - kpal@mail.ru

I solved this problem for me: i changed channalized driver and made from it packetized driver.
In packetized mode i received and send right data.


What kind of corruption were you experiencing?

On my board, about every 4 seconds, I'm seeing 4 samples that should not be part of the data I'm expecting, and I'm evaluating if trying or not the packetized implementation.

Thanks
Gigi
0 Kudos
Reply