AnsweredAssumed Answered

SPI commands on 9910 eval board not working

Question asked by peach on Oct 31, 2016
Latest reply on Nov 1, 2016 by peach

I am using the 9910 eval baord and have connected the jumpers in the manner which would allow for SPI communication. 

 

I have verified that all my commands are formatted correctly using a logic analyzer and that all signals are connected as need, I assume, for SPI commands to work correctly. However there is no response from the 9910 Eval board.

 

I am just trying to create a single tone from a profile, so I am configuring CFR 2 & 3, and then writring the values into profile 0 register, and selecting profile 0 via the profile pins. 

 

When I look on the spectrum analyzer there is nothing.  Does anyone have any ideas?  I am using STM-Nucleo32 F401RE to communicate via SPI.  And I have a sin wave input at 10MHz with 2 VPP and 0 offset. 

 

And yes, I have 3.3V into the 3.3 power and 1.8V into the 1.8 power.



Here is my task which sets up the SPI:
(It wont let me format the code into a readable format?)

void vdebugTask(void const * argument)
{
/* USER CODE BEGIN vdebugTask */

char cfr2[4];
cfr2[0] = 0x01;
cfr2[1] = 0x40;
cfr2[2] = 0x08;
cfr2[3] = 0x20;
char buf[4] = "init";
char cmd[1];
cmd[0] = 0x81;
/* Infinite loop */
char ch_cfr2[1];
ch_cfr2[0] = 0x01;

char prf0_write[1];
prf0_write[0] = 0x0E;

char ch_cfr3[1];
ch_cfr3[0] = 0x02;

char cfr3[4] ;
cfr3[0] = 0x17;
cfr3[1] = 0x38;
cfr3[2] = 0xC1;
cfr3[3] = 0x00;

char prf0_vals[8];
prf0_vals [0] = 0x30;
prf0_vals [1] = 0x00;
prf0_vals [2] = 0x28;
prf0_vals [3] = 0xBF;
prf0_vals [4] = 0x55;
prf0_vals [5] = 0x6A;
prf0_vals [6] = 0xAA;
prf0_vals [7] = 0xAB;

for(;;)
{
if (init )
{
set_profile0();

HAL_SPI_Transmit(&hspi3, (uint8_t *) ch_cfr2, 1, 10);
IO_Update_Up();
vTaskDelay(5 / portTICK_RATE_MS);
IO_Update_Reset();

HAL_SPI_Transmit(&hspi3 ,(uint8_t *) cfr2, 4, 10);
IO_Update_Up();
vTaskDelay(5 / portTICK_RATE_MS);
IO_Update_Reset();

HAL_SPI_Transmit(&hspi3,(uint8_t *) ch_cfr3, 1, 10);
IO_Update_Up();
vTaskDelay(5 / portTICK_RATE_MS);
IO_Update_Reset();

HAL_SPI_Transmit(&hspi3 , (uint8_t *) cfr3, 4, 10);
IO_Update_Up();
vTaskDelay(5 / portTICK_RATE_MS);
IO_Update_Reset();

HAL_SPI_Transmit(&hspi3,(uint8_t *) prf0_write, 1, 10);
IO_Update_Up();
vTaskDelay(5 / portTICK_RATE_MS);
IO_Update_Reset();

HAL_SPI_Transmit(&hspi3 , (uint8_t *) prf0_vals, 8, 10);
IO_Update_Up();
vTaskDelay(5 / portTICK_RATE_MS);
IO_Update_Reset();

init = 0;

}
else
taskYIELD();


//HAL_I2C_Master_Transmit(&hi2c1, (0x50), (uint8_t *) clr, 2, 10);
//vTaskDelay(1000);

// Profile 1 = > 0x300028BF556AAAAB
// fclk - 122.88 MHz && fout = 41 MHz

// CFR 2 -> 0x01400820
// enables amplitude scalar


vTaskDelay(1000);
}


/* USER CODE END vdebugTask */
}

Outcomes