2025-03-07 3:03 AM
Hello everyone.
I am encountering a very strange issue with the STM32H7B0 using the J-Link to debug.
I followed this tutorial to control the WS28B12 LED using Timer, PWM and DMA.
I use the following function to transmit the PWM data.
if (HAL_TIM_PWM_Start_DMA(&htim1, TIM_CHANNEL_1, address, 74) != HAL_OK) Error_Handler();
But here comes the strange thing:
If i run the code, nothing happens, or lets say, the data doesn't get transmitted:
But if i look at value of the address variable in the debugger before running the ...Start_DMA...:
And then Resume the program it suddenly works:
Why does this happen?
Any help is appreciated
Solved! Go to Solution.
2025-03-07 3:53 AM
Hello @Simi_Myr,
The behavior that you're describing, where the program works after inspecting the variable in the debugger, means that there might be a timing issue or a need for a delay! This is probably related to the debug mode settings.
Try adding a breakpoint in your callback function to monitor the execution flow and ensure that the source data has been transferred to the destination buffer
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-03-07 3:53 AM
Hello @Simi_Myr,
The behavior that you're describing, where the program works after inspecting the variable in the debugger, means that there might be a timing issue or a need for a delay! This is probably related to the debug mode settings.
Try adding a breakpoint in your callback function to monitor the execution flow and ensure that the source data has been transferred to the destination buffer
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-03-07 6:26 AM
> the data doesn't get transmitted
Looks like your code sets everything to 0, or at least most of it (50/74 values) but we can't see the rest. The data looks like a bunch of 0's being transmitted.