Skip to main content
M.CHN
Associate III
July 8, 2020
Solved

Why can't I see SPI4 clk and MOSI signals in Transmit Mode Only Master STM32H743ZI2 with an oscilloscope ?

  • July 8, 2020
  • 3 replies
  • 948 views

Hello,

I am trying to use SPI programmable amplifier MCP6S21 from TI with my STM32H743ZI2 nucleo board but nothing seems to happen. When I try to observe the signals from CLK and MOSI pins, there is nothing (even when it is supposed to be transmitting data).

My SPI4 port is in Transmit Mode Only Master with a baud rate of 8Mbits/s and I transmit 8bits words. I use the HAL_SPI_Transmit(&hspi4, buf_tx, 2, 100); function to transmit.

HAL library seems to be in 1.8 version .

My CubeIDE is in 1.3.1 version and my CubeMX is in 5.6.1.202004052303 version.

Do you have any idea to help me ?

Thanks for future answers ;)

This topic has been closed for replies.
Best answer by M.CHN

It was a law level nothing :grinning_face_with_sweat:.

But I finally solved this problem, all the registers were working perfectly but one parameter on my oscilloscope was not correctly set. Now I can see my SPI command.

Thank you for your answer anyway and sorry for the disturbing ^^

3 replies

berendi
Principal
July 8, 2020

> When I try to observe the signals from CLK and MOSI pins, there is nothing

Is it a high level nothing or a low level nothing? :)

Check the RCC, SPI and GPIO registers to find out the following. Do not assume that library functions or generated code do what you think they should do.

Are the pins in the proper alternate function mode? Is their speed set according to the speed and MCU voltage?

Is SPI clocked? From what source, at what rate?

M.CHN
M.CHNAuthorBest answer
Associate III
July 8, 2020

It was a law level nothing :grinning_face_with_sweat:.

But I finally solved this problem, all the registers were working perfectly but one parameter on my oscilloscope was not correctly set. Now I can see my SPI command.

Thank you for your answer anyway and sorry for the disturbing ^^

waclawek.jan
Super User
July 8, 2020

Please select your post as Best so that the thread is marked as solved.

JW