[Default] On Tue, 24 Sep 2019 09:30:15 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Hanah anees
>i wrote the code using spidev on PocketBeagle and can see 9bit data and
>clock going out and messages seems to be correct.
>I think the driver puts only 9 bits when we define as 2 byte word and give
>instruction to send 9 bit spi. The TI AM335X MCspi controller does have
>control registers to load and send 9bit "data". For me the display is still
>not working and I think its something else. but if anyone has done 9 bit
>code, i will like to compare. I will post my code soon for others as well
If you haven't, download the TRM for the chip (I'm not certain what
document that would be for a PocketBeagle. For the BeagleBone Black, it is
which is the document I'll be quoting from.
First surprise -- the BBB chip DOES support single-data pin mode! (Page
4887 of SPRUH73P)
184.108.40.206 Single Data Pin Interface Mode
In single data pin interface mode, under software control, a single data
line is used to alternatively transmit and receive data (Half duplex
McSPI has a unified SPI port control: SPIDAT [1:0] can be independently
configured as receive or transmit lines. The user has the responsibility to
program which data line to use and in which direction (receive or
transmit), according to the external slave/master connection.
As for a full duplex transmission, the serial clock (SPICLK) synchronizes
shifting and sampling of the information on the single serial data line.
The examples assume a transmit-only or receive-only system. Using a
command to read the display may require some interesting tricks -- namely
after the command is sent, changing the pin direction, and then specifying
a read operation.
Pages 4895-4896 cover the transmit-only/receive-only functions. Page
4897 mentions constraints for switching direction (mainly, keeping the
enable line active, and only changing SPI parameters [direction] between
AND on page 4898 is what you probably really need to read...
220.127.116.11 Start Bit Mode
The purpose of the start bit mode is to add an extended bit before the SPI
word transmission specified by word length WL. This feature is only
available in master mode.
This mode is programmable per channel using the start bit enable (SBE) bit
of the register MCSPI_CH(i)CONF).
The polarity of the extended bit is programmable per channel and it
indicates whether the next SPI word must be handled as a command when SBPOL
is cleared to 0 or as a data or a parameter when SBPOL is set to 1.
Moreover start bit polarity SBPOL can be changed dynamically during start
bit mode transfer without disabling the channel for reconfiguration, in
this case you have the responsibility to configure the SBPOL bit before
writing the SPI word to be transmitted in TX register.
IOWs -- leave the word length at 8-bits, but activate the start bit
feature, and set the proper phase value for command/data.
Dennis L Bieber