cancel
Showing results for 
Search instead for 
Did you mean: 

STW81200 does not answer on MISO line

mariecurie
Associate II

Hi, 

Im interfacing STW81200 with SPI without no success. I do have the following questions:

What the SPI mode? Its not clear on the datasheet. It seems that CPOL = 1, and CPHA = 1.

In either way, I have tested the communication with several modes and none of them works.

On the MCU side, which is the one that will act as a master on spi, whats the configuration for the GPIO pin? Im using STM32L412 and I have set the MISO as an alternate function with push pull open drain and this does not work either.

I can confirm that the SPI signal for SCLK and MOSI its working because the data is being pushed out of the pins. Please see the logic analyzer graphs, but MOSI line is not responding.

Im following the datasheet section Example of register programming, its required when programming in SPI to have enabled a reference clock or this can be absent? 

Also, when the MCU is configuring for spi, it clear HW_PD, PD_RF_1 pins.

 

1 ACCEPTED SOLUTION

Accepted Solutions
AScha.3
Chief II

Hi,

>its required when programming in SPI to have enabled a reference clock or this can be absent? 

because its a Wide Band Synthesizer , it needs a clock anyway, to do something useful.

So give it the needed reference clock first.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

16 REPLIES 16
AScha.3
Chief II

Hi,

 

>What the SPI mode?

Looks like CPOL = 1, and CPHA = 1 , right.

 

Why not using Cube+HAL , to use the SPI ?

If you feel a post has answered your question, please click "Accept as Solution".
TDK
Guru

Are you toggling LE for each transfer? It's not shown in your photo--the line is low the entire time. Everything else looks correct.

 

If you feel a post has answered your question, please click "Accept as Solution".

Looks like CPOL = 1, and CPHA = 1 , right.

Thanks.

Why not using Cube+HAL , to use the SPI ?

Are you suggesting that if HAL is used, the problems will disappear?

I must add to this that, I changed the MISO gpio configuration as alternate function push pull with pull up, and this does NOT work either.

Also, other question that I have would be, what are the voltage set on the internal LDO when no programming has been made?

I did not think that it matters to show that. As soon as LE goes from high to low, then the transfer is made, its not obligatory to assert LE again, or maybe Im missing something?

This time Im showing the whole transaction. The extra difference regarding first one is that, MISO line has been set as alternate function push pull with pull up.

Still, it does NOT work.

You are correct, but it's important that it happens, and if you don't show it, I have no way of knowing that it's happening. We are debugging after all, just going through the possibilities.

The MISO pin should be set as alternate function. The settings apart from that shouldn't matter. Can you configure it with pull-down to see if its value becomes 0 instead of 1? That would let you know if the chip is driving it at all. If the chip isn't driving it, perhaps there's a hardware error--maybe it's not connected.

Not familiar with STW81200 but looks like you're doing everything right from what I can see.

If you feel a post has answered your question, please click "Accept as Solution".

You are correct, but it's important that it happens, and if you don't show it, I have no way of knowing that it's happening. We are debugging after all, just going through the possibilities.

I understand this and your are right. 

The MISO pin should be set as alternate function. The settings apart from that shouldn't matter. Can you configure it with pull-down to see if its value becomes 0 instead of 1?

I uploaded an image of the transactions with this configuration. I see that the pin is driven low. 

Regarding hardware issues, I yesterday measure continuity between the MCU and STW81200 and I have continuity on each pins. Also, I have attached the logic analyzer probes just right near by the SPI STW81200 to certify that the signal went all through.

If this is a hardware problem, I would be interested to know what are the default output values that the internal LDO should have, I doubled check that the power supply is stable.

 

mariecurie
Associate II

I uploaded an image of the transactions with this configuration. I see that the pin is driven low. 

Forgot to attach the image.

"The first bit, CO is used for mode selection (0=Write Operation, 1=Read Operation)."

It looks like you issued a write, it's not clear what response the device makes in that case.

> "The first bit, CO is used for mode selection (0=Write Operation, 1=Read Operation)."

This is correct. Im trying to follow the "example of register programming" indicated in 7.17 from datasheet. 

Write to ST9 = 0x48000000

Read from ST11.

Please see steps indicated on attached image. 

I would expect a dont care when writing to ST9 register, but get some results when reading device id register, ST11.