cancel
Showing results for 
Search instead for 
Did you mean: 

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

M.CHN
Associate III

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 ;)

1 ACCEPTED SOLUTION

Accepted Solutions
M.CHN
Associate III

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 ^^

View solution in original post

3 REPLIES 3
berendi
Principal

> 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
Associate III

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 ^^

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

JW