Page 1 of 1

SPI on v5.5 ARM

Posted: Sun Apr 21, 2013 3:14 pm
by Mantas
Hi,

I have found several problems with SPI component. First of all there is some kind of a bug in the receive string macro and it's not working (there are 3 parameters in the functions when calling, but only 2 are available for input). Next, I have looked at the CAL file and there are 4 options to set the clock for SPI, but in FC, there are only 3. Also there is this DAC enable pin in connections dialog menu, but no macros for it to use. Also when I tick in config menu to display simulations in HEX, it still displays in decimals. And all in all, I failed to use SPI successfully in Soft mode and in Hard mode, on A and B ports, on EB185. I have an expensive sensor, so I would really appreciate some kind of fix.

Best regards,
Mantas

Re: SPI on v5.5 ARM

Posted: Tue Apr 23, 2013 3:25 pm
by Mantas
I am waiting for my logic analyzer to arrive, so I will be able to tell why SPI is not functioning properly, hopefully at the end of this week.

Regards,
Mantas

Re: SPI on v5.5 ARM

Posted: Tue Apr 23, 2013 4:38 pm
by Benj
Hi Mantas,

Ok let us know how your getting on with your analyser.

Re: SPI on v5.5 ARM

Posted: Sun May 05, 2013 7:47 pm
by Mantas
Hi Benj,

So i have debugged my sensor with logic analyzer, and fixed some issues in the setup, i mixed the MISO AND MOSI lines as the naming in the FL was SDO and SDI :) Nevermind, it's now working in SW mode, just found one issue, which actually does not make any errors in communication with sensor, just the logic analyzer software detects an issue, as the wrong initial clock state. I use CPOL=0, and CPHA=0. Here's the screenshot. Maybe it's possible to fix this in the upcoming releases, so that initial clock state would be low from the beginning.

Also I was wondering whether it is possible to increase the clock speed? At the moment I use Fosc/4 in the and the analyzer registers 81.356kHz, where my sensor can go all the way up to 1MHz.

Cheers,
Mantas.
SPI.png
Screenshot
(184.85 KiB) Downloaded 1410 times

Re: SPI on v5.5 ARM

Posted: Mon May 06, 2013 12:01 pm
by Mantas
Good afternoon,

Some updates: Hardware SPI works perfectly, and clock speed is as it should be, and can go all the way up to >5MHz, when in Fosc/4 mode. and initial state is also correct.

Also could you please make it in v6 possible to disable DAC and NVM pins, because now if I leave them unconnected it chooses default values automatically.

Regards,
Mantas
screenshot.png
scrnsht
(200.2 KiB) Downloaded 1389 times