[DONE] The New STM32F429/F439
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: [TODO] The New STM32F429/F439
If you post the initialization code I will add it to board.c.
Giovanni
Giovanni
Re: [TODO] The New STM32F429/F439
It's in the community repo now... https://github.com/ChibiOS/ChibiOS-RT-C ... VERY-SDRAM
Some notes: https://github.com/ChibiOS/ChibiOS-RT-Community/pull/1
~ Tectu
Some notes: https://github.com/ChibiOS/ChibiOS-RT-Community/pull/1
~ Tectu
-
trepidacious
- Posts: 58
- Joined: Mon Jan 21, 2013 3:36 pm
- Been thanked: 1 time
Re: [TODO] The New STM32F429/F439
Might not be all that interesting to anyone else, but self-refresh seems to work fine, I've added some shell commands to test it:
https://github.com/trepidacious/ChibiOS-RT-Community/commit/a98f4269f9f5bfc805c646fe4cbf3fc0b30db7d0
https://github.com/trepidacious/ChibiOS-RT-Community/commit/a98f4269f9f5bfc805c646fe4cbf3fc0b30db7d0
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: [TODO] The New STM32F429/F439
Does LD5 lights up when you plug the USB cable? I continue to don't understand what is causing that.
I also noticed that you guys stopped at different memory addresses, it is like you are using different toolchains or a modified code.
Giovanni
I also noticed that you guys stopped at different memory addresses, it is like you are using different toolchains or a modified code.
Giovanni
-
trepidacious
- Posts: 58
- Joined: Mon Jan 21, 2013 3:36 pm
- Been thanked: 1 time
Re: [TODO] The New STM32F429/F439
Yes, the LED comes on when micro USB is attached, this happens on the USB serial firmware and also my version without USB serial.
I was using the summon arm toolkit, but I've switched to the GNU ARM embedded toolchain, I think this is the same version of the toolchain as ChibiStudio. I now get:
Using my non-usb demo I get the following from shell info command - does this match yours?
arm-non-eabi-gcc --version reports:
Obviously things might still be different since I'm compiling on Linux, I don't know whether the Linux and Windows versions of the same toolchain release will necessarily give exactly the same binaries, would be nice if they did
I was using the summon arm toolkit, but I've switched to the GNU ARM embedded toolchain, I think this is the same version of the toolchain as ChibiStudio. I now get:
Code: Select all
0x080075ea in otg_core_reset (usbp=0x20001148) at ../../os/hal/platforms/STM32/OTGv1/usb_lld.c:133
133 while ((otgp->GRSTCTL & GRSTCTL_CSRST) != 0)
Using my non-usb demo I get the following from shell info command - does this match yours?
Code: Select all
Compiler: GCC 4.7.4 20130913 (release) [ARM/embedded-4_7-branch revision 202601]arm-non-eabi-gcc --version reports:
Code: Select all
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.7.4 20130913 (release) [ARM/embedded-4_7-branch revision 202601]Obviously things might still be different since I'm compiling on Linux, I don't know whether the Linux and Windows versions of the same toolchain release will necessarily give exactly the same binaries, would be nice if they did
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: [TODO] The New STM32F429/F439
This could be something in the board setup files, could you check the pins related to USB? it is possible I am missing something obvious there.
Giovanni
Giovanni
-
trepidacious
- Posts: 58
- Joined: Mon Jan 21, 2013 3:36 pm
- Been thanked: 1 time
Re: [TODO] The New STM32F429/F439
Looks fine to me, the settings look very similar to board file for 407, except that VBUS is pulled down on 429, it doesn't seem like that should make any difference though. Would I be right in thinking that the loop that hangs is resetting the USB peripheral? That seems like the kind of thing that should just work regardless of anything else?
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: [TODO] The New STM32F429/F439
That loop waits for the peripheral to come out of the software reset, it is like the peripheral is stuck for some reason.
Could you try adding delays around that code and see if it makes any difference?
Giovanni
Could you try adding delays around that code and see if it makes any difference?
Giovanni
-
trepidacious
- Posts: 58
- Joined: Mon Jan 21, 2013 3:36 pm
- Been thanked: 1 time
Re: [TODO] The New STM32F429/F439
Great, that fixes it!
Code: Select all
static void otg_core_reset(USBDriver *usbp) {
stm32_otg_t *otgp = usbp->otg;
//FIXME: Makes things work for me, otherwise hangs on following loop.
chThdSleepMilliseconds(1);
/* Core reset and delay of at least 3 PHY cycles.*/
otgp->GRSTCTL = GRSTCTL_CSRST;
while ((otgp->GRSTCTL & GRSTCTL_CSRST) != 0)
;
halPolledDelay(12);
/* Wait AHB idle condition.*/
while ((otgp->GRSTCTL & GRSTCTL_AHBIDL) == 0)
;
}