AD9833 LPSPI bus configuration with S32k358

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AD9833 LPSPI bus configuration with S32k358

Jump to solution
11,199 Views
soumik1506
Contributor III

Hello,

I am using the AD9833 chip to generate a 100kHz sine wave using the data coming from the SPI bus configured in my S32k358 microcontroller. I have set the SPI bus using the LPSPI RTD driver. I have defined a function that sets the FSYNC pin low, pushes the data and the sets the FSYNC pin back to high. I have attached my LPSPI configuartions

Based on the configuration, i am able to get the SPI wavforms, butstill the control register of the DAC is not getting set.

As per the datasheet and application note AN-1070 following is my code to manipulate the equivalent data into the DAC:

DAC_data_send(0x2100); //RESET ON
data = 1073742;//100000Hz equivalent 16 bit data from SPI2 MOSI
uint16 MSB = (uint16)((data & 0xFFFC000) >> 14); // extracting MSB and setting control bits for FREQREG0
uint16 LSB = (uint16)(data & 0x3FFF); // extracting LSB and setting control bits for FREQREG0

LSB |= 0x4000; // Control bits for LSB for FREQREG0, 0x8000; // Control bits for LSB for FREQ1
MSB |= 0x4000; // Control bits for MSB for FREQREG0, 0x8000; // Control bits for MSB for FREQ1


DAC_data_send(LSB); //Writing 14 bit LSB to Freq Register 0
DAC_data_send(MSB); //Writing 14 bit MSB to Freq Register 0
DAC_data_send(0xC000); // Setting Phase Adjustment in the Phase Register 0
DAC_data_send(0x2000); // RESET OFF*/

 

The value 1073742 is by this calculation - (100000*2^28)/(25*10^6). I have followed the formula given in the datasheet. I dont know where i am going wrong, can someone point me out

0 Kudos
Reply
1 Solution
10,704 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

As the S32 Configuration Tool indicates for SpiTimeClk2Cs and SpiTimeCs2Clk: This parameter allows to use a range of values ​​from 30ns up to 0.01s. So you can't set SPItimeCs2Clk to 20ns.

The SpiTimeCs2Clk value is out of range. In HW specific the value must be in the range [3E-08 to 0.01].jpg

I don't understand why you have to set SPItimeCs2Clk(t8) to 20ns. As far as I understand, when LPSPI2 operates at 10MHz, the SCLK period(t4) is equal to 100ns. So t8 max=t4-5=100-5=95ns. You just need to set SPItimeCs2Clk(t8) between t8 min and max, which is between 10ns and 95ns.
I just set SpiTimeClk2Cs and SpiTimeCs2Clk to 30ns which is 0.00000003.

AD9833 Figure 4. Serial Timing t4 t8 t11.jpg

 

AD9833 is not a product of NXP, porting AD9833 - Microcontroller No-OS Driver is out of scope of our online technical support. 

Since you don't use MISO pin, it is recommended to enable SpiHalfDuplexModeSupport and use Lpspi_Ip_SyncTransmitHalfDuplex instead of Lpspi_Ip_SyncTransmit.

I modified Lpspi_Ip_HalfDuplexTransfer_S32K358_RTD400HF02 to send the command initialization sequence '0x2100 0x50C7 0x4000 0xC000 0x2000' from the AN-1070 example. Regarding the control of AN-1070 I suggest you also contact technical support at www.analog.com.

AN-1070 The required initialization sequence.jpg

View solution in original post

15 Replies
11,167 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

Since AD9833 is not a product of NXP, I don't know much about it. I read its manual and found that the following highlighted part needs to be modified.

AD9833 LPSPI configuration.jpg

Did you connect FSYNC to PCS0? According to my understanding, FSYNC pin should be the Chip Select pin of SPI.

Please use a logic analyzer to capture the SPI communication waveform. If you have used AD9833 before and are familiar with its control, it is recommended to observe the SPI waveform to check whether it is correct.

AD9833 Figure 4. Serial Timing.jpg


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
11,151 Views
soumik1506
Contributor III

Yes i have connected the FSYNC pin of the AD9833 chp to LPSPI-PCS0 pin. I am getting SPI sout, serial clock and Chip select at the AD9833 pins.

soumik1506_0-1730383851398.png

 

Even after making the changes you have highlighted in the images,  i am still not getting output from the AD9833 VOUT pin. I have tried with different FREQREG values

Tags (3)
0 Kudos
Reply
11,134 Views
Robin_Shen
NXP TechSupport
NXP TechSupport
0 Kudos
Reply
11,096 Views
soumik1506
Contributor III

I went trough it, but i want to do the data transfer using the LPSPI bus configuration. I have verified that my data is getting transmitted via the SPI bus, but when i am send the data as per the order defined in the No-OS driver, i am able to get the sine wave with the rated output  voltage, but not able to control the frequecny. The AD9833 chip's vout voltage frequency is equal to the SPI SCLK not the frequency set in the FREQREG. Please tell me where i am going wrong.

Soumik

Tags (3)
0 Kudos
Reply
11,075 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Are you saying that the AD9833 is OK with all SPI commands except receiving the FREQREG register?

Since you are referring to AN-1070: Programming the AD9833/AD9834, have you considered using the same SPI Command Sequence and only modifying the frequency part? At the same time, use a logic analyzer to capture the SPI waveform to ensure that it is consistent with AN-1070?

0 Kudos
Reply
11,067 Views
soumik1506
Contributor III

I have referred the AN1070 application, followed the steps as it is explained in the article. I am not getting the correct output.

My logic analyser is not working properly, i am using the usual probes. I am able to decode the SPI sout, PCS0 and SCLK, but when i measure the output frequency of the AD9833 Vout pin, it keeps changing few values near to the frequency i have set, and to one/two frequencies which are way more than the set value.

When i see examples where the same AD9833 chip is programmed with different platform board, the frequency of the wave form is exactly equal to the frequency set.

I have also gone through the No-OS driver codes specific for this chip and i have defined functions that similar to the definitions in the source code. Wherever there were statements with no_spi and no_gpio, i have replaced them with Lpspi and Siul2_gpio functions.

I have tested them and i am getting similar output. I still dont know what i am missing out here.

Tags (3)
0 Kudos
Reply
11,038 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Since PTB3 is connected to J63 pin8 (GMAC_RGMII_TXD3_PTB3) by default on the S32K3X8EVB-Q289 board, it is not convenient for me to test it on the S32K3X8EVB-Q289.
Today I found another S32K358 mini board to test your project. The following is the SPI data captured by the logic analyzer. I feel that this data is a bit strange, and the time interval for sending SPI data is too short. I don't know if your application really needs to modify the output of AD9833 so frequently.

PIT_TRIGMUX_ADC_BCTU_1_M7_0_0 SPI data.jpg

11,031 Views
soumik1506
Contributor III

Then what must be the SPI Bus Time and clock configurations. I have made sure to select the 40MHz clock for my SCLK (as stated in the Datasheet).

As per the timing characteristics in the datasheet, the FSYNC to SCLK hold time (t8) says the max i can set is 20ns. With the 40MHz setting i am not able to set that value, the minimum i can go is 30ns.

When i key in 20E-9 for the 'SPITimeCS2CLK' property, i gives an value incompatible error with a red highlight. I tried the same configuration when i set the SCLK for the SPIbus with 20Mhz and 60MHz, and i am still getting the same output

0 Kudos
Reply
11,025 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Since AD9833 is not a product of NXP, I am not sure if it is because you did not send these SPI data according to the Command Sequence Explained section of AN-1070. I checked ad9833_init (https://github.com/analogdevicesinc/no-OS/blob/main/drivers/frequency/ad9833/ad9833.c#L128) and it seems that you should follow AN-1070 to send SPI data.
It is recommended to send these SPI data: 0x2100 0x50C7 0x4000 0xC000 0x2000

0 Kudos
Reply
11,003 Views
soumik1506
Contributor III

i have attached the new code which is based on the no-os driver.

0 Kudos
Reply
10,910 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

The following is the SPI waveform after I debugged the AD9833_TX_SPI of your attached project (SPI_ONLY_M7_0_0):
Since my S32K358 mini has a 16MHz crystal onboard, I modified the clock part, and I also increased the values ​​of SpiTimeClk2Cs and SpiTimeCs2Clk.

SPI_ONLY_M7_0_0 AD9833_TX_SPI.jpg

I found two problems based on the SPI data on the logic analyzer:
1. 0x0000 is sent extra every time. Why did you #define DAC_STACK (4U)? Shouldn't it be 2U?
2. You called AD9833_TX_SPI(0x2100); but sent 0x0021. It seems that you reversed the higher 8 bits and the lower 8 bits. Please modify the assignment of TxMasterBufferAD3988[0] and TxMasterBufferAD3988[1].

10,767 Views
soumik1506
Contributor III

Thanks for your reply. I will change the DAC_STACK size and the tx buffer assignment like you pointed.

As per the AD9833 datasheet, the operating frequenct must be up to 40Mhz, what was your LPSPI bus frequency, and what was your SpiTimeClk2Cs and SpiTimeCs2Clk times.

Was your SpiTimeCs2Clk within 20ns?

Can you give the project with your changes

 

Tags (3)
0 Kudos
Reply
10,755 Views
Robin_Shen
NXP TechSupport
NXP TechSupport
The serial clock can have a frequency of 40 MHz maximum. 

The maximum frequency mentioned in the AD9833 datasheet does not mean that you must communicate with a 40MHz SPI clock. You can also use a lower SPI clock frequency.
Please note: 

For S32K314, S32K322, S32K324, S32K328, S32K338, S32K341, S32K342, S32K344, S32K348, S32K358, S32K388,S32K396: The maximum baudrate for LPSPI0 is 20MHz, for LPSPI1-LPSPI5 is 10MHz, for FLEXIO is 10MHz.


Also, FreqReg is calculated using MCLK, not SLCK

0 Kudos
Reply
10,742 Views
soumik1506
Contributor III

Yes i am aware that FreqReg is calculate using the MCLK and the max baudrate for LPSPI2 is 10Mhz.

I am talking about the operating frequency of AD9833 and the serial clock of the LPSPI2 bus. I have tried setting the LPSPI2 bus with frequencies lower than 40Mhz (20Mhz), i am not able to set the SPItimeCs2Clk time within 20ns. The the data that i am trying to send is not setting the FreqReg.

I want to to know what must be clock configuration. Can you please tell me this clearly coz i am pressed with time here!!

Tags (3)
0 Kudos
Reply
10,705 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

As the S32 Configuration Tool indicates for SpiTimeClk2Cs and SpiTimeCs2Clk: This parameter allows to use a range of values ​​from 30ns up to 0.01s. So you can't set SPItimeCs2Clk to 20ns.

The SpiTimeCs2Clk value is out of range. In HW specific the value must be in the range [3E-08 to 0.01].jpg

I don't understand why you have to set SPItimeCs2Clk(t8) to 20ns. As far as I understand, when LPSPI2 operates at 10MHz, the SCLK period(t4) is equal to 100ns. So t8 max=t4-5=100-5=95ns. You just need to set SPItimeCs2Clk(t8) between t8 min and max, which is between 10ns and 95ns.
I just set SpiTimeClk2Cs and SpiTimeCs2Clk to 30ns which is 0.00000003.

AD9833 Figure 4. Serial Timing t4 t8 t11.jpg

 

AD9833 is not a product of NXP, porting AD9833 - Microcontroller No-OS Driver is out of scope of our online technical support. 

Since you don't use MISO pin, it is recommended to enable SpiHalfDuplexModeSupport and use Lpspi_Ip_SyncTransmitHalfDuplex instead of Lpspi_Ip_SyncTransmit.

I modified Lpspi_Ip_HalfDuplexTransfer_S32K358_RTD400HF02 to send the command initialization sequence '0x2100 0x50C7 0x4000 0xC000 0x2000' from the AN-1070 example. Regarding the control of AN-1070 I suggest you also contact technical support at www.analog.com.

AN-1070 The required initialization sequence.jpg

%3CLINGO-SUB%20id%3D%22lingo-sub-1984036%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EAD9833%20LPSPI%20bus%20configuration%20with%20S32k358%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1984036%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EI%20am%20using%20the%20AD9833%20chip%20to%20generate%20a%20100kHz%20sine%20wave%20using%20the%20data%20coming%20from%20the%20SPI%20bus%20configured%20in%20my%20S32k358%20microcontroller.%20I%20have%20set%20the%20SPI%20bus%20using%20the%20LPSPI%20RTD%20driver.%20I%20have%20defined%20a%20function%20that%20sets%20the%20FSYNC%20pin%20low%2C%20pushes%20the%20data%20and%20the%20sets%20the%20FSYNC%20pin%20back%20to%20high.%20I%20have%20attached%20my%20LPSPI%20configuartions%3C%2FP%3E%3CP%3EBased%20on%20the%20configuration%2C%20i%20am%20able%20to%20get%20the%20SPI%20wavforms%2C%20butstill%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ethe%20control%20register%20of%20the%20DAC%20is%20not%20getting%20set.%3C%2FP%3E%3CP%3EAs%20per%20the%20datasheet%20and%20application%20note%20AN-1070%20following%20is%20my%20code%20to%20manipulate%20the%20equivalent%20data%20into%20the%20DAC%3A%3C%2FP%3E%3CP%3EDAC_data_send(0x2100)%3B%20%2F%2FRESET%20ON%3CBR%20%2F%3Edata%20%3D%201073742%3B%2F%2F100000Hz%20equivalent%2016%20bit%20data%20from%20SPI2%20MOSI%3CBR%20%2F%3Euint16%20MSB%20%3D%20(uint16)((data%20%26amp%3B%200xFFFC000)%20%26gt%3B%26gt%3B%2014)%3B%20%2F%2F%20extracting%20MSB%20and%20setting%20control%20bits%20for%20FREQREG0%3CBR%20%2F%3Euint16%20LSB%20%3D%20(uint16)(data%20%26amp%3B%200x3FFF)%3B%20%2F%2F%20extracting%20LSB%20and%20setting%20control%20bits%20for%20FREQREG0%3C%2FP%3E%3CP%3ELSB%20%7C%3D%200x4000%3B%20%2F%2F%20Control%20bits%20for%20LSB%20for%20FREQREG0%2C%200x8000%3B%20%2F%2F%20Control%20bits%20for%20LSB%20for%20FREQ1%3CBR%20%2F%3EMSB%20%7C%3D%200x4000%3B%20%2F%2F%20Control%20bits%20for%20MSB%20for%20FREQREG0%2C%200x8000%3B%20%2F%2F%20Control%20bits%20for%20MSB%20for%20FREQ1%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EDAC_data_send(LSB)%3B%20%2F%2FWriting%2014%20bit%20LSB%20to%20Freq%20Register%200%3CBR%20%2F%3EDAC_data_send(MSB)%3B%20%2F%2FWriting%2014%20bit%20MSB%20to%20Freq%20Register%200%3CBR%20%2F%3EDAC_data_send(0xC000)%3B%20%2F%2F%20Setting%20Phase%20Adjustment%20in%20the%20Phase%20Register%200%3CBR%20%2F%3EDAC_data_send(0x2000)%3B%20%2F%2F%20RESET%20OFF*%2F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThe%20value%26nbsp%3B%3CSPAN%3E1073742%20is%20by%20this%20calculation%20-%26nbsp%3B(100000*2%5E28)%2F(25*10%5E6).%20I%20have%20followed%20the%20formula%20given%20in%20the%20datasheet.%20I%20dont%20know%20where%20i%20am%20going%20wrong%2C%20can%20someone%20point%20me%20out%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1992509%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20AD9833%20LPSPI%20bus%20configuration%20with%20S32k358%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1992509%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSTRONG%3EAs%3C%2FSTRONG%3E%20the%20S32%20Configuration%20Tool%20indicates%20for%20%3CSTRONG%3ESpiTimeClk2Cs%3C%2FSTRONG%3E%20and%20%3CSTRONG%3ESpiTimeCs2Clk%3C%2FSTRONG%3E%3A%20%3CEM%3EThis%20parameter%20allows%20to%20use%20a%20range%20of%20values%20%E2%80%8B%E2%80%8Bfrom%20%3CSTRONG%3E30%3C%2FSTRONG%3Ens%20up%20to%20%3CSTRONG%3E0.01%3C%2FSTRONG%3Es.%3C%2FEM%3E%20So%20you%20can't%20set%20%3CSTRONG%3ESPItimeCs2Clk%3C%2FSTRONG%3E%20to%20%3CSTRONG%3E20%3C%2FSTRONG%3Ens.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22The%20SpiTimeCs2Clk%20value%20is%20out%20of%20range.%20In%20HW%20specific%20the%20value%20must%20be%20in%20the%20range%20%5B3E-08%20to%200.01%5D.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22The%20SpiTimeCs2Clk%20value%20is%20out%20of%20range.%20In%20HW%20specific%20the%20value%20must%20be%20in%20the%20range%20%5B3E-08%20to%200.01%5D.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F309942i7EB809AF7D44ED81%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22The%20SpiTimeCs2Clk%20value%20is%20out%20of%20range.%20In%20HW%20specific%20the%20value%20must%20be%20in%20the%20range%20%5B3E-08%20to%200.01%5D.jpg%22%20alt%3D%22The%20SpiTimeCs2Clk%20value%20is%20out%20of%20range.%20In%20HW%20specific%20the%20value%20must%20be%20in%20the%20range%20%5B3E-08%20to%200.01%5D.jpg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EI%20don't%20understand%20why%20you%20have%20to%20set%20%3CSTRONG%3ESPItimeCs2Clk%3C%2FSTRONG%3E(%3CSTRONG%3Et8%3C%2FSTRONG%3E)%20to%20%3CSTRONG%3E20%3C%2FSTRONG%3Ens.%20As%20far%20as%20I%20understand%2C%20when%20LPSPI2%20operates%20at%20%3CSTRONG%3E10%3C%2FSTRONG%3EMHz%2C%20the%20%3CSTRONG%3ESCLK%20period%3C%2FSTRONG%3E(%3CSTRONG%3Et4%3C%2FSTRONG%3E)%20is%20equal%20to%20%3CSTRONG%3E100%3C%2FSTRONG%3Ens.%20So%20%3CSTRONG%3Et8%20max%3C%2FSTRONG%3E%3Dt4-5%3D100-5%3D%3CSTRONG%3E95%3C%2FSTRONG%3Ens.%20You%20just%20need%20to%20set%20%3CSTRONG%3ESPItimeCs2Clk%3C%2FSTRONG%3E(%3CSTRONG%3Et8%3C%2FSTRONG%3E)%20between%20t8%20min%20and%20max%2C%20which%20is%20between%2010ns%20and%2095ns.%3CBR%20%2F%3EI%20just%20set%20%3CSTRONG%3ESpiTimeClk2Cs%3C%2FSTRONG%3E%20and%20%3CSTRONG%3ESpiTimeCs2Clk%3C%2FSTRONG%3E%20to%20%3CSTRONG%3E30%3C%2FSTRONG%3Ens%20which%20is%20%3CSTRONG%3E0.00000003%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22AD9833%20Figure%204.%20Serial%20Timing%20t4%20t8%20t11.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22AD9833%20Figure%204.%20Serial%20Timing%20t4%20t8%20t11.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F309941i0255EB9C2938E0AB%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22AD9833%20Figure%204.%20Serial%20Timing%20t4%20t8%20t11.jpg%22%20alt%3D%22AD9833%20Figure%204.%20Serial%20Timing%20t4%20t8%20t11.jpg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EAD9833%20is%20not%20a%20product%20of%20NXP%2C%20porting%20%3CA%20href%3D%22https%3A%2F%2Fwiki.analog.com%2Fresources%2Ftools-software%2Fuc-drivers%2Fad9833%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EAD9833%20-%20Microcontroller%20No-OS%20Driver%3C%2FA%3E%26nbsp%3Bis%20out%20of%20scope%20of%20our%20online%20technical%20support.%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESince%20you%20don't%20use%20%3CSTRONG%3EMISO%3C%2FSTRONG%3E%20pin%2C%20it%20is%20recommended%20to%20enable%20%3CSTRONG%3ESpiHalfDuplexModeSupport%3C%2FSTRONG%3E%20and%20use%20%3CSTRONG%3ELpspi_Ip_SyncTransmitHalfDuplex%3C%2FSTRONG%3E%20instead%20of%20%3CSTRONG%3ELpspi_Ip_SyncTransmit%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CP%3EI%20modified%20%3CSTRONG%3ELpspi_Ip_HalfDuplexTransfer_S32K358%3C%2FSTRONG%3E_RTD400HF02%20to%20send%20the%20command%20initialization%20sequence%20'0x2100%200x50C7%200x4000%200xC000%200x2000'%20from%20the%20%3CA%20href%3D%22https%3A%2F%2Fwww.analog.com%2Fen%2Fresources%2Fapp-notes%2Fan-1070.html%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EAN-1070%3C%2FA%3E%20example.%20Regarding%20the%20control%20of%20AN-1070%20I%20suggest%20you%20also%20contact%20technical%20support%20at%20%3CA%20href%3D%22http%3A%2F%2Fwww.analog.com%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ewww.analog.com%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22AN-1070%20The%20required%20initialization%20sequence.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22AN-1070%20The%20required%20initialization%20sequence.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F309940iCFE1EB82B38B7FFF%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22AN-1070%20The%20required%20initialization%20sequence.jpg%22%20alt%3D%22AN-1070%20The%20required%20initialization%20sequence.jpg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1991947%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20AD9833%20LPSPI%20bus%20configuration%20with%20S32k358%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1991947%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EYes%20i%20am%20aware%20that%20FreqReg%20is%20calculate%20using%20the%20MCLK%20and%20the%20max%20baudrate%20for%20LPSPI2%20is%2010Mhz.%3C%2FP%3E%3CP%3EI%20am%20talking%20about%20the%20operating%20frequency%20of%20AD9833%20and%20the%20serial%20clock%20of%20the%20LPSPI2%20bus.%20I%20have%20tried%20setting%20the%20LPSPI2%20bus%20with%20frequencies%20lower%20than%2040Mhz%20(20Mhz)%2C%20i%20am%20not%20able%20to%20set%20the%20SPItimeCs2Clk%20time%20within%2020ns.%20The%20the%20data%20that%20i%20am%20trying%20to%20send%20is%20not%20setting%20the%20FreqReg.%3C%2FP%3E%3CP%3EI%20want%20to%20to%20know%20what%20must%20be%20clock%20configuration.%20Can%20you%20please%20tell%20me%20this%20clearly%20coz%20i%20am%20pressed%20with%20time%20here!!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1991891%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20AD9833%20LPSPI%20bus%20configuration%20with%20S32k358%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1991891%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EThe%20serial%20clock%20can%20have%20a%20frequency%20of%2040%20MHz%20maximum.%20%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EThe%20maximum%20frequency%20mentioned%20in%20the%20AD9833%20datasheet%20does%20not%20mean%20that%20you%20must%20communicate%20with%20a%2040MHz%20SPI%20clock.%20You%20can%20also%20use%20a%20lower%20SPI%20clock%20frequency.%3CBR%20%2F%3EPlease%20note%3A%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EFor%20S32K314%2C%20S32K322%2C%20S32K324%2C%20S32K328%2C%20S32K338%2C%20S32K341%2C%20S32K342%2C%20S32K344%2C%20S32K348%2C%20S32K358%2C%20S32K388%2CS32K396%3A%20The%20maximum%20baudrate%20for%20LPSPI0%20is%2020MHz%2C%20for%20LPSPI1-LPSPI5%20is%2010MHz%2C%20for%20FLEXIO%20is%2010MHz.%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CBR%20%2F%3EAlso%2C%20%3CA%20href%3D%22https%3A%2F%2Fwww.analog.com%2Fen%2Fresources%2Fapp-notes%2Fan-1070.html%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%3CSTRONG%3EFreqReg%3C%2FSTRONG%3E%20%3C%2FA%3Eis%20calculated%20using%20%3CSTRONG%3EMCLK%3C%2FSTRONG%3E%2C%20not%20%3CSTRONG%3ESLCK%3C%2FSTRONG%3E.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1991868%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20AD9833%20LPSPI%20bus%20configuration%20with%20S32k358%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1991868%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThanks%20for%20your%20reply.%20I%20will%20change%20the%20DAC_STACK%20size%20and%20the%20tx%20buffer%20assignment%20like%20you%20pointed.%3C%2FP%3E%3CP%3EAs%20per%20the%20AD9833%20datasheet%2C%20the%20operating%20frequenct%20must%20be%20up%20to%2040Mhz%2C%20what%20was%20your%20LPSPI%20bus%20frequency%2C%20and%20what%20was%20your%20SpiTimeClk2Cs%20and%20SpiTimeCs2Clk%20times.%3C%2FP%3E%3CP%3EWas%20your%20SpiTimeCs2Clk%20within%2020ns%3F%3C%2FP%3E%3CP%3ECan%20you%20give%20the%20project%20with%20your%20changes%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1991137%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20AD9833%20LPSPI%20bus%20configuration%20with%20S32k358%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1991137%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThe%20following%20is%20the%20SPI%20waveform%20after%20I%20debugged%20the%20AD9833_TX_SPI%20of%20your%20attached%20project%20(SPI_ONLY_M7_0_0)%3A%3CBR%20%2F%3ESince%20my%20S32K358%20mini%20has%20a%2016MHz%20crystal%20onboard%2C%20I%20modified%20the%20clock%20part%2C%20and%20I%20also%20increased%20the%20values%20%E2%80%8B%E2%80%8Bof%20SpiTimeClk2Cs%20and%20SpiTimeCs2Clk.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22SPI_ONLY_M7_0_0%20AD9833_TX_SPI.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22SPI_ONLY_M7_0_0%20AD9833_TX_SPI.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F309450iCA394957AD6BDE99%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22SPI_ONLY_M7_0_0%20AD9833_TX_SPI.jpg%22%20alt%3D%22SPI_ONLY_M7_0_0%20AD9833_TX_SPI.jpg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EI%20found%20two%20problems%20based%20on%20the%20SPI%20data%20on%20the%20logic%20analyzer%3A%3CBR%20%2F%3E1.%200x0000%20is%20sent%20extra%20every%20time.%20Why%20did%20you%20%23define%20DAC_STACK%20(%3CSTRONG%3E4%3C%2FSTRONG%3EU)%3F%20Shouldn't%20it%20be%20%3CSTRONG%3E2%3C%2FSTRONG%3EU%3F%3CBR%20%2F%3E2.%20You%20called%20AD9833_TX_SPI(0x2100)%3B%20but%20sent%200x0021.%20It%20seems%20that%20you%20reversed%20the%20higher%208%20bits%20and%20the%20lower%208%20bits.%20Please%20modify%20the%20assignment%20of%20TxMasterBufferAD3988%5B0%5D%20and%20TxMasterBufferAD3988%5B1%5D.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1990144%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20AD9833%20LPSPI%20bus%20configuration%20with%20S32k358%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1990144%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ei%20have%20attached%20the%20new%20code%20which%20is%20based%20on%20the%20no-os%20driver.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1990044%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20AD9833%20LPSPI%20bus%20configuration%20with%20S32k358%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1990044%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ESince%20AD9833%20is%20not%20a%20product%20of%20NXP%2C%20I%20am%20not%20sure%20if%20it%20is%20because%20you%20did%20not%20send%20these%20SPI%20data%20according%20to%20the%20%3CSTRONG%3ECommand%20Sequence%20Explained%3C%2FSTRONG%3E%20section%20of%20%3CSTRONG%3EAN-1070%3C%2FSTRONG%3E.%20I%20checked%20%3CSTRONG%3Ead9833_init%3C%2FSTRONG%3E%20(%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fanalogdevicesinc%2Fno-OS%2Fblob%2Fmain%2Fdrivers%2Ffrequency%2Fad9833%2Fad9833.c%23L128%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fanalogdevicesinc%2Fno-OS%2Fblob%2Fmain%2Fdrivers%2Ffrequency%2Fad9833%2Fad9833.c%23L128%3C%2FA%3E)%20and%20it%20seems%20that%20you%20should%20follow%20AN-1070%20to%20send%20SPI%20data.%3CBR%20%2F%3EIt%20is%20recommended%20to%20send%20these%20SPI%20data%3A%200x2100%200x50C7%200x4000%200xC000%200x2000%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1990028%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20AD9833%20LPSPI%20bus%20configuration%20with%20S32k358%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1990028%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThen%20what%20must%20be%20the%20SPI%20Bus%20Time%20and%20clock%20configurations.%20I%20have%20made%20sure%20to%20select%20the%2040MHz%20clock%20for%20my%20SCLK%20(as%20stated%20in%20the%20Datasheet).%3C%2FP%3E%3CP%3EAs%20per%20the%20timing%20characteristics%20in%20the%20datasheet%2C%20the%20FSYNC%20to%20SCLK%20hold%20time%20(t8)%20says%20the%20max%20i%20can%20set%20is%2020ns.%20With%20the%2040MHz%20setting%20i%20am%20not%20able%20to%20set%20that%20value%2C%20the%20minimum%20i%20can%20go%20is%2030ns.%3C%2FP%3E%3CP%3EWhen%20i%20key%20in%2020E-9%20for%20the%20'SPITimeCS2CLK'%20property%2C%20i%20gives%20an%20value%20incompatible%20error%20with%20a%20red%20highlight.%20I%20tried%20the%20same%20configuration%20when%20i%20set%20the%20SCLK%20for%20the%20SPIbus%20with%2020Mhz%20and%2060MHz%2C%20and%20i%20am%20still%20getting%20the%20same%20output%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1989861%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20AD9833%20LPSPI%20bus%20configuration%20with%20S32k358%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1989861%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ESince%20PTB3%20is%20connected%20to%20J63%20pin8%20(GMAC_RGMII_TXD3_PTB3)%20by%20default%20on%20the%20S32K3X8EVB-Q289%20board%2C%20it%20is%20not%20convenient%20for%20me%20to%20test%20it%20on%20the%20S32K3X8EVB-Q289.%3CBR%20%2F%3EToday%20I%20found%20another%20S32K358%20mini%20board%20to%20test%20your%20project.%20The%20following%20is%20the%20SPI%20data%20captured%20by%20the%20logic%20analyzer.%20I%20feel%20that%20this%20data%20is%20a%20bit%20strange%2C%20and%20the%20time%20interval%20for%20sending%20SPI%20data%20is%20too%20short.%20I%20don't%20know%20if%20your%20application%20really%20needs%20to%20modify%20the%20output%20of%20AD9833%20so%20frequently.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22PIT_TRIGMUX_ADC_BCTU_1_M7_0_0%20SPI%20data.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22PIT_TRIGMUX_ADC_BCTU_1_M7_0_0%20SPI%20data.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F309128i5455E51191FFBFC3%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22PIT_TRIGMUX_ADC_BCTU_1_M7_0_0%20SPI%20data.jpg%22%20alt%3D%22PIT_TRIGMUX_ADC_BCTU_1_M7_0_0%20SPI%20data.jpg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1988117%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20AD9833%20LPSPI%20bus%20configuration%20with%20S32k358%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1988117%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20have%20referred%20the%20AN1070%20application%2C%20followed%20the%20steps%20as%20it%20is%20explained%20in%20the%20article.%20I%20am%20not%20getting%20the%20correct%20output.%3C%2FP%3E%3CP%3EMy%20logic%20analyser%20is%20not%20working%20properly%2C%20i%20am%20using%20the%20usual%20probes.%20I%20am%20able%20to%20decode%20the%20SPI%20sout%2C%20PCS0%20and%20SCLK%2C%20but%20when%20i%20measure%20the%20output%20frequency%20of%20the%20AD9833%20Vout%20pin%2C%20it%20keeps%20changing%20few%20values%20near%20to%20the%20frequency%20i%20have%20set%2C%20and%20to%20one%2Ftwo%20frequencies%20which%20are%20way%20more%20than%20the%20set%20value.%3C%2FP%3E%3CP%3EWhen%20i%20see%20examples%20where%20the%20same%20AD9833%20chip%20is%20programmed%20with%20different%20platform%20board%2C%20the%20frequency%20of%20the%20wave%20form%20is%20exactly%20equal%20to%20the%20frequency%20set.%3C%2FP%3E%3CP%3EI%20have%20also%20gone%20through%20the%20No-OS%20driver%20codes%20specific%20for%20this%20chip%20and%20i%20have%20defined%20functions%20that%20similar%20to%20the%20definitions%20in%20the%20source%20code.%20Wherever%20there%20were%20statements%20with%20no_spi%20and%20no_gpio%2C%20i%20have%20replaced%20them%20with%20Lpspi%20and%20Siul2_gpio%20functions.%3C%2FP%3E%3CP%3EI%20have%20tested%20them%20and%20i%20am%20getting%20similar%20output.%20I%20still%20dont%20know%20what%20i%20am%20missing%20out%20here.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1987760%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20AD9833%20LPSPI%20bus%20configuration%20with%20S32k358%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1987760%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EAre%20you%20saying%20that%20the%20AD9833%20is%20OK%20with%20all%20SPI%20commands%20except%20receiving%20the%20FREQREG%20register%3F%3C%2FP%3E%0A%3CP%3ESince%20you%20are%20referring%20to%20%3CA%20href%3D%22https%3A%2F%2Fwww.analog.com%2Fen%2Fresources%2Fapp-notes%2Fan-1070.html%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EAN-1070%3A%20Programming%20the%20AD9833%2FAD9834%3C%2FA%3E%2C%20have%20you%20considered%20using%20the%20same%20SPI%20Command%20Sequence%20and%20only%20modifying%20the%20frequency%20part%3F%20At%20the%20same%20time%2C%20use%20a%20logic%20analyzer%20to%20capture%20the%20SPI%20waveform%20to%20ensure%20that%20it%20is%20consistent%20with%20AN-1070%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1987074%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20AD9833%20LPSPI%20bus%20configuration%20with%20S32k358%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1987074%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20went%20trough%20it%2C%20but%20i%20want%20to%20do%20the%20data%20transfer%20using%20the%20LPSPI%20bus%20configuration.%20I%20have%20verified%20that%20my%20data%20is%20getting%20transmitted%20via%20the%20SPI%20bus%2C%20but%20when%20i%20am%20send%20the%20data%20as%20per%20the%20order%20defined%20in%20the%20No-OS%20driver%2C%20i%20am%20able%20to%20get%20the%20sine%20wave%20with%20the%20rated%20output%26nbsp%3B%20voltage%2C%20but%20not%20able%20to%20control%20the%20frequecny.%20The%20AD9833%20chip's%20vout%20voltage%20frequency%20is%20equal%20to%20the%20SPI%20SCLK%20not%20the%20frequency%20set%20in%20the%20FREQREG.%20Please%20tell%20me%20where%20i%20am%20going%20wrong.%3C%2FP%3E%3CP%3ESoumik%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1986217%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20AD9833%20LPSPI%20bus%20configuration%20with%20S32k358%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1986217%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHave%20you%20refer%20to%20%3CA%20href%3D%22https%3A%2F%2Fwiki.analog.com%2Fresources%2Ftools-software%2Fuc-drivers%2Fad9833%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EAD9833%20-%20Microcontroller%20No-OS%20Driver%3C%2FA%3E%3F%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fanalogdevicesinc%2Fno-OS%2Fblob%2Fmain%2Fdrivers%2Ffrequency%2Fad9833%2Fad9833.c%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fanalogdevicesinc%2Fno-OS%2Fblob%2Fmain%2Fdrivers%2Ffrequency%2Fad9833%2Fad9833.c%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fanalogdevicesinc%2Fno-OS%2Fblob%2Fmain%2Fdrivers%2Ffrequency%2Fad9833%2Fad9833.h%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fanalogdevicesinc%2Fno-OS%2Fblob%2Fmain%2Fdrivers%2Ffrequency%2Fad9833%2Fad9833.h%3C%2FA%3E%3CBR%20%2F%3EPlease%20use%20a%20logic%20analyzer%20to%20check%20whether%20the%20SPI%20sent%20to%20AD9833%20is%20correct.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1985599%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20AD9833%20LPSPI%20bus%20configuration%20with%20S32k358%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1985599%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EYes%20i%20have%20connected%20the%20FSYNC%20pin%20of%20the%20AD9833%20chp%20to%20LPSPI-PCS0%20pin.%20I%20am%20getting%20SPI%20sout%2C%20serial%20clock%20and%20Chip%20select%20at%20the%20AD9833%20pins.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22soumik1506_0-1730383851398.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22soumik1506_0-1730383851398.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F307935i2F33BF236D35DA0D%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22soumik1506_0-1730383851398.png%22%20alt%3D%22soumik1506_0-1730383851398.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EEven%20after%20making%20the%20changes%20you%20have%20highlighted%20in%20the%20images%2C%26nbsp%3B%20i%20am%20still%20not%20getting%20output%20from%20the%20AD9833%20VOUT%20pin.%20I%20have%20tried%20with%20different%20FREQREG%20values%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1985446%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20AD9833%20LPSPI%20bus%20configuration%20with%20S32k358%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1985446%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%3C%2FP%3E%0A%3CP%3ESince%20AD9833%20is%20not%20a%20product%20of%20NXP%2C%20I%20don't%20know%20much%20about%20it.%20I%20read%20its%20manual%20and%20found%20that%20the%20following%20highlighted%20part%20needs%20to%20be%20modified.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22AD9833%20LPSPI%20configuration.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22AD9833%20LPSPI%20configuration.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F307890iBF28002A325BC6BC%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22AD9833%20LPSPI%20configuration.jpg%22%20alt%3D%22AD9833%20LPSPI%20configuration.jpg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EDid%20you%20connect%26nbsp%3B%3CSPAN%3EFSYNC%26nbsp%3Bto%20PCS0%3F%26nbsp%3BAccording%20to%20my%20understanding%2C%20FSYNC%20pin%20should%20be%20the%20Chip%20Select%20pin%20of%20SPI.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EPlease%20use%20a%20logic%20analyzer%20to%20capture%20the%20SPI%20communication%20waveform.%20If%20you%20have%20used%20AD9833%20before%20and%20are%20familiar%20with%20its%20control%2C%20it%20is%20recommended%20to%20observe%20the%20SPI%20waveform%20to%20check%20whether%20it%20is%20correct.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22AD9833%20Figure%204.%20Serial%20Timing.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22AD9833%20Figure%204.%20Serial%20Timing.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F307894i169E8E85F47A8F67%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22AD9833%20Figure%204.%20Serial%20Timing.jpg%22%20alt%3D%22AD9833%20Figure%204.%20Serial%20Timing.jpg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EBest%20Regards%2C%3CBR%20%2F%3ERobin%3CBR%20%2F%3E-------------------------------------------------------------------------------%3CBR%20%2F%3ENote%3A%3CBR%20%2F%3E-%20If%20this%20post%20answers%20your%20question%2C%20please%20click%20the%20%22Mark%20Correct%22%20button.%20Thank%20you!%3C%2FP%3E%0A%3CP%3E-%20We%20are%20following%20threads%20for%207%20weeks%20after%20the%20last%20post%2C%20later%20replies%20are%20ignored%3CBR%20%2F%3EPlease%20open%20a%20new%20thread%20and%20refer%20to%20the%20closed%20one%2C%20if%20you%20have%20a%20related%20question%20at%20a%20later%20point%20in%20time.%3CBR%20%2F%3E-------------------------------------------------------------------------------%3C%2FP%3E%3C%2FLINGO-BODY%3E