Using OV9655 camera by STM32F429 (DCMI)

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

A319
Posts: 48
Joined: Thu Feb 05, 2015 9:52 am
Has thanked: 2 times
Been thanked: 3 times

Re: Using OV9655 camera by STM32F429 (DCMI)

Post by A319 »

Good morning,

Yes true. I've fixed this. (I hope it's working)

File patch crt0_v7m.s

Code: Select all

Reset_Handler:
                /* Interrupts are globally masked initially.*/
                cpsid   i

                /* PSP stack pointers initialization.*/
                ldr     r0, =__process_stack_end__
                msr     PSP, r0

+                b LoopCopyDataInit1
+CopyDataInit1:
+                ldr  r3, =__ram4_start__
+                ldr  r3, [r3, r1]
+                str  r3, [r0, r1]
+                adds  r1, r1, #4
+LoopCopyDataInit1:
+                ldr  r0, =__ram4_start__
+                ldr  r3, =__ram4_end__
+                adds  r2, r0, r1
+                cmp  r2, r3
+                bcc CopyDataInit1

#if CRT0_INIT_FPU == TRUE
                /* FPU FPCCR initialization.*/
                movw    r0, #CRT0_FPCCR_INIT & 0xFFFF
                movt    r0, #CRT0_FPCCR_INIT >> 16
                movw    r1, #SCB_FPCCR & 0xFFFF
                movt    r1, #SCB_FPCCR >> 16
                str     r0, [r1]
                dsb
                isb

http://www.st.com/web/en/resource/techn ... 083249.pdf Page 20...21

But I wonder how the linker knows, that initialization code is missing in the startup section. :o The error still is still occurring.

Sven
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Using OV9655 camera by STM32F429 (DCMI)

Post by Giovanni »

Hi,

That code looks too complex, try using the same snippet that initializes the data segment.

Anyway, I am going to introduce a standard initialization/copy mechanism in startups soon™.

Giovanni
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: Using OV9655 camera by STM32F429 (DCMI)

Post by mobyfab »

Giovanni,

That would be really cool, as there is a lot of memory types on modern MCUs (SDRAM, Quad SPI Flash, CCM...)

No more ninja startup/linker files :)
A319
Posts: 48
Joined: Thu Feb 05, 2015 9:52 am
Has thanked: 2 times
Been thanked: 3 times

Re: Using OV9655 camera by STM32F429 (DCMI)

Post by A319 »

Hi,

mobyfab wrote:No more ninja startup/linker files :)

ROFL :D Actually I'm really impressed about the power of ChibiOS.

I'll wait for the CCM implementation. :) Hope this will happen very soon :D
Meanwhile I've added some descriptive informations on the Markdown file and added ChibiOS as a git submodule, so there's no need to do many changes in order to use this example. :)

https://github.com/DL7AD/STM32F429-DCMI

Sven
Post Reply