Programming 'F407 ...

Working libraries, libraries being ported and related hardware
User avatar
luudee
Posts: 17
Joined: Sat Oct 08, 2016 4:27 pm
Location: Pattaya
Contact:

Re: Programming 'F407 ...

Post by luudee » Tue Oct 11, 2016 6:40 am

Hi Roger,

yes absolutely, it's attached below. Besides adding optional HSI
clocking, I also added resetting the device if the PLL does not
become ready ...
I'm not sure how good of an idea that it, but I think it will give
better chances to start up than just sitting in an endless loop ...

I think this code still needs a lot of more work. I think as a minimum
this functions should have two inputs to it: 1) Select HSI/HSE;
2) allow the user to specify the clock frequency he wants (but that
will break backwards compatibility ).

In HW design, we quite often use TCL scripts to configure IP
Core before synthesis. I think it would be really helpful to have
a configuration tool, that is platform independent, that can
generate some of the startup code, or may be just some
parameters ...

If I get some time, I might start writing such a tool ...

BTW, this file of the code snipplet below has ST copyright ...

Best Regards,
rudi

Code: Select all


/**
  * @brief  Configures the System clock source, PLL Multiplier and Divider factors, 
  *         AHB/APBx prescalers and Flash settings
  * @Note   This function should be called only once the RCC clock configuration  
  *         is reset to the default reset state (done in SystemInit() function).   
  * @param  None
  * @retval None
  */
#define USE_HSI
static void SetSysClock(void)
{
/******************************************************************************/
/*            PLL (clocked by HSE) used as System clock source                */
/******************************************************************************/
  __IO uint32_t StartUpCounter = 0;
  __IO uint32_t F_WANT, PLL_M, PLL_N, PLL_P, PLL_Q, PLL_VCO, PPRE2_DIV, PPRE1_DIV;
  
  /* Select regulator voltage output Scale 1 mode, System frequency up to 168 MHz */
  RCC->APB1ENR |= RCC_APB1ENR_PWREN;
  //PWR->CR |= PWR_CR_VOS;	Leave at Default, no need to modify

  /* Enable HSI/E */
#ifdef USE_HSI
  RCC->CR |= ((uint32_t)RCC_CR_HSION);
#else
  RCC->CR |= ((uint32_t)RCC_CR_HSEON);
#endif

  /* Wait till HSI/E is ready and if Time out is reached exit */
#ifdef USE_HSI
  while(((RCC->CR & RCC_CR_HSIRDY) == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT))
	StartUpCounter++;
#else
  while(((RCC->CR & RCC_CR_HSERDY) == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT))
	StartUpCounter++;
#endif
  if(StartUpCounter >= HSE_STARTUP_TIMEOUT)	NVIC_SystemReset();

// --------------------------------------------------------------

// PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N 
// e.g. PLL_VCO = 16000000 / 16 * 336 = 336 Mhz

F_WANT = 168;	// Desired Frequency (MHz)

#ifdef USE_HSI
	PLL_M = HSI_VALUE / 1000000;
#else
	PLL_M = HSE_VALUE / 1000000;
#endif

// This might need adjustment
PLL_P = 2;			// Valid valus are: 2, 4, 6, 8

PLL_VCO = F_WANT * PLL_P;	// Limit between 100 and 432 MHz
while(PLL_VCO < 100)	PLL_P++;
while(PLL_VCO > 432)	PLL_P--;
while(PLL_P!=2  &&  PLL_P!=4  &&  PLL_P!=8  &&  PLL_P!=16)	PLL_P++;


PLL_N = PLL_VCO;

// --------------------------------------------------------------
PLL_Q = PLL_VCO / PLL_P / 48;	// Should be 48 MHz for USB to work, can be lower if only need SDIO & Rand Num Generator
				// Valid values are 2-15
if((PLL_Q * 48) < PLL_VCO)	PLL_Q++;

// --------------------------------------------------------------
PPRE2_DIV = PLL_VCO/PLL_P/90;	// APB high-speed prescaler (APB2),  not to exceed 90 MHz
				// Valid  values are 2, 4, 8, 16
while(PPRE2_DIV!=2  &&  PPRE2_DIV!=4  &&  PPRE2_DIV!=8  &&  PPRE2_DIV!=16)	PPRE2_DIV++;


// --------------------------------------------------------------
PPRE1_DIV = PLL_VCO/PLL_P/45;	// APB Low speed prescaler (APB1),  not to exceed 45 MHz
				// Valid  values are 2, 4, 8, 16
while(PPRE1_DIV!=2  &&  PPRE1_DIV!=4  &&  PPRE1_DIV!=8  &&  PPRE1_DIV!=16)	PPRE1_DIV++;


#ifdef USE_HSI
  if ((RCC->CR & RCC_CR_HSIRDY) != RESET)
#else
  if ((RCC->CR & RCC_CR_HSERDY) != RESET)
#endif
  {
    /* HCLK = SYSCLK / 1*/
    RCC->CFGR |= RCC_CFGR_HPRE_DIV1;	// Looks like there is no need to adjust this.
      
    /* PCLK2 = HCLK / PPRE2_DIV */
    RCC->CFGR |= (PPRE2_DIV & 0x07) << 13;
    
    /* PCLK1 = HCLK / PPRE1_DIV */
    RCC->CFGR |= (PPRE1_DIV & 0x07) << 10;


    /* Configure the main PLL */
#ifdef USE_HSI
    RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | (PLL_Q << 24);
#else
    RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24);
#endif

    /* Enable the main PLL */
    RCC->CR |= RCC_CR_PLLON;

    /* Wait till the main PLL is ready */
    StartUpCounter = 0;
    while(((RCC->CR & RCC_CR_PLLRDY) == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT))
		StartUpCounter++;
    if(StartUpCounter >= HSE_STARTUP_TIMEOUT)	NVIC_SystemReset();
   
    /* Configure Flash prefetch, Instruction cache, Data cache and wait state */
   // FLASH->ACR = FLASH_ACR_ICEN | FLASH_ACR_DCEN | FLASH_ACR_LATENCY_5WS;
    FLASH->ACR = FLASH_ACR_ICEN | FLASH_ACR_DCEN | FLASH_ACR_PRFTEN | FLASH_ACR_LATENCY_5WS;	// FIX_ME RU

    /* Select the main PLL as system clock source */
    RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW));
    RCC->CFGR |= RCC_CFGR_SW_PLL;

    /* Wait till the main PLL is used as system clock source */
    while(((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL) && (StartUpCounter != HSE_STARTUP_TIMEOUT))
		StartUpCounter++;
    if(StartUpCounter >= HSE_STARTUP_TIMEOUT)	NVIC_SystemReset();

  }
  else
  { /* If HSE fails to start-up, the application will have wrong clock
         configuration. User can add here some code to deal with this error */
  }
}


User avatar
RogerClark
Posts: 5897
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Programming 'F407 ...

Post by RogerClark » Tue Oct 11, 2016 7:02 am

Hi Rudi

I guess to update libmaple we'd need to change the code in boards.cpp for each variant

Code: Select all

static void setup_clocks(void) {
    // Turn on HSI. We'll switch to and run off of this while we're
    // setting up the main PLL.
    rcc_turn_on_clk(RCC_CLK_HSI);

    // Turn off and reset the clock subsystems we'll be using, as well
    // as the clock security subsystem (CSS). Note that resetting CFGR
    // to its default value of 0 implies a switch to HSI for SYSCLK.
    RCC_BASE->CFGR = 0x00000000;
    rcc_disable_css();
    rcc_turn_off_clk(RCC_CLK_PLL);
    rcc_turn_off_clk(RCC_CLK_HSE);
    wirish::priv::board_reset_pll();
    // Clear clock readiness interrupt flags and turn off clock
    // readiness interrupts.
    RCC_BASE->CIR = 0x00000000;

    // Enable HSE, and wait until it's ready.
    rcc_turn_on_clk(RCC_CLK_HSE);
    while (!rcc_is_clk_ready(RCC_CLK_HSE))
        ;

    // Configure AHBx, APBx, etc. prescalers and the main PLL.
    wirish::priv::board_setup_clock_prescalers();
    rcc_configure_pll(&wirish::priv::w_board_pll_cfg);

    // Enable the PLL, and wait until it's ready.
    rcc_turn_on_clk(RCC_CLK_PLL);
    while(!rcc_is_clk_ready(RCC_CLK_PLL))
        ;

    // Finally, switch to the now-ready PLL as the main clock source.
    rcc_switch_sysclk(RCC_CLKSRC_PLL);
}

Specificially add a time out to

Code: Select all

    while (!rcc_is_clk_ready(RCC_CLK_HSE))
        ; 
and

Code: Select all

    while(!rcc_is_clk_ready(RCC_CLK_PLL))
        ;
And somehow re-do the whole function again, or at least re-do whatever bits kick the oscillator again

User avatar
luudee
Posts: 17
Joined: Sat Oct 08, 2016 4:27 pm
Location: Pattaya
Contact:

Re: Programming 'F407 ...

Post by luudee » Thu Oct 13, 2016 2:43 am

Hi Roger,

I'm confused. Did you want to continue working on the libraries you are maintaining ?

If yes, let me take another look, because I still didn't have luck with them. But
if you want to keep them up, I would be happy to continue on the 'F40x port ...

Give me a few days to catch up with some other items, and then I will post an
update of the routine above ...

Thanks,
rudi

User avatar
RogerClark
Posts: 5897
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Programming 'F407 ...

Post by RogerClark » Thu Oct 13, 2016 3:44 am

Hi Rudi

I looked at the code you posted, but it didnt look like either the existing F1 or F4 code (as far as could tell), it looked like you added a new function to setup the clocks and probably changed other parts of the code to call your new function instead of the existing clock setup code.

So I was trying to work out how I could merge your new code with the existing code, just to add the ability to include a timeout on the HSE starting, and to loop back around and try again, if the HSE failed to start before timeout

However I may have miss understood what you have done.

Either way, this problem hardly every happens to anyone else, so its not a critical fix and can be added to my very very long To Do list ;-)

User avatar
luudee
Posts: 17
Joined: Sat Oct 08, 2016 4:27 pm
Location: Pattaya
Contact:

Re: Programming 'F407 ...

Post by luudee » Thu Oct 13, 2016 11:15 am

Hi Roger,

Here is an updated SetSysClock function. I don't think I fixed anything in it, just tried to rename
and make some parameters explicitly visible - mostly for my own understanding.

The only "new" thing is being able to select HSI. This routine is taken from Kodunio,
But I think is mostly identical to what's inside your libraries.

If you are ging to keep on maintaining your libraries, I'll go back and look at them and see
if I can make them work for me.

I was under the impression you did not think it would be worth while to make any changes
since ST is eventually going to come out with support ....

Best Regards,
rudi

Code: Select all

/**
  * @brief  Configures the System clock source, PLL Multiplier and Divider factors, 
  *         AHB/APBx prescalers and Flash settings
  * @Note   This function should be called only once the RCC clock configuration  
  *         is reset to the default reset state (done in SystemInit() function).   
  * @param  None
  * @retval None
  */
#define 	PLL_P_ADJ(x)	(x ==   2 ? 0x0 : 		\
				 x ==   4 ? 0x1 :		\
				 x ==   6 ? 0x2 : 0x3)

#define 	APB_PRE_ADJ(x)	(x ==   1 ? 0x0 : 		\
				 x ==   2 ? 0x4 :		\
				 x ==   4 ? 0x5 :		\
				 x ==   8 ? 0x6 :		\
				 x ==  16 ? 0x7 : 0)

#define 	AHB_PRE_ADJ(x)	(x ==   1 ? 0x0 : 		\
				 x ==   2 ? 0x8 :		\
				 x ==   4 ? 0x9 :		\
				 x ==   8 ? 0xa :		\
				 x ==  16 ? 0xb :		\
				 x ==  64 ? 0xc :		\
				 x == 128 ? 0xd :		\
				 x == 256 ? 0xe :		\
				 x == 512 ? 0xf : 0)

static void SetSysClock(void)
{
/******************************************************************************/
/*            PLL (clocked by HSE) used as System clock source                */
/******************************************************************************/
  __IO uint32_t StartUpCounter = 0;
  __IO uint32_t F_WANT, PLL_M, PLL_N, PLL_P, PLL_Q, PLL_VCO, HPRE, SYS_CLK, AHB_CLK, PPRE2_DIV, PPRE1_DIV;
  
  /* Select regulator voltage output Scale 1 mode, System frequency up to 168 MHz */
  RCC->APB1ENR |= RCC_APB1ENR_PWREN;
  // PWR->CR |= PWR_CR_VOS;	Leave at Default, no need to modify

  /* Enable HSI/E */
#ifdef CLKSRC_HSI
  RCC->CR |= ((uint32_t)RCC_CR_HSION);
#else
  RCC->CR |= ((uint32_t)RCC_CR_HSEON);
#endif

  /* Wait till HSI/E is ready and if Time out is reached exit */
#ifdef CLKSRC_HSI
  while(((RCC->CR & RCC_CR_HSIRDY) == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT))
	StartUpCounter++;
#else
  while(((RCC->CR & RCC_CR_HSERDY) == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT))
	StartUpCounter++;
#endif
  if(StartUpCounter >= HSE_STARTUP_TIMEOUT)	NVIC_SystemReset();

// --------------------------------------------------------------

// PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N 
// e.g. PLL_VCO = 16000000 / 16 * 336 = 336 MHz

F_WANT = 168;	// Desired System Frequency (MHz)

#ifdef CLKSRC_HSI
	PLL_M = HSI_VALUE / 1000000;	// 16 MHz default
#else
	PLL_M = HSE_VALUE / 1000000;	// 25 MHz default
#endif

// This might need adjustment
PLL_P = 2;			// Valid valus are: 2, 4, 6, 8

PLL_VCO = F_WANT * PLL_P;	// Limit 100 and 432 MHz - Initial setting
while(PLL_VCO < 100)	PLL_P++;
while(PLL_VCO > 432)	PLL_P--;
while(PLL_P!=2  &&  PLL_P!=4  &&  PLL_P!=8  &&  PLL_P!=16)	PLL_P++;

PLL_VCO = F_WANT * PLL_P;	// Limit 100 and 432 MHz - Corrected setting
SYS_CLK = PLL_VCO / PLL_P;

PLL_N = PLL_VCO;

// --------------------------------------------------------------
PLL_Q = PLL_VCO / 48;		// Should be 48 MHz for USB to work, can be lower if only need SDIO & Rand Num Generator
				// Valid values are 2-15
if((PLL_Q * 48) < PLL_VCO)	PLL_Q++;

// --------------------------------------------------------------
// HCLK = SYS_CLK / HPRE

HPRE = 1;
AHB_CLK = SYS_CLK/HPRE;

// --------------------------------------------------------------
PPRE2_DIV = AHB_CLK/90;		// APB high-speed prescaler (APB2),  not to exceed 90 MHz (Source AHB Clk)
				// Valid  values are 1, 2, 4, 8, 16
while(PPRE2_DIV!=1 && PPRE2_DIV!=2  &&  PPRE2_DIV!=4  &&  PPRE2_DIV!=8  &&  PPRE2_DIV!=16)	PPRE2_DIV++;

// --------------------------------------------------------------
PPRE1_DIV = AHB_CLK/45;		// APB Low speed prescaler (APB1),  not to exceed 45 MHz (Source AHB Clk)
				// Valid  values are 1, 2, 4, 8, 16
while(PPRE1_DIV!=2  &&  PPRE1_DIV!=2  &&  PPRE1_DIV!=4  &&  PPRE1_DIV!=8  &&  PPRE1_DIV!=16)	PPRE1_DIV++;

#ifdef CLKSRC_HSI
  if ((RCC->CR & RCC_CR_HSIRDY) != RESET)
#else
  if ((RCC->CR & RCC_CR_HSERDY) != RESET)
#endif
  {
    /* HCLK = SYSCLK / HPRE */
    RCC->CFGR |= AHB_PRE_ADJ(HPRE) <<4;	// Need a special translation table
      
    /* PCLK2 = HCLK / PPRE2_DIV */
    RCC->CFGR |= APB_PRE_ADJ(PPRE2_DIV) << 13;
    
    /* PCLK1 = HCLK / PPRE1_DIV */
    RCC->CFGR |= APB_PRE_ADJ(PPRE1_DIV) << 10;

    /* Configure the main PLL */
#ifdef CLKSRC_HSI
    RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (PLL_P_ADJ(PLL_P) << 16) | (PLL_Q << 24);
#else
    RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (PLL_P_ADJ(PLL_P) << 16) | (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24);
#endif

    /* Enable the main PLL */
    RCC->CR |= RCC_CR_PLLON;

    /* Wait till the main PLL is ready */
    StartUpCounter = 0;
    while(((RCC->CR & RCC_CR_PLLRDY) == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT))
		StartUpCounter++;
    if(StartUpCounter >= HSE_STARTUP_TIMEOUT)	NVIC_SystemReset();
   
    /* Configure Flash prefetch, Instruction cache, Data cache and wait state */
    /* Latency is described in "RM0090, Reference manual, DocID018909, V1.2", Par. 3.5.1, Table 10 & 11 */
    /* For a Voltage Range of 2.7 - 3.6V @168 MHz Max, 5WS are required */
    /* For a Voltage Range of 2.1 - 2.4V @168 MHz Max, 7WS are required */
    /* For a Voltage Range of 2.7 - 3.6V @120 MHz Max, 3WS are required */
    /* For a Voltage Range of 2.1 - 2.4V @110 MHz Max, 4WS are required */
    /* Reducing the operating range, will require to increase the number of WS */
    /* Decreasing the max frequency will allow for shorter (smaller) WS */
    FLASH->ACR = FLASH_ACR_ICEN | FLASH_ACR_DCEN | FLASH_ACR_PRFTEN | FLASH_ACR_LATENCY_5WS;

    /* Select the main PLL as system clock source */
    RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW));
    RCC->CFGR |= RCC_CFGR_SW_PLL;

    /* Wait till the main PLL is used as system clock source */
    while(((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL) && (StartUpCounter != HSE_STARTUP_TIMEOUT))
		StartUpCounter++;
    if(StartUpCounter >= HSE_STARTUP_TIMEOUT)	NVIC_SystemReset();

  }
  else
  { /* If HSE fails to start-up, the application will have wrong clock
         configuration. User can add here some code to deal with this error */
	NVIC_SystemReset();
  }
}

User avatar
RogerClark
Posts: 5897
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Programming 'F407 ...

Post by RogerClark » Thu Oct 13, 2016 8:01 pm

Rudi

I suspect, for various reasons, that the libmaple core will continue to be used for a long time.

So I will try to apply your fix for this ( as well as other fixes people send me, including as PRs etc)

But I have to prioritise which changes I get to first, as I am rather time-poor at the moment

User avatar
luudee
Posts: 17
Joined: Sat Oct 08, 2016 4:27 pm
Location: Pattaya
Contact:

Re: Programming 'F407 ...

Post by luudee » Sat Oct 15, 2016 5:47 pm

Roger,

why don't you hold off applying any fixes ...

Let me get it all working and then send you a complete working version, which you can integrate with your changes ...

I found some more bugs today, that need to be fixed ...

Cheers,
rudi

User avatar
RogerClark
Posts: 5897
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Programming 'F407 ...

Post by RogerClark » Sat Oct 15, 2016 8:05 pm

OK.

No rush....

keypunch
Posts: 67
Joined: Tue Aug 02, 2016 2:26 am

Re: Programming 'F407 ...

Post by keypunch » Sun Nov 06, 2016 12:27 pm

@Luudee,

I have a question if I may after I reslly summarize the challenges you experienced.

In your Post you indicated you were using the STM32F407VET6 Mini. These STM32F407VET6 Mini boards presented challenges. Some boards were fine running your sketch after a Power On or Reset and others not. You found the source of the challenges that appears likely in lowel code for the STM32.

My question is is do you feel the STM32F407VET6 Mini is a board that someone just starting into STM32, has only done a bit of dabbling in last few week on an Adruino, and has a long systems technical backgound will be fine with the STM32F407VET6 Mini? I ask as the STM32F407VET6 Mini is one of a few STM32 boards I am to considering for something important I need to build for me. An important personal need device.

I have ordered a Maple Mini and will order another Baite one in a few days. The Maple Mini may barely have the least number of pins I need for the longer term goal as I add on the devices to the desired end result. The end result will need at least 12ADC, and at least 12 Digital, after SPI for SD card, and I2C for RTC and other I2C devices. I will start with a subset of the desired end goal.

I now know from some code I have written in past week as a framework to help me size Flash/RAM the Maple Mini may just squeeze in with the 20K RAM. The Maple Mini 64K or 128K Flash will be just fine for the code in question. I am hoping the RISC and processing clock speed of a STM32 will meet the other requirements I have. The Maple Mini I have ordered will be used to gain a sense of the CPU processing power ability vs my need. There will be no display, or if there is a display, a character display to display values once or twice a minute. Likely a 16x20 character display. So no graphics, or such requirements that might add to the processing requirements of the MCU in that respect.

I am looking at a few other STM32 boards that have a few more pins to way more pins than I need, but more is better than not enough. I have some other more routine hobby needs that the Maple Mini will be just fine for and I choose over an Adruino as the Maple Mini costs less and has more to offer than most of the typical Adruino devices commonly available and many use. I have one AtMega Adruino, and one more on way (common and not so common typical Adruino) to allow me to compare code/libraries if I have some issue with any porting or compiling of libraries in STM32 that having an AtMega based Adruino will help me in the figuring out the kinks to libraries/code that may not be available in STM32 and/or need tweaking for a STM32 based MCU.


Regards,

John L. Males
Toronto, Ontario
Canada
06 November 2016 07:23
06 November 2016 07:31 Usual Post Typo corrections. jlm

User avatar
luudee
Posts: 17
Joined: Sat Oct 08, 2016 4:27 pm
Location: Pattaya
Contact:

Re: Programming 'F407 ...

Post by luudee » Sun Nov 13, 2016 1:24 pm

Hi John,

sorry, I am not online that often these days.

> @Luudee,
>
> I have a question if I may after I reslly summarize the challenges you experienced.
>
> In your Post you indicated you were using the STM32F407VET6 Mini. These STM32F407VET6 Mini boards presented challenges. Some boards were fine running your sketch after a Power On or Reset and others not. You found the source of the challenges that appears likely in lowel code for the STM32.


No, it was not a code problem. The external HSE oscillator does not work on some
of my boards. For me switching to the internal (R/C based) HSI oscillator is not a problem.
So that is what I am using now.


> My question is is do you feel the STM32F407VET6 Mini is a board that someone just starting into STM32, has only done a bit of dabbling in last few week on an Adruino, and has a long systems technical backgound will be fine with the STM32F407VET6 Mini? I ask as the STM32F407VET6 Mini is one of a few STM32 boards I am to considering for something important I need to build for me. An important personal need device.

The 'Mini" board is more or less a bare board, with just the MCU, USB and SD card connectors.
No other "baggage" - that is what I wanted. I also need the '407 for performance reasons.

If your application requires the power of a '407, and you do not need other peripherals/interfaces,
that this is a good board. But be prepared for a lot of headaches. All open/free libraries for the
'407 are a mess. I think there is alot more clean stable support for the '103.
>
> I have ordered a Maple Mini and will order another Baite one in a few days. The Maple Mini may barely have the least number of pins I need for the longer term goal as I add on the devices to the desired end result. The end result will need at least 12ADC, and at least 12 Digital, after SPI for SD card, and I2C for RTC and other I2C devices. I will start with a subset of the desired end goal.
>
> I now know from some code I have written in past week as a framework to help me size Flash/RAM the Maple Mini may just squeeze in with the 20K RAM. The Maple Mini 64K or 128K Flash will be just fine for the code in question. I am hoping the RISC and processing clock speed of a STM32 will meet the other requirements I have. The Maple Mini I have ordered will be used to gain a sense of the CPU processing power ability vs my need. There will be no display, or if there is a display, a character display to display values once or twice a minute. Likely a 16x20 character display. So no graphics, or such requirements that might add to the processing requirements of the MCU in that respect.
>
> I am looking at a few other STM32 boards that have a few more pins to way more pins than I need, but more is better than not enough. I have some other more routine hobby needs that the Maple Mini will be just fine for and I choose over an Adruino as the Maple Mini costs less and has more to offer than most of the typical Adruino devices commonly available and many use. I have one AtMega Adruino, and one more on way (common and not so common typical Adruino) to allow me to compare code/libraries if I have some issue with any porting or compiling of libraries in STM32 that having an AtMega based Adruino will help me in the figuring out the kinks to libraries/code that may not be available in STM32 and/or need tweaking for a STM32 based MCU.


> Regards,
>
> John L. Males
> Toronto, Ontario


Best Regards,

rudi

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests