VoCore: SPI & MicroSD 5

I can not make SPI_CS1 work from register, also find the following small line from datasheet(page 87):
SPI_CS

So does this mean CS should be only controlled by software but not that SPI_ENABLE register? SPI_ENABLE is just a switch? But how CS0 be controlled? :'( Ahhhh, this kills me, maybe only ralink developer knows how to use it…

I use spi_cs1 as GPIO(thanks to Noltari’s patch) and control it in spi-rt2880.c that driver. Finally, the spi cs1 works. 🙂 this is my spi-rt2880.c.

I read from oscilloscope there is some data send from MOSI to that TF card but TF card just no reply…

9 thoughts on “VoCore: SPI & MicroSD 5

  1. atomsoft

    I get my VoCore tomorrow i hope… I cant wait to join in. Since i have to get this working for a project i will definitely be spending most of my day working on it. I hope i can help out.

    NOTE: The datasheet says “Firmware-controlled SPI enable” perhaps its a automated process, IF NOT then perhaps that EN is used for SPI SLAVE mode only?

    1. vonger Post author

      It should work like that…CS should control by software but not hardware, due to this chip do not have hardware message control and message buffer, message control only can be done in software side. So there is high possibility SPI_EN is not used to control CS. 🙂

  2. atomsoft

    Be careful CS1 is shared with Watchdog. So has to be set as SPI_CS1 via GPIOMODE register. SPIENA should be marked as RO single it clearly states a 0 means its negated and a 1 is asserted. So simply assume this is for SPI SLAVE MODE ONLY!

    Like you mentioned and as it says in the picture CS is software controlled meaning you MUST use it as GPIO to control a device. There is no FIRMWARE way to control as SPI MASTER… only SLAVE to read its data.

    1. vonger Post author

      Ye 🙂 I did not notice that, SPI_CS1 has a register to change its mode…On Page 30.
      GPIOMODE: GPIO Purpose Select (offset: 0x0060)

      22:21 RW
      SPI_CS1_MODE
      Sets SPI_CS1 to act as a watchdog timeout pin.
      2’b00: SPI_CS1
      2’b01: Watchdog reset output (active low for 3 system clocks)
      2’b10: GPIO mode

      I think the driver just set it to GPIO 😀

  3. atomsoft

    OK 🙂 well you said it works as GPIO so i guess thats how we will use it 🙂

    I plan to do some crazy stuff with the FINAL and try to with ALPHA… Thanks for creating this again. Also… any news on a new Forum?

Comments are closed.