stm32f7 support status? :)

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

Moderator: RoccoMarco

Rick Burnett
Posts: 150
Joined: Tue Jan 08, 2013 2:20 pm

Re: stm32f7 support status? :)

Post by Rick Burnett »

Using this to prevent the optimizations allows the linker to have to problem:

Code: Select all

# Enable this if you want link time optimizations (LTO)
ifeq ($(USE_LTO),)
  USE_LTO = no
endif


Will use that for now.
Rick Burnett
Posts: 150
Joined: Tue Jan 08, 2013 2:20 pm

Re: stm32f7 support status? :)

Post by Rick Burnett »

Code is partially running which is a huge step.

I've changed my timing after reading through the manual and because of that, I need to do some more digging into why the I2C and FMC is not working at the moment. I'm sure I have something not calculated properly now. But, glad to see the code executing.

Given I am not using USB_OTG except for flashing in the future, I realized, no reason to run the system at a slower speed to utilize the 48MHz since I can use the boot sequence (holding down a pin when powering up) to use that feature, so now I am using 216MHz.

Will continue tomorrow night on the port, hope my experiences help others moving from 2.6+ to 3.0+ (and from F4 to F7).
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: stm32f7 support status? :)

Post by Giovanni »

Note that the F7 port is not yet finished, there are a lot of things that could not work, mainly because that cache issue.

Giovanni
Rick Burnett
Posts: 150
Joined: Tue Jan 08, 2013 2:20 pm

Re: stm32f7 support status? :)

Post by Rick Burnett »

Giovanni wrote:Note that the F7 port is not yet finished, there are a lot of things that could not work, mainly because that cache issue.

Giovanni


Understood. For that reason, I may switch back to the F4 for now to finish development on my prototype since I have 2 1/2 weeks before I am going to show it and given the number of unknowns, the other system is very close to fully working. I had been hoping for a closer map from the F4, but it is what it is in terms of hardware.

Given the hardware is the same, as I go into production later this year, if the F7 port is further along, then I can attempt to switch then.
Anubirux
Posts: 39
Joined: Sat Apr 21, 2012 2:28 pm

Re: stm32f7 support status? :)

Post by Anubirux »

I have found some strange behave. I tried to use FPU. I switched it on by writing "hard" parameter. And trying to start mcu ends in _unhandled_exception. Source of irq was "1 Reset_Handler() 0x08000210" which is "08000210: vmsr fpscr, r0". What is more interesting when I step by step this instruction MCU starts normally and FPU is working just fine. Also found a solution.
Modification in crt0_v7m.s

Code: Select all

#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

                /* CPACR initialization.*/
                movw    r0, #CRT0_CPACR_INIT & 0xFFFF
                movt    r0, #CRT0_CPACR_INIT >> 16
                movw    r1, #SCB_CPACR & 0xFFFF
                movt    r1, #SCB_CPACR >> 16
                str     r0, [r1]
                dsb
                isb

                /* FPU FPSCR initially cleared.*/
                mov     r0, #0
                vmsr    FPSCR, r0

                /* FPU FPDSCR initially cleared.*/
                movw    r1, #SCB_FPDSCR & 0xFFFF
                movt    r1, #SCB_FPDSCR >> 16
                str     r0, [r1]

                /* Enforcing FPCA bit in the CONTROL register.*/
                movs    r0, #CRT0_CONTROL_INIT | CONTROL_FPCA

#else


adding isb, dsb instructions after each str instruction solves a problem. Then I checked where exactly they were necessary: after FPCCR and CPACR initialization. After /* FPU FPDSCR initially cleared.*/ I could remove them and still have working MCU.
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: stm32f7 support status? :)

Post by Giovanni »

Interesting, may be this is required because the longer pipeline of the M7.

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

Re: stm32f7 support status? :)

Post by Giovanni »

I committed the change, thanks.

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

Re: stm32f7 support status? :)

Post by Giovanni »

I am stuck, I committed a test demo for SPI but there are problems, the DMA does not seem to generate interrupts and the driver hangs in spiExchange().

It seems to transmit because the stream 4 (TX) counter reaches zero (but no interrupt), the RX stream 3 seems to not be triggered at all by SPI, the counter remains at 512.

The ADC driver worked with DMA, very strange.

Giovanni
Anubirux
Posts: 39
Joined: Sat Apr 21, 2012 2:28 pm

Re: stm32f7 support status? :)

Post by Anubirux »

Hello ;)
In next few weeks when I receive PCBs I will have to use SPI with stm32f7 and I can help make it working. For now I use I2C in IRQ mode ( I use it to interact with touch panel from discovery board) and its OK.
sting
Posts: 1
Joined: Sat Aug 06, 2016 10:53 pm

Re: stm32f7 support status? :)

Post by sting »

m new to Chibios and have I couple of projects that I want ti use the STM32F7 with the Chibios/RT project. I can't tell from this thread if this board is know to be supported. The last thread was some time ago. Any help would be appreciated.
Post Reply