2024-05-27 12:31 AM
When i debug SPI1 on STM32F407, program will jump to 0x00 when write DR register, MCU reset and loop continuely. when i measure the SCLK signal using oscillator, SCLK is always high after SPI1 is enabled
I searched on the net, and this is suggest that SPI1 SCLK shared same pin with JTAG-TDO, Jtag should be disabled, but for 407, there is no the JTAG disable instruction in HAL.
Is there anyone can help me on this or give me some hints? Thanks
Solved! Go to Solution.
2024-05-27 12:43 AM
Why dont you use PA5 for SPI1 sck ? Then no conflict with JTAG/debug .
+
You have to set debug/trace in Cube, then the associated pins are used for this;
and you cannot use them at same time for debug...logically.
+
There is only a clk on SPI , when transmitting data. (So 16 clks , when sending 16 bits, otherwise line is "quiet".)
2024-05-27 12:43 AM
Why dont you use PA5 for SPI1 sck ? Then no conflict with JTAG/debug .
+
You have to set debug/trace in Cube, then the associated pins are used for this;
and you cannot use them at same time for debug...logically.
+
There is only a clk on SPI , when transmitting data. (So 16 clks , when sending 16 bits, otherwise line is "quiet".)