Author Topic: spi chip selects  (Read 7614 times)

Offline neil

  • Sr. Member
  • ****
  • Posts: 438
    • View Profile
spi chip selects
« on: June 19, 2008, 07:21:24 PM »
What benefits are there from not allowing the QSPI to automatically deal with the chip selects?

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: spi chip selects
« Reply #1 on: June 19, 2008, 07:27:44 PM »
Neil

I initially tried this but found that the amount of code needed to do it, in comparison with one line to control the CS directly, didn't seem to make any sense. However in some situations where the task is rather more critical (DSP, FPGA etc.) it is probably useful to be able to control these (eg. when sending a chain of 8 bytes where the CS lines have to do special things automatically between each byte - this can then be achieved with no CPU intervention). In the case of controlling SPI FLASH where the CS needs to go low at the beginning and high at then end I didn't see any justification for the added complexity.

Furthermore there are some people using more than 4 FLASH chips connected - in some cases the CS lines are spread out over different ports. The use of automatic control restricts to 4 CS lines (or adding an expander since it does support 16 with an additional chip) on the pre-defined ports. As you probably know, the trend is away from any additional logic chips if possible. If you are using some parts- like M52210 - the number of CS lines is restricted to 2 (no more on the package) so again this would be quite a restriction if several SPI chips are required so 'manual' control would have to be resorted to.

Regards

Mark