When programming the ADF-4355-3 on the Analog Devices EVAL board using an STM32F030R8 microcontroller with the SPI bus connected to TP3,4,5, I found that I had to power the EVAL board before powering the STM32F030R8. If I did not, I could not initialize the ADF-4355-3 even if I reset the microcontroller after both devices were powered. One successful solution was to add some delay before programming and initializing the GPIO.
1) I have 4 bit banged SPI busses to program 16 ADF-4355-3s
2) LE GPIO pin(s) are initialized low after making them outputs
3) MOSI and SCLK are initialized high after making them outputs
4) I did not modify the EVAL board to include a pull-up on the LE signal.
//************************************ Setup ****************************************
void setup() {
SystemClock_Config();
delay(5000); <<<<<<<<< If I don't add some delay here, the EVAL board cannot be initialized. 5000ms is excessive, but OK for now in this application.
// Initialize the IWDG (WatchDog) with 4 seconds timeout.
// This would cause a CPU reset if the IWDG timer
// is not reloaded in approximately 4 seconds.
IWatchdog.begin(4000000);
/* Setup Bank Select Pins - BANK A is low order bit */
pinMode(BANKA, INPUT_PULLUP);
pinMode(BANKB, INPUT_PULLUP);
pinMode(BoardSelect, INPUT_PULLUP);
// 0 = STALO, 1 = TRANSMIT
SelectedBoard = (digitalRead(BoardSelect) & 0x0001);
// Configure GPIO
pinMode(LOCKLAMP, OUTPUT);
pinMode(ACTIVITYLED, OUTPUT);
digitalWrite(ACTIVITYLED, LOW);
/* Setup Load Enable and Lock Detect Pins */
for (int s = 0; s <= 16; ++s) {
pinMode(ADF4355_LE[s], OUTPUT);
digitalWrite(ADF4355_LE[s], HIGH);
pinMode(ADF4355_LD[s], INPUT_PULLUP);
}
/* Setup MOSI and SCLK Pins */
for (int s = 0; s <= 3; ++s) {
pinMode(ADF4355_MOSI[s], OUTPUT);
digitalWrite(ADF4355_MOSI[s], LOW);
pinMode(ADF4355_SCLK[s], OUTPUT);
digitalWrite(ADF4355_SCLK[s], LOW);
}
Initialize4355();
}
I wanted to share that for anyone who's code is "correct", but is not successful at programming the ADF-4355-3 device. I may also decide to put pull-ups on the 15 LE signals.