Page 1 of 1

STM32F334 Nucleo program generate error

Posted: Tue May 22, 2018 7:53 am
by STibor
Hello!

STM32F334 generates an error when generating a program.
Link to History: http://www.matrixtsl.com/mmforums/viewt ... 083#p88195

Re: STM32F334 Nucleo program generate error

Posted: Tue May 22, 2018 8:29 am
by LeighM
Thanks, updated fcd attached

Re: STM32F334 Nucleo program generate error

Posted: Tue May 22, 2018 4:42 pm
by STibor
Thank you very much!

Re: STM32F334 Nucleo program generate error

Posted: Fri May 25, 2018 4:34 am
by STibor
Hello!

I bought the STM32F334R8 nucleo pcb.
Does not work. Program upload does not indicate an error. But it does not upload the program.
The programmer joins, the uploading LED blinks slightly, but it does not work.
The newly created HEX manually uploaded does not work.
I think the FCD file is incomplete, not all ports are found.
If I change the controller type to STM32F334K8 in the program, programming is successful and it works. Only the STM32F334K8 32 terminals, the STM32F334R8 64 terminals, are therefore missing the port assignment.

Re: STM32F334 Nucleo program generate error

Posted: Fri May 25, 2018 8:21 am
by LeighM
Hi,
Yes the Nucleo boards FCD only have the Arduino connector pins defined, I think it was assumed that most use would be with Arduino shields.
The equivalent raw chip definitions can be used if other port pins are needed.

So you are OK now using the STM32F334K8?

Re: STM32F334 Nucleo program generate error

Posted: Fri May 25, 2018 12:39 pm
by STibor
LeighM wrote: So you are OK now using the STM32F334K8?
No. I use the STM32F334R8 on the nucleo 64 board.
http://www.st.com/en/evaluation-tools/n ... 334r8.html
Board expansion connectors:
"Arduino™ Uno V3
ST morpho extension pin headers for full access to all STM32 I/Os"

Re: STM32F334 Nucleo program generate error

Posted: Fri May 25, 2018 3:00 pm
by LeighM
Hi,
I have started an FCD for the 32F334R8 64pin device, although I’ve not had chance to check or test everything,
but it should help you get started on your Nucleo project.
Drop the attached file into your Flowcode installation FCD\ARM directory and restart Flowcode.

This is the chip target version so does not have the virtual drive programming by default.
If you need this feature, then create yourself a custom setting in Build->Compiler Options
and copy in the programmer settings from a Nucleo target.

Re: STM32F334 Nucleo program generate error

Posted: Fri May 25, 2018 7:09 pm
by STibor
The generated hex uploaded to the controller. Sorry, the uploaded program does not work.
I tried a LED blinker. Hardware is connected to port A5, LED is dark.
If you replace the target device in the Flowcode project configuration (32f334k8 only in the program), the LED will blink.

Re: STM32F334 Nucleo program generate error

Posted: Fri May 25, 2018 8:56 pm
by LeighM
Do the clock config settings look ok?
I'll have a look in more detail when back in office Tuesday.

Re: STM32F334 Nucleo program generate error

Posted: Tue May 29, 2018 4:11 am
by STibor
Hello!

I've tried many configuration options.
The configuration option is shown in STM32CubeMX, which I implemented in Flowcode.
Just a note, the maximum clock speed in the ST ARM definitions file so far is smaller than the controller can. eg. STM32F334 @72MHz definition file is 32MHz. Is there some reason?

Re: STM32F334 Nucleo program generate error

Posted: Tue May 29, 2018 8:52 am
by LeighM
The max 32MHz relates to the input frequency (HSE).
So, in summary, you have
a LED blinker. Hardware is connected to port A5
32F334K8 - works
32F334 Nucleo - does not work
32F334R8 - does not work
Could you post the C files produced for these?

It would be worth trying the projects with the internal HSI (8MHz) clock selected.

Re: STM32F334 Nucleo program generate error

Posted: Tue May 29, 2018 1:03 pm
by STibor
Tested hardware: STM32F334Nucleo on STM32F334R8 processor.

Flowcode software setup variations, results:
STM32F334nucleo software setup for hardware334R8nucleo -> complete inoperability, I think uploading is not perfect either.
STM32F334R8 software setup for hardware334R8nucleo -> something there but nothing works
STM32F334K8 software setup for hardware334R8nucleo-> LED flashing, PWM, UART works. (would be perfect for 32f334R8 if IO quantity and features could be expanded)
I tried in several clock speed configurations with external and internal clock speed, using PLL and without PLL.
I see the program in the evening, but it's a simple LED blinking program, no embedded code C.

Re: STM32F334 Nucleo program generate error

Posted: Tue May 29, 2018 1:40 pm
by LeighM
OK, I think I see the issue now.
Please try attached updated FCD files.

Re: STM32F334 Nucleo program generate error

Posted: Tue May 29, 2018 6:29 pm
by STibor
Working perfectly.
UART (Channel 2-USART2), PWM (Channel 5-TIM2_CH2), and PORTA5 Digital IO. I will test you later. : D
Thanks for the help!