cancel
Showing results for 
Search instead for 
Did you mean: 

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

Maqsood
Associate

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Guru

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.

If you feel a post has answered your question, please click "Accept as Solution".
Maqsood
Associate

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.