Hot!First Byte missing during SPI slave to master communication

Author
vrushali
New Member
  • Total Posts : 10
  • Reward points : 0
  • Joined: 2015/01/08 04:56:07
  • Location: 0
  • Status: offline
2017/08/12 19:36:11 (permalink)
0

First Byte missing during SPI slave to master communication

Hello all,
I am facing an issue in SPI communication, while communicating slave to master. In my application I am using PIC 33F as a master & PIC 24F as slave. Master is in SPI polling mode & Slave is SPI interrupt driven. I am facing an issue that, when master receives the data from slave my first byte is missing while receiving the data from lave to Master.
 
Please suggest any solution
 
Thank you all...
#1

3 Replies Related Threads

    qhb
    Superb Member
    • Total Posts : 6257
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: First Byte missing during SPI slave to master communication 2017/08/13 01:14:01 (permalink)
    4 (2)
    Probably a bug in your code, which you didn't post.
     
    #2
    CinziaG
    morite
    • Total Posts : 3140
    • Reward points : 0
    • Joined: 2016/12/07 14:20:36
    • Location: Wien
    • Status: offline
    Re: First Byte missing during SPI slave to master communication 2017/08/13 01:33:20 (permalink)
    0
    qhb
    Probably a bug in your code, which you didn't post.
     




    "Indeed..." (Spock) grin

    get my books!
    lulu.com search.ep?keyWords=greggio&type=
     
    #3
    andersm
    Super Member
    • Total Posts : 2258
    • Reward points : 0
    • Joined: 2012/10/07 14:57:44
    • Location: 0
    • Status: online
    Re: First Byte missing during SPI slave to master communication 2017/08/13 01:39:01 (permalink)
    3 (2)
    You didn't post any code, but I imagine your slave ISR looks like this:
    - Increase source pointer
    - Copy byte from source pointer to transmit register
     
    Do you see the problem there?
    #4
    Jump to:
    © 2017 APG vNext Commercial Version 4.5