Jump to content

STM32F4 and MIOS studio SEQV4 program loading troubles.


Urpo
 Share

Recommended Posts

Hi.

I'm trying to build MidiBox SEQ V4 and I am confused with MIOS. Could anyone help me to understand what am I doing wrong with it?

So, I got my STM32 F4 (it says STM32F407VGT6 on the chip) connected it via ST-LINK and succesfully uploaded the mios32_bootloader_v1_018/MBHP_CORE_STM32F4/project.hex on it with STM ST-LINK utility using SWD port.

To be sure, I compared the .hex vs. board memory with the same utility and no differences was found.

 

                 At this stage if i connect MIDI_IO to core, connect USB cable to CN5 of STM32F4, start MIOS studio without pressing any buttons and select SB X-FI MIDI port for MIDI IN and MIDI OUT and                      hitting RESET I get on the lower text field:

                                  [10869.030] ====================

                                  [10869.039] Bootloader 1.018

                                  [10869.049] ====================

                                  [10869.052] 

                                  [10869.063] Checking Bootloader...

                                  [10869.340] No mismatches found.

                                  [10869.353] The bootloader is up-to-date!

                                  [10869.369] You can upload another application now!

                                  [10869.390] Or type 'help' in MIOS Terminal for additional options!

 

I connected second USB cable to CN5 and while holding down blue USER I pressed black RESET button.( From now on I keep BLUE button held down.)

Now, when I start MIOS studio 2.4.6 to upload the actual sequencer program and select "MIOS 32 Bootloader" for MIDI IN and MIDI OUT, I get:

 

Operating System: MIOS32

Board: STM32F4DISCOVERY

Core Family: STM32F4xx

Chip ID: 0x10016413

Serial: #320025000347333234333738

Flash Memory Size: 1048576 bytes

RAM Size: 196608 bytes

MIOS32 Bootloader

(c) 2014 T. Klose

 

I select BROWSE and open midibox_seq_v4_089/MBHP_CORE_STM32F4/project.hex and get:

 

Reading project.hex

project.hex contains 393288 bytes (1537 blocks).

Range 0x08000000-0x08003fff (16384 bytes) - BL excluded

Range 0x08004000-0x080041ff (512 bytes) - STM32 Flash

Range 0x08010000-0x0806beff (376576 bytes) - STM32 Flash

Press start button to begin upload.

 

By pressing start i get:

 

Upload of 377088 bytes completed after 7.99s (46.08 kb/s)

1 ignorable errors during upload solved (no issue!)

 

then the board resets and i get exactly same text on left screen as above.

 

Questions: 

Should i see at this point or after resetting the board something else on left text area of MIOS studio or on LCD if I hook up it up? (LCD stays blank. Only backlight is on)

Why if I get back to the ST-LINK utility and compare .hex vs memory I get: Error. 1st difference found @: 0x8004004 ? Looks to me that application is overwriting part of the bootloader. Still the bootloader seems to work?

What is that 1 ignoreable error? Is there some kind of logfile that MIOS studio writes?

 

Tried all above with GM5 driver also. Result are the same.

Using Windows 7 ultimate 64bit.

 

 

 

Link to comment
Share on other sites

Nobody reported such an issue so far.

The ignorable upload error can be... ignored! It happens when MIOS Studio uploads a new block while flash programming is in progress. MIOS Studio retries and gets a success message -> flash programming done -> don't worry about this. Depending on the machine you could get 20...30 ignorable errors but application is still uploaded correctly.

8004004 isn't the boot loader section anymore, it's the application section.
It's normal that this range will be overwritten.
Which .hex file did you compare? The boot loader or MIDIbox SEQ?

You could upload the MIDIbox SEQ binary directly with ST-Link, it contains the boot loader + the application code, the result should be the same as if you would upload the application via USB MIDI.
This is also the way how you can continue troubleshooting.

It's btw. strange that the LCD is blank, the MIOS32 boot loader update application should initialize the LCD and print a message.

The only explanation that I have for this effect (application not started, LCD blank) is, that the blue USER button is still pressed for whatever reason (defective button?) - because in this case the boot loader won't start the application.

Best Regards, Thorsten.

 

Link to comment
Share on other sites

 Thanks for answering.

 

I compared bootloader project.hex vs memory.

...blue USER button is still pressed for whatever reason (defective button?)

I tested with a multimeter that both BLACK and BLUE buttons seems to be functional.

You could upload the MIDIbox SEQ binary directly with ST-Link, it contains the boot loader + the application code, the result should be the same as if you would upload the application via USB MIDI.

I uploaded MIDIbox SEQ binary directly with ST-Link as you suggested and same happens as before except now i can't get any response from bootloader via MIDI_IO.

Should ST-link start address be 0x08000000 ? 

 

Link to comment
Share on other sites

Yes, the bootloader starts at 08000000, and if the BSL Hold Pin (for STM32F4: pin PA0) isn't activated, it resets the CPU and continues at 08004000 where the application is located.

"Activated" means for PA0: it should be 0V so that the application will be booted (this pin has a pull-down device)

Could you please doublecheck that PA0 is at 0V?

Best Regards, Thorsten.

Link to comment
Share on other sites

Now I feel soooo stupid... :blush: I couldn't see anything on the LCD because the text was too dim. I had to turn contrast potentiometer ALL the way to the left to get anything on my LCD (MC4002D7). Now everything seems to work fine. (And has been working all the time, I believe.) Tried both ways of programming; only bootloader and application and bootloader: both works. Without LCD information I wasn't able to tell did the application flashed ok or not. Sorry to trouble you with this. Again the fault was found between the driver's seat and a steering wheel. :happy:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...