STM32F334 Nucleo program generate error

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

Moderator: Benj

User avatar
STibor
Posts: 261
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 110 times
Been thanked: 111 times
Contact:

STM32F334 Nucleo program generate error

Postby STibor » Tue May 22, 2018 7:53 am

Hello!

STM32F334 generates an error when generating a program.
Link to History: http://www.matrixtsl.com/mmforums/viewtopic.php?f=72&t=20083#p88195

User avatar
LeighM
Matrix Staff
Posts: 1844
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 429 times
Been thanked: 612 times
Contact:

Re: STM32F334 Nucleo program generate error

Postby LeighM » Tue May 22, 2018 8:29 am

Thanks, updated fcd attached
Attachments
32F334Nucleo64.fcdx
(29.39 KiB) Downloaded 31 times
These users thanked the author LeighM for the post:
STibor (Tue May 22, 2018 4:33 pm)
Rating: 5.56%
 

User avatar
STibor
Posts: 261
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 110 times
Been thanked: 111 times
Contact:

Re: STM32F334 Nucleo program generate error

Postby STibor » Tue May 22, 2018 4:42 pm

Thank you very much!

User avatar
STibor
Posts: 261
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 110 times
Been thanked: 111 times
Contact:

Re: STM32F334 Nucleo program generate error

Postby STibor » Fri May 25, 2018 4:34 am

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: 1844
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 429 times
Been thanked: 612 times
Contact:

Re: STM32F334 Nucleo program generate error

Postby LeighM » Fri May 25, 2018 8:21 am

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: 261
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 110 times
Been thanked: 111 times
Contact:

Re: STM32F334 Nucleo program generate error

Postby STibor » Fri May 25, 2018 12:39 pm

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/nucleo-f334r8.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: 1844
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 429 times
Been thanked: 612 times
Contact:

Re: STM32F334 Nucleo program generate error

Postby LeighM » Fri May 25, 2018 3:00 pm

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 36 times
These users thanked the author LeighM for the post:
STibor (Fri May 25, 2018 7:09 pm)
Rating: 5.56%
 

User avatar
STibor
Posts: 261
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 110 times
Been thanked: 111 times
Contact:

Re: STM32F334 Nucleo program generate error

Postby STibor » Fri May 25, 2018 7:09 pm

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: 1844
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 429 times
Been thanked: 612 times
Contact:

Re: STM32F334 Nucleo program generate error

Postby LeighM » Fri May 25, 2018 8:56 pm

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

User avatar
STibor
Posts: 261
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 110 times
Been thanked: 111 times
Contact:

Re: STM32F334 Nucleo program generate error

Postby STibor » Tue May 29, 2018 4:11 am

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
STM32F334Nucleo.PNG (167.92 KiB) Viewed 1756 times

User avatar
LeighM
Matrix Staff
Posts: 1844
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 429 times
Been thanked: 612 times
Contact:

Re: STM32F334 Nucleo program generate error

Postby LeighM » Tue May 29, 2018 8:52 am

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: 261
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 110 times
Been thanked: 111 times
Contact:

Re: STM32F334 Nucleo program generate error

Postby STibor » Tue May 29, 2018 1:03 pm

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: 1844
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 429 times
Been thanked: 612 times
Contact:

Re: STM32F334 Nucleo program generate error

Postby LeighM » Tue May 29, 2018 1:40 pm

OK, I think I see the issue now.
Please try attached updated FCD files.
Attachments
32F334R8.fcdx
(43.76 KiB) Downloaded 18 times
32F334Nucleo64.fcdx
(29.39 KiB) Downloaded 14 times
These users thanked the author LeighM for the post:
STibor (Tue May 29, 2018 6:24 pm)
Rating: 5.56%
 

User avatar
STibor
Posts: 261
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 110 times
Been thanked: 111 times
Contact:

Re: STM32F334 Nucleo program generate error

Postby STibor » Tue May 29, 2018 6:29 pm

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!
These users thanked the author STibor for the post:
LeighM (Tue May 29, 2018 6:45 pm)
Rating: 5.56%