cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo F429zi and STM32CubeMX very beginner question.

Kevin Flanagan
Associate II
Posted on May 22, 2017 at 23:51

Nucleo F429zi and STM32CubeMX very beginner question.

I am switching over to the Nucleo F429zi (old PIC32 user) and running into a problems I can not seem to surmount and don't even know what question I need to ask.

It seems that basic. I can get a simple blinking led working with an eclipse tool chain (as described  chapter 3 of Mastering STM32), but when I switch to trying do a similar blinking LED with STM32CubeMX generated code I can not get it to work for either the eclipse or true studio (free version) tool chains (correct tool chains selected in both cases). I just upload a brick. I've tried this a couple of times with both compilers after reviewing multiple docs and presentations and am still banging my head.

I deeply suspect that I am configuring something very wrong in STM32CubeMX (I am picking the NUCLEO-F429ZI board option). Anyone have any pointers, or gotcha's that I am most likely tripping over at the STM32CubeMX stage?

(Long term goal is a USB HID on this device... hence the need of STM32CubeMX and proper hooking into the HAL).

Thanks in advance.

-Kevin

8 REPLIES 8
Posted on May 23, 2017 at 11:20

(old PIC32 user)

Harmony or MLA or neither?

Disclaimer: I detest any 'library' of this kind.

You can have fun with LED with the debugger alone, if you can get it running, by directly manipulating the peripheral registers. All you need is to enable the respective GPIO's clock in RCC_AHB1ENR, set the respective bit to output in GPIOx_OTYPER, and then just set and clear the respective bit in GPIOx_ODR (although in a program you wouldn't use ODR directly, you would use GPIOx_BSRR - you can try it too as exercise 2). This all without a single line of program (or maybe with an infinite loop in main() if the debugger complains), provided that clock is running - ST has a nasty habit (inflicted by ARM) to put clock setup before main(). As the mcu comes up with the default RC oscillator (HSI) there's little need for this.

Once you get the grip, you can then try to decipher the mess CubeMX threw on you.

The other way is to click wildly around until it starts working. There are plenty of examples coming with Cube.

JW

Imen.D
ST Employee
Posted on May 23, 2017 at 16:30

Hi

kevin_rf

,

Welcome to the community.

I'd recommend you to have a lookthe HAL examples with STM32F429ZI-Nucleo under

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef4.html

firmware packagewhich can help you to start your application andget inspired from them:

STM32Cube_FW_F4_V1.0\Projects\STM32F429ZI-Nucleo

For your

Long term goal, y

ou can review the USB HID example: STM32Cube_FW_F4_V1.0\Projects\STM32F429ZI-Nucleo\Applications\USB_Device\HID_Standalone

Not hesitate to come back to the community for any question.

Thanks

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on May 24, 2017 at 22:17

Thanks, somehow I managed to miss the examples in STM32CubeF4. For me, they are working much better than code generated in 

STM32CubeMX. They are importing nicely into True Studio, have not yet tried Eclipse.  

Currently going through the code on HID_Standalone and forums to convert it to a Custom HID. (If off the top of your head know of a code snipped for that (a host initiated 64 byte packet back and forth)).

Thanks a million!

Posted on May 24, 2017 at 22:18

Harmony works? MLA

Thanks for the feedback.

Posted on May 25, 2017 at 02:03

Cube is Harmony; MLA is SPL.

Enjoy ;)

JW

Kevin Flanagan
Associate II
Posted on May 25, 2017 at 17:29

So as a follow up, I found the root cause of why I am creating bricks on the Nucleo-F429zi with STM32CubeMX generated code....

The code is hanging inside of the STM32CubeMX generated MX_ETH_Init(); call inside of main(); Since I will not use for the Ethernet in this project, I am fine commenting it out.

Does a method exist for reporting this kind of STM32CubeMX issues? (I have also noticed some less than desirable multiple monitor UI behavior with STM32CubeMX. )

Thanks Imen D for your help on the code example libraries, they are extremely helpful. 

-Kevin

Posted on May 25, 2017 at 15:59

Hi

Flanagan.Kevin

,

You would refer to the CustomHID_Standalone example in STM32CubeF4firmware package.

Look at this

http://www.st.com/content/ccc/resource/technical/document/application_note/ca/34/db/d3/71/50/44/9b/DM002135pdf/files/DM002135pdf/jcr:content/translations/en.DM002135pdf

application note 'STM32Cube firmware examples for STM32F4 Series' to know more where to findthe existing examples for STM32F4.

Regards

Imen

https://community.st.com/0D50X00009bMM5DSAW

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
AVI-crak
Senior
Posted on May 26, 2017 at 07:05

It is necessary for you will study documentation on the microprocessor.

Most important document. 

http://www.st.com/resource/en/reference_manual/dm00031020.pdf

The page for search of the decision. 

http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f4-series/stm32f429-439/stm32f429zi.html

In the description of the periphery and the device of a kernel of the microprocessor - have the strict sequence, the most important is described first of all, it is impossible to skip - it is possible to miss chapter entirely. All your questions will have the response in case of accurate information. Now your question has no accurate information, and is more similar to shout of drowning.

Study documentation, all remaining isn't so important.