select can write failure

Help
sz.tt
2012-03-02
2012-10-23
  • sz.tt

    sz.tt - 2012-03-02

    My device is SJA1000, CPC-PCI, Driver version is 3.5.7 svn 80, Linux 2.6.31
    Before sending the can message, my app check if the write operation available
    by calling select func. Most of the time, it works well. But sometimes the
    select function always return 0, so the app can't send the message anymore. So
    I dump the status of the driver, it displayed
    Baud: 1000, St 12, EWL: 96, Ecode 0
    RX: Err 0, Size 256, Used:0
    TX: Err 0, Size: 256, Used:1
    No error happened, but exists a message in the TxFifo, and no one handle this
    message. No transmit interrupt.
    How this situation happened? Any ideas? Thanks!

     
  • Heinz-Jürgen Oertel

    sparkspark
    I have no idea what happens here. I normally send the frame by calling write
    and handle the fifo full condition.
    How are you using select to check if the tx fifo is free?
    Can you use the ioctl(.., status, ...) to check if the tx fifo is free?

     
  • sz.tt

    sz.tt - 2012-03-04

    You are right, Many thanks!

     
  • Heinz-Jürgen Oertel

    but anyway, what you described might be an failure.
    Heinz

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks