STM32F334 Nucleo program generate error

A forums to allow bugs and problems with Flowcode v7 to be reported and resolved.

Moderator: Benj

Post Reply
User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

STM32F334 Nucleo program generate error

Post by STibor »

Hello!

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

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: STM32F334 Nucleo program generate error

Post by LeighM »

Thanks, updated fcd attached
Attachments
32F334Nucleo64.fcdx
(28.91 KiB) Downloaded 244 times

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: STM32F334 Nucleo program generate error

Post by STibor »

Thank you very much!

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: STM32F334 Nucleo program generate error

Post 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.

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: STM32F334 Nucleo program generate error

Post 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?

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: STM32F334 Nucleo program generate error

Post 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"

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: STM32F334 Nucleo program generate error

Post 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.
Attachments
32F334R8.fcdx
(43.76 KiB) Downloaded 243 times

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: STM32F334 Nucleo program generate error

Post 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.

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: STM32F334 Nucleo program generate error

Post by LeighM »

Do the clock config settings look ok?
I'll have a look in more detail when back in office Tuesday.

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: STM32F334 Nucleo program generate error

Post 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?
Attachments
STM32F334Nucleo.PNG
(167.92 KiB) Downloaded 3738 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: STM32F334 Nucleo program generate error

Post 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.

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: STM32F334 Nucleo program generate error

Post 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.

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: STM32F334 Nucleo program generate error

Post by LeighM »

OK, I think I see the issue now.
Please try attached updated FCD files.
Attachments
32F334R8.fcdx
(43.76 KiB) Downloaded 207 times
32F334Nucleo64.fcdx
(28.91 KiB) Downloaded 163 times

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: STM32F334 Nucleo program generate error

Post 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!

Post Reply