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.

SSI not setting frame signal correctly

Other Parts Discussed in Thread: DAC8411

I'm using the Stellaris LM4F120 LaunchPad Evaluation Kit (http://www.ti.com/tool/ek-lm4f120xl) and am trying to interface with a DAC using SPI. The DAC uses mode 1 (CPOL=0, CPHA=1) so I have configured the SSI module to do that and am feeding it data in a timer interrupt. The data and clock lines work fine but for some reason the frame signal does not work. However if I just change to mode 0 the frame signal works perfectly. Any ideas?

Cheers

EDIT: I've also tried using SSI3 to the same effect and another person had the same problem completely independently.

  • Any one had the same problem?

  • HI,

    If describing a problem, please do not use the magic expression "does not work" - nobody can guess what "does not work". Instead, please give a short description of that bad behavior: SSIFSSS is always Hi or is alaways Low or is shorter than nr.of.bits x clock or is longer than clock or whatever it is. Also DAC type?

    Petrei

  • Good point, that was not very well explained. The problem is that the chip does not set the SSI0_FSS signal, so that it remains low. The correct behaviour should be that the FSS signal is set to high by default and is set low when sending data. Currently it does not do this in Freescale SPI mode 1 (CPOL=0, CPHA=1) and the signal is kept low, however if I set SSI0 to Freescale SPI mode 0 (CPOL=0, CPHA=0) it correctly sets the signal.

    Also the DAC is a Texas Instruments DAC8411 but at the moment I'm testing the stellaris without the DAC attached; just trying to get the correct SPI output first.

    Cheers,

    Al

  • Support both Petrei ("does not work" - less than ideal) and you for accepting (and then complying) w/his input.

    When all else fails - it is possible to "free" the SSIx_FSS pin from SSI "mode" - and instead config it as GPIO Output.  This then allows you to precisely control this pin as you wish - while causing no degradation to the 3 other SSI pin's operation. 

    No hardware change (i.e. same pin) - just bit of a bother to "mind" this pin - set/clear via your added code - should resolve your issue...

  • Ah okay, I was hoping I wouldn't have to do that as I'll have to waste clock cycles checking for SSI to complete transmission. It just seems weird as I'm fairly sure I've done everything correctly, I've checked my code and the datasheet multiple times. And yet as soon as I switch from mode 0 to mode 1 it goes from working perfectly to doing nothing.

    Thank you both for your help.

  • Merci monsieur - appreciated.  We've got short work-week - if I can carve time out I'll repeat your test on several of our boards - and report. 

    Getting your 2 devices to "talk - play nicely" should (always) be first order of business - later we can seek to optimize.  (as if anyone will really notice - or care...)