Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


JTAG Error at Inconsistant Locations in Code

Pasted below is the information copied from STM32CubeMX’s Pin Configuration’s SYS tab:
PA13 SYS_JTMS-SWDIO n/a n/a n/a n/a false
PA14 SYS_JTCK-SWCLK n/a n/a n/a n/a false
PA15 SYS_JTDI n/a n/a n/a n/a false
PB3 SYS_JTDO-TRACESWO n/a n/a n/a n/a false
PE2 SYS_TRACECK Alternate Function Push Pull No pull up pull down Low n/a false
PE3 SYS_TRACED0 Alternate Function Push Pull No pull up pull down Low n/a false
PE4 SYS_TRACED1 Alternate Function Push Pull No pull up pull down Low n/a false
PE5 SYS_TRACED2 Alternate Function Push Pull No pull up pull down Low n/a false
PE6 SYS_TRACED3 Alternate Function Push Pull No pull up pull down Low n/a false

The proper JTAG assignments appear to have been done in STM32CubeMX. However in the code that STM32CubeMX generated the JTAG error I get does happen when GPIOA is configured. Here is that code:

/*Configure GPIO pins : PAPin PAPin */
GPIO_InitStruct.Pin = Test_PointA2_Pin|Test_PointA9_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_PULLDOWN;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

There is no change made to pins PA13, PA14, or PA15 here. But it is suspicious that it happens when changes to pins on this port that contains these JTAG pins are are done.

When the above is commented out I find the JTAG error also happens here:

/*Configure GPIO pin : PB10 */
GPIO_InitStruct.Pin = GPIO_PIN_10;
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

Once again it happens when a port that contains JTAG pins has one of its non JTAG pins changed.

But it also happens here:

/*Configure GPIO pins : PBPin PBPin PBPin PBPin */
GPIO_InitStruct.Pin = PWM2_TIM15_Ch1_Alternate_Pin|PWM2_TIM15_Ch1N_Alternate_Pin|JTAG_TRST_Pin|USART_INVALID_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

Which does change a JTAG pin. Obviously the ST-Link V2 ISO is functioning up to this point, so I see no reason for STM32CubeMX to assign these JTAG pins. Should I remove all the JTAG pin assignments from the STM32CubeMX project file?

 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs