2017-05-22 02:51 PM
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
2017-05-23 02:20 AM
(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
2017-05-23 07:30 AM
Hi
kevin_rf
,Welcome to the community.
I'd recommend you to have a lookthe HAL examples with STM32F429ZI-Nucleo under 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_StandaloneNot hesitate to come back to the community for any question.
Thanks
Imen
2017-05-24 03:17 PM
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!
2017-05-24 03:18 PM
Harmony works? MLA
Thanks for the feedback.
2017-05-24 07:03 PM
Cube is Harmony; MLA is SPL.
Enjoy 😉
JW
2017-05-25 08:29 AM
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
2017-05-25 08:59 AM
Hi
Flanagan.Kevin
,You would refer to the CustomHID_Standalone example in STM32CubeF4firmware package.
Look at this
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
2017-05-25 10:05 PM
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.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.