STM32F407ZGT7 reset when write to SPI1 DR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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
- When i write to DR of SPI1, the code jump to main
- I check the SCLK keep high after SPI1 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.
- Labels:
-
STM32F4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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".)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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".)
