AnsweredAssumed Answered

i.MX287 using the SSP for SPI and data collection?

Question asked by Dan Bocko on Oct 5, 2018
Latest reply on Oct 10, 2018 by igorpadykov

Does anyone have examples for the i.MX287 using the SSP for SPI and data collection? (Using FreeRTOS)

 

This is my current configuration but I am getting no clock;

HW_PINCTRL_MUXSEL5_bit.BANK2_PIN16 = 0; //   Select SSP2_SCK
HW_PINCTRL_DRIVE10_bit.BANK2_PIN16_V = 1; // 3.3V
HW_PINCTRL_DRIVE10_bit.BANK2_PIN16_MA = 0; // Low drive strength 
HW_PINCTRL_MUXSEL5_bit.BANK2_PIN17 = 0; //   Select SSP2_MOSI
HW_PINCTRL_PULL2_bit.BANK2_PIN17 = 1;   //   Enable internal pullup
HW_PINCTRL_DRIVE10_bit.BANK2_PIN17_V = 1; // 3.3V
HW_PINCTRL_DRIVE10_bit.BANK2_PIN17_MA = 0; // Low drive strength 
HW_PINCTRL_MUXSEL5_bit.BANK2_PIN18 = 0; //   Select SSP2_MISO
HW_PINCTRL_PULL2_bit.BANK2_PIN18 = 1;   //   Enable internal pullup
HW_PINCTRL_DRIVE10_bit.BANK2_PIN18_V = 1; // 3.3V
HW_PINCTRL_DRIVE10_bit.BANK2_PIN18_MA = 0; // Low drive strength 
HW_PINCTRL_MUXSEL5_bit.BANK2_PIN19 = 0; //   Select SSP2_SS0
HW_PINCTRL_PULL2_bit.BANK2_PIN19 = 1;   //   Enable internal pullup
HW_PINCTRL_DRIVE10_bit.BANK2_PIN19_V = 1; // 3.3V
HW_PINCTRL_DRIVE10_bit.BANK2_PIN19_MA = 0; // Low drive strength 
HW_SSP2_CTRL0_bit.RUN = 1;
HW_SSP2_CTRL0_bit.LOCK_CS = 1;
HW_SSP2_CTRL0_bit.READ = 0;
HW_SSP2_CTRL0_bit.DATA_XFER = 0;
HW_SSP2_CTRL0_bit.BUS_WIDTH = 0;
HW_SSP2_CTRL0_bit.WAIT_FOR_IRQ = 0;
HW_SSP2_CTRL0_bit.WAIT_FOR_CMD = 0;
HW_CLKCTRL_CLKSEQ_bit.BYPASS_SSP2 = 0;
HW_SSP2_TIMING_bit.TIMEOUT = 1000;
HW_SSP2_TIMING_bit.CLOCK_DIVIDE = 100;
HW_SSP2_TIMING_bit.CLOCK_RATE = 50;
HW_SSP2_CTRL1_bit.SLAVE_OUT_DISABLE = 1;
HW_SSP2_CTRL1_bit.SLAVE_MODE = 0;
HW_SSP2_CTRL1_bit.PHASE = 0;
HW_SSP2_CTRL1_bit.POLARITY = 0;
HW_SSP2_CTRL1_bit.SSP_MODE = 0;
HW_SSP2_CTRL1_bit.WORD_LENGTH = 3;

 

Thanks

Dan

Outcomes