Skip to main content
Visitor II
August 29, 2024
Solved

SPI1 channel getting afftected when SPI2 and SPI3 are used with DMA triggered with timer

  • August 29, 2024
  • 2 replies
  • 809 views

Hi Team,

We are using a STM32F407ZG MCU and we have a UI interface (LCD, Keypad, touch) on SPI1 polling method.

We are using SPI2 and SPI3 for DAC interfacing. We have used DMA with time triggered for the SPI2 and managing the SPI3 with Timer.

During testing we are seeing the touch is freezing after enabling the SPI2 and SPI3.

Individually all are working fine.

Appreciate any lead on this.

Thanks,

Maqsood

 

    This topic has been closed for replies.
    Best answer by TDK

    The peripherals are independent. There's no reason they can't all be working simultaneously.

    > During testing we are seeing the touch is freezing after enabling the SPI2 and SPI3.

    Debug the code. When the problem happens, pause the code and examine the state of the system. Is code stuck somewhere? Is the spi state machine values as expected? When you do something and expect a response, do the appropriate locations of the code get executed? Etc.

    No shortcuts to debugging, gotta do the work.

    2 replies

    TDKAnswer
    Super User
    August 29, 2024

    The peripherals are independent. There's no reason they can't all be working simultaneously.

    > During testing we are seeing the touch is freezing after enabling the SPI2 and SPI3.

    Debug the code. When the problem happens, pause the code and examine the state of the system. Is code stuck somewhere? Is the spi state machine values as expected? When you do something and expect a response, do the appropriate locations of the code get executed? Etc.

    No shortcuts to debugging, gotta do the work.

    MaqsoodAuthor
    Visitor II
    September 5, 2024

    Thank you for the reply. Yes, we also believed only the debugging the code has to be done.

    By the way the issue is resolved after finding the issue with SPI clock configured by narrowing down the scenario where it was reproducible.