cancel
Showing results for 
Search instead for 
Did you mean: 

L9958 SPI control

hozsarac
Associate
Posted on July 22, 2013 at 15:39

The question is related with the command word under the SPI protocol title. In this protocol uC should sent the command word to start protocol but I can not find the structure of this word. In datasheet the CFG_REG and DIA_REG registers are mentioned. But I can not understand the relationship between command word and those registers. If those register are sent instead of the command word, what we will be read? Could you help me?

6 REPLIES 6
Brugus
ST Employee
Posted on February 02, 2014 at 19:24

The information you need is reported in the datasheet. The paragraph 3.3 depicts the SPI protocol structure and in the paragraph 3.4 is reported the information about the SPI timing.

slamat
Associate
Posted on July 11, 2014 at 09:47

I am developing pcb motor controller used IC L9958,the questions are;

1.the first answer after power on reset is IC identifier =fsi bit =00000110...?

2.for configuration register (CFG_REG) I send 0b00XX1011XXXX111X ;...?(b14,b15=0)

3.for read diagnosis register(DIA_REG) I send 0b11XXXXXXXXXXXX ;...?(b14,b15=1)

because when i used no.3 for read DIA_REG about 2 times DIA_REG =reset/not latched for b3,b6,b8,b9,b10,b11. but if i used no.2  all(DR impact) latched..

it's mean I have to used no.2 for config CFG_REG and read DIA_REG...?

Best Regards,

mean

Brugus
ST Employee
Posted on July 16, 2014 at 10:54

Dear Mr. Juntak Mean,

can you share more detail about your application?

Is the DC motor connected to the L9958 outputs?

Thank you.

Best regards,

Marco.

slamat
Associate
Posted on July 24, 2014 at 09:31

Dear Mr Marco,

yes the motor DC connected to L9958 output

I use Microcontroller 16 bit(with SPI 16 bit) for control L9958,send command for rotated left nd right is ok,but when comunicated via SPI how to know if our configuration setting to L9958 is OK/save, what is the parameter..?

Thank You,

Best Regards,

mean

Brugus
ST Employee
Posted on July 29, 2014 at 19:05

Dear Mr. Juntak Mean,

Config Register: bit 14 and 15 must be Low

Diag Register: if the device works properly, all bits must be Low; if the bridgeisenabledbit 7 is H.

To read back the Diag Reg value is necessary to send the Configuration word continuously(command ''N''), the diag register will be available after the command N+1.

Attached some scope snapshots: the current limiter was set to max (both bit 2 and 3 are H).

Best regards,

Marco Brugora

________________

Attachments :

DiagReset_Bit_H.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzGP&d=%2Fa%2F0X0000000bIz%2Fe.eewihtapcp8DbjfzTDrBdGY9Z0qaOqbfDsGwXzbpU&asPdf=false

DiagReset_Bit_H_short.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hz5d&d=%2Fa%2F0X0000000bIy%2F95qSgAs8FXFWDdRZsauRQo8L5vYWMTIcCThChO7n1Bs&asPdf=false

DiagReset_Bit_H_UV.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzC0&d=%2Fa%2F0X0000000bIx%2FUsYDtvfr.7jdVxXZnG5gMd8qW.gWCn6jjBpNERoLIXk&asPdf=false

DiagReset_Bit_L_ok.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hz7U&d=%2Fa%2F0X0000000bIv%2FA_yDSgBU0xdGm4KoAmCfjEeU1EC1.BR.JpQKrQoUj6k&asPdf=false

DiagReset_Bit_L_short.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzGF&d=%2Fa%2F0X0000000bIw%2FF9adjczmitNJuEcsU1hchSWQC3LsRU52jki1Z9hj.jw&asPdf=false

DiagReset_Bit_L_UV.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hz6u&d=%2Fa%2F0X0000000bIu%2Ffge0RZwuSdSpgBQTquFrqmbI03svh838_iHFQbH5O3g&asPdf=false
Brugus
ST Employee
Posted on July 30, 2014 at 10:08

Dear Mr. Juntak Mean,

please check the document  TN0897 ''ST SPI protocol''

Best regards,

Marco Brugora