This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Why does MOSI stay high afther sending last byte with a value higher than Decimal 127. Binear (0111 1111)

I get that is has to do with something around the MSB. But I cant seem to find a way to prevent this. No i can not send a byte 0x00 since this will trigger certaint behavior of the slave. How can I prevent it from staying high while also sending the data I want and only the data I want? Would love to hear from you guys. Seems to be a 3 year old problem with out a propper solution. devzone.nordicsemi.com/.../nrf52832-why-does-mosi-stay-high-after-transmitting-any-byte-7f

Parents Reply Children
  • This may not work, but it is worth a quick try. When the buffer Tx stream is exhausted (after 5th byte in this case) the output switches to the Tx idle stream defined by ORC. If Tx length is the same or greater than Rx length then this idle byte never actually gets sent, but it may be preloaded and therefore influence the end state of MOSI..

    Change this value from 0xFF to 0x7F or 0x00 to test.

    // <o> NRFX_SPIS_DEFAULT_ORC - SPIS default ORC character  <0-255> 
    #ifndef NRFX_SPIS_DEFAULT_ORC
    #define NRFX_SPIS_DEFAULT_ORC 0 //255
    #endif

Related