Hi All,
I've ported a simple demo to the F401C disco board, based on the 407 demos. This just blinks the 4 LEDs and sets up a USB serial shell. You will need to change the CHIBIOS path in the Makefile to wherever you have ChibiOS trunk.
The board.h changes needed were to change the MCU define to STM32F401xx, rename PB11 to make it clear it is unusable, to rename PE2, 4 and 5 to show they are connected to the LSM303DLHC, and to remove the GPIO ports that aren't present.
I also modified the mcuconf.h to produce an 84MHz system clock and remove settings for devices that aren't present.
Finally, I made a new .ld file for the 401xC
Other than this things seem to run very similarly - I think I've probably update everything needed, but I might well have missed something. Hopefully this will be helpful in adding an official demo! I would have ported the SPI and PWM stuff, but the MEMs sensor is a different model, so I'm not sure the driver would be compatible.
[DONE] Demo for STM32F401C Discovery board
Moderator: RoccoMarco
-
trepidacious
- Posts: 58
- Joined: Mon Jan 21, 2013 3:36 pm
- Been thanked: 1 time
[DONE] Demo for STM32F401C Discovery board
- Attachments
-
- ARMCM4-STM32F401C-DISCOVERY.zip
- Archive of demo project.
- (111.62 KiB) Downloaded 433 times
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: Demo for STM32F401C Discovery board
Some things to fix:
mcuconf.h:
* F401 doesn't have backup sram
* F401 doesn't have EXTI20 and 21
* F401 doesn't have timers 6, 7, 8 but has timer 10
* F401 has UART1, 2 and 6
hal:
* The exti driver doesn't recognize the missing lines 20 and 21 and fails to build
* The vector table lacks the last vector (0x190 - SPI4)
* F401 has SPI4 but in hal_lld.h its defined to FALSE
Thats what i have found so far.
@Giovanni do you have an idea if / when the hal will be fixed so i can reasonably decide if its worth tentatively fixing it myself.
Cheers,
Vinz
mcuconf.h:
* F401 doesn't have backup sram
* F401 doesn't have EXTI20 and 21
* F401 doesn't have timers 6, 7, 8 but has timer 10
* F401 has UART1, 2 and 6
hal:
* The exti driver doesn't recognize the missing lines 20 and 21 and fails to build
* The vector table lacks the last vector (0x190 - SPI4)
* F401 has SPI4 but in hal_lld.h its defined to FALSE
Thats what i have found so far.
@Giovanni do you have an idea if / when the hal will be fixed so i can reasonably decide if its worth tentatively fixing it myself.
Cheers,
Vinz
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: [TODO] Demo for STM32F401C Discovery board
Hi,
Added to the TODO list. I had no idea there were so many differences, the 401 support is very experimental.
Giovanni
Added to the TODO list. I had no idea there were so many differences, the 401 support is very experimental.
Giovanni
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: [TODO] Demo for STM32F401C Discovery board
Hi,
I made all fixes, could you confirm I didn't forget something?
Giovanni
I made all fixes, could you confirm I didn't forget something?
Giovanni
Re: [DONE] Demo for STM32F401C Discovery board
Sorry for the late reply. I can't see where you added the missing vector 0x190 for SPI4.
I was looking at this commit:
https://github.com/ChibiOS/ChibiOS-RT/c ... a30ee19005
edit: disregard comment, i was looking at the wrong commit.
edit: this is the right one: https://github.com/ChibiOS/ChibiOS-RT/c ... ec7#diff-6
I was looking at this commit:
https://github.com/ChibiOS/ChibiOS-RT/c ... a30ee19005
edit: disregard comment, i was looking at the wrong commit.
edit: this is the right one: https://github.com/ChibiOS/ChibiOS-RT/c ... ec7#diff-6