Page 24 of 25

Re: STM32GENERIC, my arduino implementation

Posted: Sat Jun 17, 2017 12:24 am
by acronis
danieleff wrote:
acronis wrote:3.2 inch TFT LCD screen with resistive touch screens ILI9341 display module
especially for black Board STM32F407VET6
https://ru.aliexpress.com/item/3-2-inch ... Title=true
This is the first time I actually see a display with the matching connector to the board.

stevestrong has library for 16 bit parallel display https://github.com/stevstrong/Adafruit_ ... 6bit_STM32
Confirm.
Library https://github.com/stevstrong/Adafruit_ ... 6bit_STM32 works perfectly with the display https://ru.aliexpress.com/item/3-2-inch ... Title=true.

Re: STM32GENERIC, my arduino implementation

Posted: Tue Jun 20, 2017 8:54 am
by ChrisMicro
We have a new contributor to the STM32GENERIC repository.

He is starting to intensively to support the STM32F429 discovery.

Hello huaweiwx :D

Re: STM32GENERIC, my arduino implementation

Posted: Tue Jun 20, 2017 9:58 am
by RogerClark
I checked the user database on the forum and we don't have any members with the email address listed on Github (huaweiwx@sina.com) and we don't have anyone with huaweiwx as their username

Probably best to try emailing them, or contact them via a github issue on that repo

Their email address on GitHub is from this company http://corp.sina.com.cn/eng/sina_intr_eng.htm
In china

I would clone or fork that repo asap, as we don't know who they are, they could remove it again and if not forked or cloned it would be lost

Re: STM32GENERIC, my arduino implementation

Posted: Fri Sep 08, 2017 7:07 pm
by TFTLCDCyg
danieleff great core. THX

Is it possible to use on SdFat library: SPI4, SPI5 or SPI6 in boards like the Discovery F429ZI?

At this time, only can used fine SPI1, SPI2 and SPI3

Best Regards!
TFTLCDCyg

Re: STM32GENERIC, my arduino implementation

Posted: Wed Oct 04, 2017 7:21 pm
by michael_l
Hi, I wonder if there's support for this small Blue F407VET6 board?

http://stm32duino.com/viewtopic.php?f=3 ... =60#p28309

Re: STM32GENERIC, my arduino implementation

Posted: Mon Jan 01, 2018 8:27 pm
by Manny
michael_l wrote:
Wed Oct 04, 2017 7:21 pm
Hi, I wonder if there's support for this small Blue F407VET6 board?

http://stm32duino.com/viewtopic.php?f=3 ... =60#p28309

I used the Black_F407VE and overwrote the variant.c file with the following to get the Blue F407VE Mini to work while I figure out on how to add a board..yes I did read the wiki :?

Code: Select all

#include "stm32_build_defines.h"
#include "stm32_def.h"

void Error_Handler();

void SystemClock_Config(void) {
  RCC_OscInitTypeDef RCC_OscInitStruct;
  RCC_ClkInitTypeDef RCC_ClkInitStruct;
  RCC_PeriphCLKInitTypeDef PeriphClkInitStruct;

  __HAL_RCC_PWR_CLK_ENABLE();

  __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);

  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 = 25;
  RCC_OscInitStruct.PLL.PLLN = 336;
  RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
  RCC_OscInitStruct.PLL.PLLQ = 7;
  if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
  {
    Error_Handler();
  }

  RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
                              |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;
  if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK)
  {
    Error_Handler();
  }

  PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_I2S;
  PeriphClkInitStruct.PLLI2S.PLLI2SN = 192;
  PeriphClkInitStruct.PLLI2S.PLLI2SR = 2;
  if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
  {
  Error_Handler();
  }

  HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/1000);

  HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK);

  /* SysTick_IRQn interrupt configuration */
  HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0);
}
Anyone with with a rotary encoder example?

Re: STM32GENERIC, my arduino implementation

Posted: Mon Jan 01, 2018 8:48 pm
by michael_l
Manny wrote:
Mon Jan 01, 2018 8:27 pm
michael_l wrote:
Wed Oct 04, 2017 7:21 pm
Hi, I wonder if there's support for this small Blue F407VET6 board?

http://stm32duino.com/viewtopic.php?f=3 ... =60#p28309

I used the Black_F407VE and overwrote the variant.c file with the following to get the Blue F407VE Mini to work while I figure out on how to add a board..yes I did read the wiki :?

Code: Select all

#include "stm32_build_defines.h"
#include "stm32_def.h"

void Error_Handler();

void SystemClock_Config(void) {
  RCC_OscInitTypeDef RCC_OscInitStruct;
  RCC_ClkInitTypeDef RCC_ClkInitStruct;
  RCC_PeriphCLKInitTypeDef PeriphClkInitStruct;

  __HAL_RCC_PWR_CLK_ENABLE();

  __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);

  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 = 25;
  RCC_OscInitStruct.PLL.PLLN = 336;
  RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
  RCC_OscInitStruct.PLL.PLLQ = 7;
  if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
  {
    Error_Handler();
  }

  RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
                              |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;
  if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK)
  {
    Error_Handler();
  }

  PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_I2S;
  PeriphClkInitStruct.PLLI2S.PLLI2SN = 192;
  PeriphClkInitStruct.PLLI2S.PLLI2SR = 2;
  if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
  {
  Error_Handler();
  }

  HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/1000);

  HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK);

  /* SysTick_IRQn interrupt configuration */
  HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0);
}
Thanks for this! I'll try this and report back.

Re: STM32GENERIC, my arduino implementation

Posted: Fri Jan 26, 2018 7:15 am
by michael_l
Thanks Manny, your variant.c works for me with Blue F407VE Mini board.

I can also confirm that SDIO works.

I also tried huaweiwx's branch but strange enough SDIO did not work. Diffed the code and there are some small changes, which are unknown to me.

Daniel, I can send pull request for changes needed for this variant, is that okay ? I added also Arduino IDE menus for this board.

Re: STM32GENERIC, my arduino implementation

Posted: Fri Jan 26, 2018 8:50 pm
by Manny
michael_l wrote:
Fri Jan 26, 2018 7:15 am
Thanks Manny, your variant.c works for me with Blue F407VE Mini board.
I forgot you need to change a setting in boards.txt otherwise UART gets garbled because of wrong clock setting.. the DHSE_VALUE originaly 8000000 has to be 25000000, I also add the -O3 flag for more speed ;)

Code: Select all

BLACK_F407XX.menu.subboard.BLACK_F407VE=BLACK F407VE (V2.0)
BLACK_F407XX.menu.subboard.BLACK_F407VE.upload.maximum_size=524288
BLACK_F407XX.menu.subboard.BLACK_F407VE.upload.maximum_data_size=131072
BLACK_F407XX.menu.subboard.BLACK_F407VE.build.variant=BLACK_F407VE
BLACK_F407XX.menu.subboard.BLACK_F407VE.build.board=BLACK_F407VE
BLACK_F407XX.menu.subboard.BLACK_F407VE.build.extra_flags=-DSTM32F407VE -DHSE_VALUE=25000000 -O3
I also tried huaweiwx's branch but strange enough SDIO did not work. Diffed the code and there are some small changes, which are unknown to me.
huaweiwx's fork does not compile for me and looking at the variant file what hhe calls the 'BLUE_F407VE' must be a different board all the setting are wrong for our board ..same trick should work though.

Re: STM32GENERIC, my arduino implementation

Posted: Fri Jan 26, 2018 8:58 pm
by michael_l
Manny wrote:
Fri Jan 26, 2018 8:50 pm
michael_l wrote:
Fri Jan 26, 2018 7:15 am
Thanks Manny, your variant.c works for me with Blue F407VE Mini board.
I forgot you need to change a setting in boards.txt otherwise UART gets garbled because of wrong clock setting.. the DHSE_VALUE originaly 8000000 has to be 25000000, I also add the -O3 flag for more speed ;)

Code: Select all

BLACK_F407XX.menu.subboard.BLACK_F407VE=BLACK F407VE (V2.0)
BLACK_F407XX.menu.subboard.BLACK_F407VE.upload.maximum_size=524288
BLACK_F407XX.menu.subboard.BLACK_F407VE.upload.maximum_data_size=131072
BLACK_F407XX.menu.subboard.BLACK_F407VE.build.variant=BLACK_F407VE
BLACK_F407XX.menu.subboard.BLACK_F407VE.build.board=BLACK_F407VE
BLACK_F407XX.menu.subboard.BLACK_F407VE.build.extra_flags=-DSTM32F407VE -DHSE_VALUE=25000000 -O3
I also tried huaweiwx's branch but strange enough SDIO did not work. Diffed the code and there are some small changes, which are unknown to me.
huaweiwx's fork does not compile for me and looking at the variant file what hhe calls the 'BLUE_F407VE' must be a different board all the setting are wrong for our board ..same trick should work though.
I did the variant.c changes in huaweiwx's fork for the BLACK_F407VE board so I definitely was expecting SDIO also to work but as said .. no go. I did not add the -DHSE_VALUE=25000000 so I'll try that next.

Seems huaweiwx has taken this STM32GENERIC a bit further