This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM437x - OLED interface through SPI2 ?

Hi,

I want to interface AM437x Starter Kit (Linux SDK) and Fema GM12864F-24-O3CY OLED (SSD1309 driver) using SPI2 available through J10 of the Starter Kit. 

Can anyone please guide me how to interface both of them? What changes should I make in terms of hardware and firmware?

Thanks.

  • Hi,

    What software are you using?
  • I am using Linux SDK .

    Can anyone please let know if there are any examples on accessing GPIOs, SPI, I2C, etc for AM437x Starter Kit?

  • Hi,

    Sorry for the delayed response. 

    SureKa said:
    Can anyone please let know if there are any examples on accessing GPIOs, SPI, I2C, etc for AM437x Starter Kit?

     

    Kernel documentation (inside sdk folder called Documentation) about those interfaces is quite detailed. For gpio, you can use sys/class/gpio entries, for spi -> dev/spi-dev & for i2c -> i2c_dev. You can easily create C apis, which you can execute in user space. 

    Documentation for the interfaces: 
     SPI -> Documentation/spi

     I2C -> Documentation/i2c

     GPIO-> Documentataion/gpio

    Information about how to set the dts nodes can be found in Documentation/devicetree/bindings/<spi/gpio/i2c> 

    Also you can refer to the following link: 
     http://processors.wiki.ti.com/index.php/Sitara_Linux_SDK 

    Hope this helps. 

    Best Regards, 
    Yordan

  • Thank you Yordan for your reply. I already got this information from TI Wiki and other resources.

    But my issue is not yet resolved.

    I am trying to use one of the GPIOs through J10 connector. As an example, pin 9 of J10 connector is a GPIO connected to L24 of the AM437x chip.

    I want to use enable and use gpio0_3 through L24 (MODE 0x9).

    I tried the following:

     root@am437x-evm:/sys/class/gpio# echo 3 > export

     root@am437x-evm:/sys/class/gpio# cd gpio3

     root@am437x-evm:/sys/class/gpio/gpio3# echo out > direction

     root@am437x-evm:/sys/class/gpio/gpio3# echo 1 > value

     root@am437x-evm:/sys/class/gpio/gpio3# echo 0 > value

     

    I don't see any change in the value at pin 9 of J10.

     Could you please let me know if I am following the correct procedure? Should I make any changes in the .dts file as well for the GPIOs to work? If so, can you please let me know how to do it for this particular pin as an example?

     

    Thanks

  • Hi,

    Yes, you are following the correct procedure to toggle gpio from the sysfs.

    Have a look at the dts file to verify that gpio0_3 (ball L24) is NOT used by any other dts node.

    Best Regards,
    Yordan
  • Thanks Yordan.

    Coming to my OLED interface question, could you please let me know if there are any examples or application notes available from TI on how to work with a OLED?

    Thanks. 

  • Hi, 

    SureKa said:
    could you please let me know if there are any examples or application notes available from TI on how to work with a OLED?

    Sorry, but as far as I know there are no such examples, wiki guides or app notes from TI. You will have to use the community sources, that you find. 

    Best Regards, 
    Yordan