cancel
Showing results for 
Search instead for 
Did you mean: 

SPI peripheral configuration help

marcusdufrane
Associate III

Have been struggling to get SPI to work. I have been working in the engineering boot mode to try and trouble shoot my issues.

I have configured PLL3 to run the MCU at 48MHz and the SPI peripheral kernel clk to run at 108MHz and selected the clock sources in the RCC regs accordingly, I have implemented the procedure for configuring SPI in the related section in the reference manual. The GPIO have been configured to their appropriate modes and alternate functions. I have enabled the peripheral bus in RCC.

I am able to confirm the register setting via the debugger.

However, when I try to send data, I see nothing on the GPIO. I also don't see any flags reported when attempting to overfill the TXFIFO to elicit a response from the peripheral.

I am not using the HAL library directly, though I have looked through it to see what I may have missed to no avail.

Can anyone let me know if there is another enable bit, power bit or otherwise that I may be overlooking?

1 ACCEPTED SOLUTION

Accepted Solutions
marcusdufrane
Associate III

Simple questions have stupid simple answers. Was simply missing that MODF was being set due to a config error when using software nss.

View solution in original post

2 REPLIES 2
marcusdufrane
Associate III

Simple questions have stupid simple answers. Was simply missing that MODF was being set due to a config error when using software nss.

PatrickF
ST Employee

Hi,

Please confirm you are using an STM32MP15x ?

Glad to see you solved your issue.

Usually trying generating code using CubeMX and do side-by-side comparisons will help.

Examples provided on CubeMP1 in Projects\STM32MP157C-DK2\Examples\SPI folder could also help you.

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.