This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

beginner simple question

Hi,

I am an old programmer (65) and I want to learn how to work with STM32. I live within 10km from ST plants in Crolles (France).Target is to be able to drive signals on a 7' railway layout

English is not my natural language.

For my first step, I bought a STM32F750 Discovery kit. I put in the usb cable and ... it works. I can use the demo apps.

My first question is : can I build a new small program and send it to the board WITHOUT destroying the default apps ?

Second question : when I installed Keil compiler, there was a 'pack installer' window. I could'nt find STM32F750 Discovery kit in it. Can I find it somewhere or do I have to use a 'similar' kit ?

Thanks in advance

Jean

Parents
  • 10euros

    That's cracking value!

    However, I would still say that it's grossly over-specified both for a beginner to start on and for the task you mentioned - could your friend not get you something simpler?

    Even if you bought it from a distributor, the Nucleo boards are under 20 euros

    Have you considered Arduino?

    One good thing about it is : when you plug the mini-Usb, it works and you can play with it !!

    Indeed - that is the norm these days!

    and it comes with all the functionality of an ICE built in - which would have been a large cabinet and cost tens of thousands of dollars back in the day!

Reply
  • 10euros

    That's cracking value!

    However, I would still say that it's grossly over-specified both for a beginner to start on and for the task you mentioned - could your friend not get you something simpler?

    Even if you bought it from a distributor, the Nucleo boards are under 20 euros

    Have you considered Arduino?

    One good thing about it is : when you plug the mini-Usb, it works and you can play with it !!

    Indeed - that is the norm these days!

    and it comes with all the functionality of an ICE built in - which would have been a large cabinet and cost tens of thousands of dollars back in the day!

Children
  • Have you considered Arduino?

    More than 6000 people work for ST in my surroundings. I have some friends among them. If they know that I don't work with STM32, they shot me down ;-)

    I have a second question about CubeMx : in the pinout view (see JPG) you have the pin description of the MCU. But what I would like is to be able to parameter pins in CN4, CN5, CN6 and CN7; in fact the only pins that are connected to the 'outside' world. How can I have that ?

  • You realise that ST made an Arduino core for STM32 ... ?

    question about CubeMx

    CubeMX is entirely an ST thing - nothing to do with Keil or ARM - so you need to ask ST about that:

    https://community.st.com/s/

  • private message for Andy : I’m stubborn and I will succeed !!!

    I have another question. I try to understand the GPIO toggle button example. In main.c there is a reference to GPIO_PIN_1. I am unable to see where it is defined !

    What do I missed ?

    Jean

  • I am back after a hard work month.

    here is the simple code I want to run. Questions are underneath.

      /* We should never get here as control is now taken by the scheduler */
      /* Infinite loop */
      /* USER CODE BEGIN WHILE */
      while (1)
      {

    /* si on appuie sur le bouton, le clignotement est plus rapide */
        if (HAL_GPIO_ReadPin(bouton_poussoir_GPIO_Port, bouton_poussoir_Pin))
            {
          HAL_GPIO_TogglePin(GPIOI, GPIO_PIN_1);
          /* Insert delay 400 ms */
          HAL_Delay(400);
            }
            else
            {
          HAL_GPIO_TogglePin(GPIOI, GPIO_PIN_1);
          /* Insert delay 1000 ms */
          HAL_Delay(1000);
            }

        /* USER CODE END WHILE */

        /* USER CODE BEGIN 3 */
      }

    questions :

    As I wanted to go further in the future, I asked Keil to include RTOS.

    What means the first two lines : the while(1) wille never be executed ?

    My first attempt to build the project gave errors about configENABLE_TRUSTZONE  (#35: #error directive: configENABLE_TRUSTZONE must be defined in FreeRTOSConfig.h.). It is defined in FreeRTOS.h !!!! I haven't understand what trustzone safety is. May I turn it off ?

    Second attempt gave me 137 errors. Most of them concern configASSERT: why ? :

    ../Middlewares/Third_Party/FreeRTOS/Source/event_groups.c(106): error:  #18: expected a ")"
                            configASSERT( xSize == sizeof( EventGroup_t ) );

    Best regards

    Jean

  • Hi Andy,

    like this ? ;-)

      /* We should never get here as control is now taken by the scheduler */
      /* Infinite loop */
      /* USER CODE BEGIN WHILE */
      while (1)
      { // is this while executed ?
    
    /* si on appuie sur le bouton, le clignotement est plus rapide */
        if (HAL_GPIO_ReadPin(bouton_poussoir_GPIO_Port, bouton_poussoir_Pin))
    		{
          HAL_GPIO_TogglePin(GPIOI, GPIO_PIN_1);
          /* Insert delay 400 ms */
          HAL_Delay(400);
    		}
    		else
    		{
          HAL_GPIO_TogglePin(GPIOI, GPIO_PIN_1);
          /* Insert delay 1000 ms */
          HAL_Delay(1000);
    		}
    
        /* USER CODE END WHILE */
    
        /* USER CODE BEGIN 3 */
      }
      /* USER CODE END 3 */

    Jean

  • After a lot of works, I found a '}' that was not linked to a '{' in the small program I wrote in main.c (I think because of a bad use of copy / paste). I removed this } and all the errors are gone.

    So I got a hex file that I downloaded to the board via CubeProgrammer. It has done something because, now, the screen is empty (no demo) but my simple program doesn't start ... In fact, I wanted to 'blink' led1 and it stay on.

    Jean

    PS Happy new year to everyone !

  • I don't know if it is the only thing that fixed this issue, but when i set optimization level to 0, the LED1 blinked !

    Jean

  • When changing the optimisation level "breaks" code, it is (almost?) invariable the code that is flawed.

    It most likely means that you are relying upon something that you should not.

    A common example is not having 'volatile' where required.

    Another is trying to rely upon the execution time of code.

    https://www.avrfreaks.net/forum/tutcoptimization-and-importance-volatile-gcc - although focussed on GCC & AVR, it is general.