2024-11-18 12:48 PM - edited 2024-11-18 12:58 PM
Hal_Delay çalışmayı durdurdu ( STM32F030C6T6 )
Forumda buna benzer birçok konu okudum ama bir çözüm bulamadım. Sanırım sorunun kaynağının bu olduğunu anlayalı 7-8 gün oldu. Hal_Delay() çalışmadığı için GetTick() fonksiyonunu da kullanamıyorum. Basit testler yaparken Hal_delay() fonksiyonunun da çalışmadığını fark ettim. Bu sorunun üstesinden gelmeme yardım edebilir misin? Proje dosyası ektedir.
2024-11-18 01:06 PM
What's going on with BOOT0 pin ?
Dump Memory at 0x00000000 ? Same as 0x08000000 ?
Make sure FLASH is mapped at ZERO so the interrupts work.
HAL_Init() should be bringing up the SysTick
/*SYSCFG clock enable*/
LDR R0,=0x40021018
LDR R1,=0x00000001
STR R1, [R0]
/*Set CFGR1 register with flash memory remap at address 0*/
LDR R0,=0x40010000
LDR R1,=0x00000000
STR R1, [R0]
2024-11-18 01:11 PM
printf("SYSCFG CFGR %08X\n", *((uint32_t *)0x40010000) );
2024-11-18 01:14 PM
I am a beginner in STM32. What exactly should I do? I don't know enough to understand what you are saying. But if you explain, maybe I can make the necessary corrections.
2024-11-18 01:18 PM
If it is like that, my project file is in the first message. Can you make corrections from there?
2024-11-18 01:20 PM - edited 2024-11-18 01:21 PM
Start by confirming what's visible to the debugger at 0x08000000 and 0x00000000
Perhaps get STDIO putchar/puts/printf working? So you can output workable diagnosis.
Perhaps view SYSCFG->CFGR1 in the debugger's peripheral register view
The CM0 used in the STM32F0 can't remap the Vector Table via SCB->VTOR
Edit your startup_stm32f030.s
...
.section .text.Reset_Handler
.weak Reset_Handler
.type Reset_Handler, %function
Reset_Handler:
ldr r0, =_estack
mov sp, r0 /* set stack pointer */
/* Call the clock system initialization function.*/
bl SystemInit
/* Check if boot space corresponds to test memory*/
/*SYSCFG clock enable*/
LDR R0,=0x40021018
LDR R1,=0x00000001
STR R1, [R0]
/*Set CFGR1 register with flash memory remap at address 0*/
LDR R0,=0x40010000
LDR R1,=0x00000000
STR R1, [R0]
/* Copy the data segment initializers from flash to SRAM */
ldr r0, =_sdata
ldr r1, =_edata
ldr r2, =_sidata
movs r3, #0
b LoopCopyDataInit
CopyDataInit:
ldr r4, [r2, r3]
str r4, [r0, r3]
adds r3, r3, #4
LoopCopyDataInit:
adds r4, r0, r3
cmp r4, r1
bcc CopyDataInit
/* Zero fill the bss segment. */
ldr r2, =_sbss
ldr r4, =_ebss
movs r3, #0
b LoopFillZerobss
FillZerobss:
str r3, [r2]
adds r2, r2, #4
LoopFillZerobss:
cmp r2, r4
bcc FillZerobss
/* Call static constructors */
bl __libc_init_array
/* Call the application's entry point.*/
bl main
LoopForever:
b LoopForever
.size Reset_Handler, .-Reset_Handler
...
2024-11-18 01:24 PM
or beginning of main()
__HAL_RCC_SYSCFG_CLK_ENABLE();
SYSCFG->CFGR1 &= ~3; // MEM_MODE=00b USER FLASH
2024-11-18 01:31 PM
Or you could put this stuff in your GitHub..
Assume you can edit files.
2024-11-19 12:40 AM
??
2024-11-19 01:06 AM
test10mod.rar should I use this file?
I couldn't understand it.
What should I do?
I'm still a beginner.