You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i was able to do it on the f401_blackpill and it was running fine
now that im trying to flash tinyuf2 on WeAct_STM32F405RGT6 but it doesnt seems to show as flashdrive.
the board.h and board.mk are based on feather_stm32f405_express
and modified some parts
board.h
/*
The MIT License (MIT)
Copyright (c) 2018 Ha Thach for Adafruit Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#ifndef BOARD_H_
#define BOARD_H_
//--------------------------------------------------------------------+
// LED (WeAct Black Pill F405 has LED on PC13)
//--------------------------------------------------------------------+
#define LED_PORT GPIOB
#define LED_PIN GPIO_PIN_2
#define LED_STATE_ON 1
// WeAct STM32F405RGT6 has 1MB of internal flash
#define BOARD_FLASH_SIZE (1024 * 1024)
//--------------------------------------------------------------------+
// USB UF2
//--------------------------------------------------------------------+
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, i was able to do it on the f401_blackpill and it was running fine
now that im trying to flash tinyuf2 on WeAct_STM32F405RGT6 but it doesnt seems to show as flashdrive.
the board.h and board.mk are based on feather_stm32f405_express
and modified some parts
board.h
/*
*/
#ifndef BOARD_H_
#define BOARD_H_
//--------------------------------------------------------------------+
// LED (WeAct Black Pill F405 has LED on PC13)
//--------------------------------------------------------------------+
#define LED_PORT GPIOB
#define LED_PIN GPIO_PIN_2
#define LED_STATE_ON 1
//--------------------------------------------------------------------+
// Neopixel
//--------------------------------------------------------------------+
//// Number of neopixels
#define NEOPIXEL_NUMBER 0
//--------------------------------------------------------------------+
// Flash
//--------------------------------------------------------------------+
// WeAct STM32F405RGT6 has 1MB of internal flash
#define BOARD_FLASH_SIZE (1024 * 1024)
//--------------------------------------------------------------------+
// USB UF2
//--------------------------------------------------------------------+
#define USB_VID 0x1209 // WeAct VID
#define USB_PID 0x4050 // WeAct PID
#define USB_MANUFACTURER "WeAct"
#define USB_PRODUCT "STM32F405RGT6"
#define UF2_PRODUCT_NAME USB_MANUFACTURER " " USB_PRODUCT
#define UF2_BOARD_ID "STM32F405-WeAct"
#define UF2_VOLUME_LABEL "WEACTBOOT"
#define UF2_INDEX_URL "https://www.weactstudio.com/"
#define USB_NO_VBUS_PIN 0
//--------------------------------------------------------------------+
// UART (WeAct default UART: USART1 - TX: PA9, RX: PA10)
//--------------------------------------------------------------------+
#define UART_DEV USART1
#define UART_CLOCK_ENABLE __HAL_RCC_USART1_CLK_ENABLE
#define UART_CLOCK_DISABLE __HAL_RCC_USART1_CLK_DISABLE
#define UART_GPIO_PORT GPIOA
#define UART_GPIO_AF GPIO_AF7_USART1
#define UART_TX_PIN GPIO_PIN_9
#define UART_RX_PIN GPIO_PIN_10
//--------------------------------------------------------------------+
// RCC Clock
//--------------------------------------------------------------------+
static inline void clock_init(void)
{
RCC_ClkInitTypeDef RCC_ClkInitStruct;
RCC_OscInitTypeDef RCC_OscInitStruct;
/* Enable Power Control clock */
__HAL_RCC_PWR_CLK_ENABLE();
/* Configure voltage scaling */
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
/* Enable HSE (8 MHz on WeAct STM32F405RGT6) and configure PLL */
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
RCC_OscInitStruct.PLL.PLLM = HSE_VALUE/1000000; // (tried with just 8 also not working)
RCC_OscInitStruct.PLL.PLLN = 336;
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
RCC_OscInitStruct.PLL.PLLQ = 7;
HAL_RCC_OscConfig(&RCC_OscInitStruct);
/* Configure system clock */
RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2);
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5);
}
board.mk
CFLAGS +=
-DSTM32F405xx
-DHSE_VALUE=8000000U
SRC_S +=
$(ST_CMSIS)/Source/Templates/gcc/startup_stm32f405xx.s
flash: flash-dfu-util
erase: erase-jlink
#endif
am i missing something ? need help pleasee
Beta Was this translation helpful? Give feedback.
All reactions