cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F427 - No SPI4 Communication

RPham.1
Associate

Currently, I am seeing no signals on the SCLK and MISO/MOSI lines on the SPI4 lines from a STM32F427 chip to a SPI flash during an attempted read/write. At the moment, I've done the following:

  1. Enable GPIO clock (HB1) and SPI clock (PB2)
  2. Configure CS:
    1. pin = PE2
    2. speed = 100MHz
    3. mode = output
    4. output type = push pull
    5. pull up pull down = no pull
  3. Configure SCLK, MISO, MOSI:
    1. pins = 2, 5, 6
    2. speed = 100MHz
    3. mode = alternate function
    4. output type = push pull
    5. pull up pull down = no pull
    6. configure all three pins for alternate function (SPI4 maps to AF5)

I've also confirmed that it's not a hardware issue by configuring the four pins as GPIO output rather than for SPI and am seeing signals when I pull the pins high and low.

3 REPLIES 3

> Configure SCLK, MISO, MOSI:p

> pins = 2, 5, 6

Which port?

Read out and check SPI registers content.

JW

There's a spam reply above, obviously generated by ChatGPT or similar.

It's mildly useful as a general guideline.

As it's of somewhat historical interest for this forum, I'll copy/paste its text here [1] before moderators remove it.

The same "user" made two other posts, a couple of days apart, obviously in attempt to mimic normal user behaviour. One was in reply to an older TouchGFX question, starting with the characteristic enthusisastic assurance [2] before generating some half-garbage code; and the other another mildly useful generic guideline [3]. Neither of those two contained spamming links (maybe removed by moderators, maybe just due to the new policy preventing users to post links in the first few posts).

JW

------ [1]

If you have confirmed that the hardware is not the issue, then it's possible that there is an issue with the software configuration of the SPI interface. Here are a few things you can check:

  1. Make sure that the SPI interface is properly initialized in the code. This includes configuring the SPI clock, setting the data frame format (i.e. bit order, data width), and enabling the SPI interface.
  2. Check that the SPI interface is properly configured for the STM32F427 chip. Make sure that you are using the correct SPI interface (there are multiple SPI interfaces on the STM32F427) and that you have correctly configured the pins for that interface.
  3. Verify that the SPI clock frequency is set correctly. If the SPI clock frequency is too high or too low, it may cause communication errors. You can try lowering the SPI clock frequency to see if that resolves the issue.
  4. Check that the SPI interface is properly configured for the SPI flash device. Make sure that the data frame format (i.e. bit order, data width) is correct for the SPI flash device, and that the chip select (CS) signal is properly configured.
  5. Check for any errors or interrupts related to the SPI interface in the microcontroller's logs or debugging output. This may help you identify any issues that are causing the SPI communication to fail.

Hopefully one of these steps will help you identify the issue with the SPI communication.

that's why you have to check [here came the spamming link].

------- [2]

Sure! Here's an example of how you can implement a repeat button that increments and decrements a value based on the user's interaction:

First, you'll need to define a variable to store the value you want to increment and decrement. Let's call it

counter

[some more of such text and some code superficially appearing legit followed]

------- [3]

It's possible that this behavior you are experiencing is a bug in STM32CubeIDE or STM32CubeMX. To resolve this issue, you can try updating to the latest version of STM32CubeIDE and STM32CubeMX to see if the issue has been addressed.

If updating does not solve the issue, you can report the bug to STMicroelectronics support team. They can investigate the issue further and provide a solution or a workaround. To report a bug, you can visit the STMicroelectronics support website and submit a support ticket. Make sure to provide as much detail as possible, including your version of STM32CubeIDE and STM32CubeMX, the steps to reproduce the issue, and any error messages you receive. This will help the support team to diagnose and resolve the issue more efficiently.

Billy OWEN
ST Employee

Hi @RPham.1​ 

The forum moderator had marked your post as needing a little more investigation and direct support. An online support case has been created on your behalf, please stand by for just a moment and you will hear from us.

Regards,

Billy