SPI frequency Nucleo STM32F411

23 Oct 2015

Hello,

at the moment i am workink with the STM32F411 and i am using the Nucleo SPI Library. I wanna control a DAC with the STM32 Board. If i define a clock frequency of 50 MHz i receive a clockrate of 50 MHz at the output but with a break time of 1 µs. Do you know how i can improve the break time between two SPI pulse?

here is my code

include the mbed library with this snippet

SPI device(D11, D12, D13);  

int main() {

   

    write_out(40960); // Clock data to shift register on rising Edge

    wait_us(2);
       


    while(1) {


        device.write(i);    
     
    }
}
23 Oct 2015

include the mbed library with this snippet

#include "mbed.h"




int f=50000000;       




int main() {

   
    device.frequency(f);   
    device.format(16,0);  
             
    write_out(40960); // Clock data to shift register on rising Edge

    wait_us(2);
       
    while(1) {
      
       
        device.write(10);     
         
    }
}