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
SPI on v5.5 ARM
Moderator: Benj
- Mantas
- Posts: 221
- Joined: Tue May 15, 2012 10:32 pm
- Location: Klaipeda, Lithuania - North sea, UK
- Has thanked: 57 times
- Been thanked: 27 times
Re: SPI on v5.5 ARM
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
Regards,
Mantas
Science is my true religion.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: SPI on v5.5 ARM
Hi Mantas,
Ok let us know how your getting on with your analyser.
Ok let us know how your getting on with your analyser.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Mantas
- Posts: 221
- Joined: Tue May 15, 2012 10:32 pm
- Location: Klaipeda, Lithuania - North sea, UK
- Has thanked: 57 times
- Been thanked: 27 times
Re: SPI on v5.5 ARM
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.
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.
Science is my true religion.
- Mantas
- Posts: 221
- Joined: Tue May 15, 2012 10:32 pm
- Location: Klaipeda, Lithuania - North sea, UK
- Has thanked: 57 times
- Been thanked: 27 times
Re: SPI on v5.5 ARM
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
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
Science is my true religion.