cancel
Showing results for 
Search instead for 
Did you mean: 

EVAL6470 operation via SPI

hsonderegger9
Associate
Posted on January 31, 2011 at 09:15

EVAL6470 operation via SPI

#l6470 #l6470 #l6470 #l6470 #l6470
23 REPLIES 23
infoinfo981
Associate II
Posted on May 17, 2011 at 10:20

Just killed my EVAL6470 tonight (o;

Time to design with some good old fashioned devices then....

Unless ST brings out some real application note on the L6470 instead of some

screenshots of their GUI software....but I hardly doubt that (o;

flavio2
Associate II
Posted on May 17, 2011 at 10:20

Hi there

My motor turns! I could manage the chip by lowering the supply voltage from 24V to 12V. Now the chip doesn't get too hot and the motor turns exactly where I want him to turn. But I really doubt the chip could handle a 3A stepper... Perhaps with an improved print layout including heat sink and fan. But surely not on the evaluation board.

Also my settings were not really ''L6470-friendly'' so I had to raise the acceleration value up to 2000 and lower the maximum speed to 120. Tonight I'm going to do a long duration test and I hope the chip will still work tomorrow morning :)

In conclusion, the chip doesn't seem to by ready to market and it's documentation is not really entire. I hope there will be a real application note soon... As you said AN3103 is not an application note at all. 

Here is my code to send and receive SPI data:

BYTE readSPI (void)

{

int bitNr = 7; //counter variable

BYTE returnByte = 0x00; //return byte

BYTE masks[8] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80}; //bit masks

BOOL pValue = 0; //MISO value

U2C_SingleIoWrite(m_spiHandle,SPI_MOSI,0);

//MOSI = 0, that looks like a NOP-command for the chip

U2C_SingleIoWrite(m_spiHandle,SPI_SS,0); //CS = 0

for (bitNr=7; bitNr>=0; bitNr--) //do it for each bit

{

U2C_SingleIoWrite(m_spiHandle,SPI_CLK,0); //clock = 0

U2C_SingleIoWrite(m_spiHandle,SPI_CLK,1); //clock = 1

U2C_SingleIoRead(m_spiHandle,SPI_MISO,&pValue); //read bit on MISO

pValue > 0 ? returnByte = (returnByte | masks[bitNr]) : NULL;

//if read bit is 1, set bit in return byte

}

U2C_SingleIoWrite(m_spiHandle,SPI_SS,1); //CS = 1

return returnByte; //return the byte read

}

void writeSPI( BYTE data )

{

int bitNr = 7; //counter variable

BYTE masks[8] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80}; //bit masks

U2C_SingleIoWrite(m_spiHandle,SPI_SS,0); //Chip Select = 0

for (bitNr=7; bitNr>=0; bitNr--) //do it once for each bit

{

U2C_SingleIoWrite(m_spiHandle,SPI_CLK,0); //clock = 0

U2C_SingleIoWrite(m_spiHandle,SPI_MOSI,(data&masks[bitNr])>>bitNr);

//write bit to MOSI-pin

U2C_SingleIoWrite(m_spiHandle,SPI_CLK,1); //clock = 1

}

U2C_SingleIoWrite(m_spiHandle,SPI_SS,1);

//after the byte is transmitted, raise CS

}

infoinfo981
Associate II
Posted on May 17, 2011 at 10:20

Hello Mr. Poli

I would like to use the L6470....as ST was generous enough to send me 3 samples of it....

Main problem is that the UUSCI or UBI boards aren't available in Switzerland...nor are they available in short time from Digikey or Mouser Electronics....and since my EVAL6470 is fried now which I got form Mouser, this part has also now a long delivery delay. Also local distributor EBV has nothing on stock....

I thought something must be fishy with the SPI communication....but the datasheet states everywhere for the SPI communication the timing as ''TBD'' (o;

What would be really beneficial is an application note describing the different calculations of those register values and how they influence each other....and of course some layout guidelines....

I would really like to carry on with the L6470 as I believe it is superior to the Trinamic semiconductors TMC series....but the delivery delays throws me back at least 2 to 3 months now....so either go with the bulky L297/L6203 implementation....

...or ST is generous enough to send a new EVAL6470/UUSCI combination...

Besides..if you already have some preliminary application notes on the L6470..I would really be glad....

Last but not least I'm planning on publishing the development process of a small form factor CNC PCB with USB interface...and this L6470 would just be perfect for small CNC milling machines....no bulky external boxes anymore (o;

So far...thanx for your feedback...

best regards

richard

infoinfo981
Associate II
Posted on May 17, 2011 at 10:20

Okay...maybe a final question on the EVAL6470....

What motor current could it support with an attached heatsink (what ever would fit on it ;o)

Enrico Poli
ST Employee
Posted on May 17, 2011 at 10:20

Hello Mr. Klingler,

I'll try to answer to all your points:

- We are aware of the shortage of STEVAL-PCC009V1 and STEVAL-PCC009V2 board. We are sure that new boards will be shortly available.

- The only ''critical'' time, as explained in my previous post, is the disable time. All others timings should be achieved from ordinary SPI interfaces of the most microcontrollers.

- We are not allowed to distribute draft versions of application notes.

- The current that the board can manage (in stady state) depends on the heatsink performance. The thermal resistance of EVAL6470 is about 40 °C/W, so the rms current that device can supply at ambient temperature of 25 °C is about 1.4 Arms for each phase.

If the thermal resistance is halved, the maximum rms current increase by sqrt(2) times (power dissipation is proportional to the square of rms current).

Regards

Enrico Poli

flavio2
Associate II
Posted on May 17, 2011 at 10:20

Hello Mr. Poli

I've got the same problem as Mr. Klingler has. In switzerland it is nearly impossible to get an UUSCI board these days. EBV will send it on 28th of february (nearly three months of delivery time). I'm sure, it would be best to evaluate the register values with the dSpin software and I'll do so when I get the board. But till I get the interface board I have to work with the things available to keep in project schedule.

I'm really looking forward to receive the board and read the L6470 application note which is under development. A working solution with L6470 would be best for our new product, so if you could deliver an UUSCI before 28th of february it would be great to keep in time.

kind regards

Flavio Perucchi

infoinfo981
Associate II
Posted on May 17, 2011 at 10:20

Hi Flavio

Also from Switzerland? (o;

We might to get in contact directly to share our experiences with stepper motor drivers then...my email: just swap my user name here and add @gmail.com...

Enrico Poli
ST Employee
Posted on May 17, 2011 at 10:20

Hello Mr. Perucchi,

We apologize for the shortage of STEVAL-PCC009V1 and V2 boards. The interest on the L6470 led stocks to run out in a very short time. More boards will be available soon.

If you want, you can use the BEMF compensation tool integrated in the dSPIN Evaluation Software without any interface board; the software doesn't need a communication board to run.

Regards

Enrico Poli

Posted on May 17, 2011 at 10:20

Dear Mr. Poli,

about STEVAL-PCC009V2, where can I find the ''USB to serial interface SDK'' setup archive ?

In the STEVAL-PCC009V1/V2 page there are manuals, firmware, but not Windows tools installation files.

Thanks in advance,

Luca Bassanello

Enrico Poli
ST Employee
Posted on May 17, 2011 at 10:20

Dear Mr. Bassanello,

the board pages on the ST website will be updated soon.

You can find GUI and dll for the STEVAL-PCC009V1 on the following link:

http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/SW_FUNCTION/steval-pcc009v1_sw_gui_v1_3.zip.

Best Regards

Enrico Poli