francois:stm32f405_minipix_zephyr
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| francois:stm32f405_minipix_zephyr [2024/11/24 09:00] – créée francois | francois:stm32f405_minipix_zephyr [2024/12/17 16:10] (Version actuelle) – [MCUboot] francois | ||
|---|---|---|---|
| Ligne 25: | Ligne 25: | ||
| mettre à jour l' | mettre à jour l' | ||
| - | Il faut rajouter les fichier | + | Il faut rajouter les paramètres suivants dans le fichier |
| - | ==== Changement de la fréquence ==== | + | < |
| + | CONFIG_CLOCK_STM32_HSE_CLOCK=24000000 | ||
| - | AC | + | # enable MCUBoot |
| + | CONFIG_BOOTLOADER_MCUBOOT=y | ||
| + | CONFIG_MCUBOOT_GENERATE_UNSIGNED_IMAGE=y | ||
| + | CONFIG_MCUBOOT_BOOTLOADER_MODE_OVERWRITE_ONLY=y | ||
| + | </ | ||
| + | |||
| + | Il faut modifier le device tree '' | ||
| + | |||
| + | Changement de l' | ||
| + | < | ||
| + | [...] | ||
| + | #include < | ||
| + | [...] | ||
| + | </ | ||
| + | |||
| + | Les partitions | ||
| + | < | ||
| + | [...] | ||
| + | soc { | ||
| + | flash-controller@40023c00 { | ||
| + | flash0: flash@8000000 { | ||
| + | partitions { | ||
| + | compatible = " | ||
| + | # | ||
| + | # | ||
| + | |||
| + | boot_partition: | ||
| + | reg = <0x0 0x10000>; | ||
| + | read-only; | ||
| + | }; | ||
| + | storage_partition: | ||
| + | reg = <0x1e000 0x2000>; | ||
| + | }; | ||
| + | slot0_partition: | ||
| + | reg = <0x20000 0x60000>; | ||
| + | }; | ||
| + | slot1_partition: | ||
| + | reg = <0x80000 0x60000>; | ||
| + | }; | ||
| + | scratch_partition: | ||
| + | reg = <0xe0000 0x20000>; | ||
| + | }; | ||
| + | }; | ||
| + | |||
| + | }; | ||
| + | }; | ||
| + | }; | ||
| + | [...] | ||
| + | </ | ||
| + | |||
| + | Dire sur quelle partition le code sera et quelle sera la console | ||
| + | |||
| + | < | ||
| + | [...] | ||
| + | chosen { | ||
| + | zephyr, | ||
| + | zephyr, | ||
| + | zephyr, | ||
| + | zephyr, | ||
| + | zephyr, | ||
| + | zephyr, | ||
| + | }; | ||
| + | [...] | ||
| + | </ | ||
| + | |||
| + | Changement de la fréquence | ||
| + | |||
| + | < | ||
| + | [...] | ||
| + | & | ||
| + | clock-frequency = < | ||
| + | status = " | ||
| + | }; | ||
| + | |||
| + | &pll { | ||
| + | div-m = < | ||
| + | mul-n = < | ||
| + | div-p = < | ||
| + | div-q = < | ||
| + | clocks = <& | ||
| + | status = " | ||
| + | }; | ||
| + | |||
| + | &rcc { | ||
| + | clocks = <& | ||
| + | clock-frequency = < | ||
| + | ahb-prescaler = < | ||
| + | apb1-prescaler = < | ||
| + | apb2-prescaler = < | ||
| + | }; | ||
| + | |||
| + | [...] | ||
| + | </ | ||
| + | |||
| + | les leds | ||
| + | |||
| + | < | ||
| + | [...] | ||
| + | leds: leds { | ||
| + | compatible = " | ||
| + | led: led_0 { | ||
| + | gpios = <& | ||
| + | label = "User LED"; | ||
| + | }; | ||
| + | boot_led: led_1 { | ||
| + | gpios = <& | ||
| + | label = " | ||
| + | }; | ||
| + | |||
| + | }; | ||
| + | [...] | ||
| + | </ | ||
| + | |||
| + | le port série | ||
| + | |||
| + | < | ||
| + | [...] | ||
| + | &usart2 { | ||
| + | pinctrl-0 = <& | ||
| + | pinctrl-names = " | ||
| + | current-speed = < | ||
| + | status = " | ||
| + | }; | ||
| + | [...] | ||
| + | </ | ||
| ===== MCUboot ===== | ===== MCUboot ===== | ||
| Ligne 40: | Ligne 165: | ||
| west build -t menuconfig | west build -t menuconfig | ||
| + | |||
| + | Il faut configurer les trucs suivants: | ||
| + | |||
| + | # Configured to only overwrite slot 0 | ||
| + | CONFIG_SINGLE_APPLICATION_SLOT=y | ||
| + | |||
| + | CONFIG_BOOT_USB_DFU_WAIT=y | ||
| + | # CONFIG_BOOT_USB_DFU_GPIO is not set | ||
| + | CONFIG_BOOT_USB_DFU_WAIT_DELAY_MS=12000 | ||
| + | CONFIG_BOOT_USB_DFU_NO_APPLICATION=y | ||
| + | CONFIG_MCUBOOT_INDICATION_LED=y | ||
| + | CONFIG_USB_DEVICE_DRIVER=y | ||
| + | CONFIG_USB_DEVICE_VID=0x0483 | ||
| + | CONFIG_USB_DEVICE_PID=0xdf11 | ||
| + | CONFIG_USB_DEVICE_MANUFACTURER=" | ||
| + | ==== Flasher MCUboot ==== | ||
| + | |||
| + | Il faut passer en mode DFU sur la Mini-Pix en mettant la pin 94 (BOOT0) à 3.3V. | ||
| + | |||
| + | Ensuite, dans '' | ||
| + | |||
| + | dfu-util -a 0 -s 0x08000000: | ||
francois/stm32f405_minipix_zephyr.1732438847.txt.gz · Dernière modification : de francois
