2024-11-17 06:02 AM - edited 2024-11-19 02:37 AM
I haven't been able to wait 500ms without affecting the timers for 7 days.
In this block, doesn't PB14 become "0" after 500ms?
Even if I use comment lines, it doesn't work.
Note: volatile uint32_t Counter = 0;
The "Counter" variable is incremented every 1ms with Timer16.
** STM32F030C6T6 I'm using.
** Own PCB board..
*** Note: Card of a working system.. There is no card design error.
if(htim->Instance==TIM16)
{
Counter++;
if(HAL_GPIO_ReadPin(GPIOC, GPIO_PIN_13)==0)
{
if(HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_2)==0)
{
if(PA10_On==0)
{
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_12,GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_14,GPIO_PIN_SET);
Counter=0;
PA10_On=1;
// Tick_PA10_On= HAL_GetTick();
// PA10_On=1;
}
else
{
if(Counter>500) // if((HAL_GetTick()-Tick_PA10_On)>=500)
{
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_14,GPIO_PIN_RESET);
Counter=501;
}
}
}
else
{
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_12,GPIO_PIN_SET);
}
}
else
{
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_12,GPIO_PIN_RESET);
}
}
Solved! Go to Solution.
2024-11-18 10:11 PM
I am reading what you say by translating. I do not understand some of the statements. Is TimeBase Source: SysTick selected?
2024-11-18 10:32 PM
2024-11-18 11:30 PM
TIM16 and debug serial wire .
2024-11-18 11:44 PM
Did we ever establish what memory is mapped at Zero in yet another thread about the issue of not getting SysTick interrupts.
Didn't see a dump of 0x00000000 vs 0x08000000
Let's try not going in circles for another week.
2024-11-19 12:31 AM
I can't understand what you're saying. Can you tell me exactly what I should do? And I want to state again that I'm a beginner. Is it a hardware problem that the systick is not working? If it can be solved, what exactly should I write and where? Can you please tell me step by step. I don't understand some of what you're saying at all, I'm very sorry.
2024-11-19 12:36 AM
Perhaps start with a memory view in the debugger.
Anyone at your place of work who can guide/support you?
Check what BOOT0 pin is doing in your design. Pulled Low?
2024-11-19 01:21 AM
I took the card on a working system.I am trying to program and learn from scratch.I deleted the program inside and was learning little by little.but now I am very annoyed that a very simple HAL_Delay function is not working.I have been trying to delay time with GetTick() for 1 week but it turns out the problem is somewhere else.
2024-11-19 01:25 AM
boot0 is connected to GND..
2024-11-19 01:59 AM
timer16 and SerialWire what do you want me to do
2024-11-19 02:32 AM - edited 2024-11-19 02:32 AM
Can you share what your exact MCU model is and what your development board is? And then update it in your start post too. Makes it easier for others to help or others who have the same problem to find a solution.