Quantcast
Channel: Renesas Synergy Platform
Viewing all articles
Browse latest Browse all 23645

Forum Post: RE: SPI sequence ending prematurely

$
0
0
I'm setting breakpoint after the first write, so that is not the issue.  But I agree, I should loop until I receive SUCCESS before proceeding. I realized the problem last night.   My display is expecting 0's - PIXEL OFF - and 1's - PIXEL ON - and not ascii values, so I am sending terminating 0's (0x00) as part of the bit stream.   This is what the write api description says.   Name: (* spi_api_t::write) Prototype: ssp_err_t (* spi_api_t::write) (spi_ctrl_t *const p_ctrl, void const *p_src, uint32_t const length, spi_bit_width_t const bit_width) Description: Transmit data to an SPI device. Implemented as R_RSPI_Write()R_SCI_SSPI_Write() p_ctrl Pointer to the control block for the channel. p_src Pointer to a source data buffer from which data will be transmitted to a SPI device. The argument must not be NULL. length Number of units of data to be transferred (unit size specified by the bit_width). bit_width Data bit width to be transferred. I am interpreting this (correctly?) is that it can't have any NULL terminating strings within the bit stream.    But the question is, why bother specifying a length parameter, if you can simply terminate the sequence with a 0x00?   Are there any drivers that don't require ascii transmission, or do I need to write my own driver?  Thanks

Viewing all articles
Browse latest Browse all 23645

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>