cancel
Showing results for 
Search instead for 
Did you mean: 

3-wire SPI Config for DAC60501 in STM32CubeMX

AndersonKKK
Visitor

Hi,

I'm trying to do 3-WIRE SPI communication with DAC60501,

but no matter what I do, the output value doesn't change.

I checked the waveform with a scope and it all was OK.

AndersonKKK_0-1756859346342.png

The first falling edge of SYNC starts the operation cycle --> CPHA= 1 Edge

 

AndersonKKK_1-1756859497949.png

uint8_t aTxBuffer[3] = { 0x08, 0x7F, 0xAA };  --> command = DAC_DATA, value = 0x7FA (12bit)

 

AndersonKKK_2-1756859602875.png

I set up CUBE MX as above.

Is there anyone who can tell me why it doesn't work?

 

Thank you in advance.

2 REPLIES 2
Andrew Neil
Super User

welcome to the forum.

Some more details are needed - please see  How to write your question to maximize your chances to find a solution for best results.

In particular, Please show your schematic.

 


@AndersonKKK wrote:

I checked the waveform with a scope and it all was OK.


Please show the scope trace.

If your scope has a screenshot facility, please use it - this will be far better than trying to photograph the screen!

 

Note that the DAC60501 is a TI product - nothing to do with ST:

https://www.ti.com/product/DAC60501

If your SPI waveforms are, indeed, correct then the problem must be elsewhere than the STM32.

You should post your schematic & trace on the TI forums - they will be able to see if you do, indeed, have everything correct for their product:

https://www.ti.com/product/DAC60501#support-training

Include a link there to this thread, and give a link here to your TI forum thread - so that everyone can see the whole story.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
padawan
Senior II

Just one remark:

the 60501 is a 12bit DAC 

Your 0x7AA are more than that.

12Bit (left allgin)  is max 0x7FB0 the right 4 bit should

be 0.

Try  0x3FB0 as value....

and as Andrew tell you: more information, schematic etc. 

padawan