Diskussions- und Newsboard des DARC-Ortsverbandes I40
allgemeine Kategorie => UHSDR Firmware => Message started by: Co on 04. March 2019, 14:12:47

Title: option bytes 32H7
Post by: Co on 04. March 2019, 14:12:47

Hi,

Just finalized a UI board with an H7 processor. Loaded bootloader and FW with ST-LINK, both loaded and verified OK. However no succesful boot. I suspect option bytes are not correctly set and also deviating from F7 in setting or identification. I searched the forum but did not find anything apart from the option byte settings for the F7.
Would appreciate some help on the correct settings for the H7.

Kind regards

Co

Title: Re:option bytes 32H7
Post by: DB4PLE on 04. March 2019, 14:53:46

Hi,

the options bytes have to/should be at their default values.

A cheap ST-LINK V2 clone and "Chip Erase" in STM32 Link utitily should get everything reset and ready to work.It would you also tell that the CPU is working at least to a minimal degree.
For the ST-LINK to work you just have to have power applied and to connect PA13/PA14 correctly via the P8 debug header with the ST-LINK USB dongle (and GND, of course).

73
Danilo



Title: Re:option bytes 32H7
Post by: Co on 04. March 2019, 18:01:44

Hi,
Tnx for your answer. As I already said I used STLink to load the H7 with bootloader and firmware, latest version. Both loaded and verified succesfully! Nevertheless the chip does not boot. So I wondered wether the option bytes are correct. E.g BOR level in the F7 should be 3. In the H7 it is 0.

regards

Co

Title: Re:option bytes 32H7
Post by: DF8OE on 04. March 2019, 18:12:59

I am not sure (it is long time ago) but as I remeber a full erase does *not* reset the option bytes - they leave as they are...

vy 73
Andreas

Title: Re:option bytes 32H7
Post by: Co on 04. March 2019, 19:27:54

Hello Thomas,

Thank you. Will try them out. Settings overhere are completely different. Surprised all checkboxes are empty. Will let you know the outcome.

regards

Co


Title: Re:option bytes 32H7
Post by: DF8OE on 05. March 2019, 05:04:57

@DL8EBD

Posting it for a "limited time" will prevent that others who do have the same problem can participate. What for hell can be the reason to act like this?


EDIT:
I have checked my H7 option bytes settings via CLI after I recognized strange "write protected" regions of the two pictures.

My settings are different from those of DL8EBD and I think my readout is a cleaner H7:

Read Out Protectio: Level 0
BOR-Level: Level 0

DMEP1, DMEP2 and SWAP_BANK unchecked, all others checked

BOOT_ADD0(H): 0x0800
Boot from (H): 0x8000000
BOOT_ADD1(H): 0x1FF0
Boot from (H): 1FF00000

Nothing write or read protected, no other markers set!

I think your reset vectors are scrambled so your MCU does not jump to start of bootloader... Bootloader starts at 0x8000000 so this should be the correct setting.

vy 73
Andreas

Title: Re:option bytes 32H7
Post by: DF8OE on 05. March 2019, 07:32:46

Hi Thomas,

there is more than one explanation for your readouts:

1) of course it can be readout errors. This is a question to Danilo: If flash sectors are write protected: would USB stick update work in spite of this? If not, you do have readout errors.
2) you have a scrambled H7 which by chance is working. Your reset vector is pointing to "nowhere land" before start of bootloader code. If there is nothing which prevents address pointer from increasing it will reach bootloader at some time. There are a few other "ifs" - but it can be that bootloader is started correctly in spite of wrong reset vector.

vy 73
Andreas

Title: Re:option bytes 32H7
Post by: Co on 05. March 2019, 10:07:59

Hello Andreas,

Thank you for your response. The option byte settings you specify are equal to my H7.
I notice the following :
-After loading the bootloader with STLINK the screenbacklight starts flashing a rate of approx. 3 Hz. RED LED stays off. Looks like its looping .
-Thereafter loading FW is succesful according to STLINK But (not surprising) not running.
- A full erase of the chip does not change the option bytes.

regards

Co


Title: Re:option bytes 32H7
Post by: Co on 05. March 2019, 11:19:06

Hello Thomas,

Yes, I downloaded the H7 BL and FW. To avoid possible errors I downloaded again to no avail.

Co

Title: Re:option bytes 32H7
Post by: DF8OE on 05. March 2019, 15:45:56

Hallo Thomas,

natürlich - das wäre eine echte Falle. Ich meinte das nur für den Fall dass die Daten stimmen. Falsche Daten müssen nicht unbedingt überleben ::)...

vy 73
Andreas

Title: Re:option bytes 32H7
Post by: Co on 05. March 2019, 16:08:39

Hi,

I notice another difference with Thomas' screencopy :

I am using STLINK V4.1.0.0 . Over the IWDG box there is another box called 'SECURITY' which I do not see in Thomas' box !.
It is unchecked. If I check the IWDG box and leave option menu with 'apply' then immediately therafter return to the option menu, the box is unchecked.
Does IWDG stand for the 'watchdog' function ? causing the chip to refresh every somany millisecs and thus looping.

regards

Co

Title: Re:option bytes 32H7
Post by: peter_77 on 07. March 2019, 09:14:24

You'll find a correct procedure to restore the option bytes here too:
https://www.amateurfunk-sulingen.de/forum/index.php?board=15;action=display;threadid=577;start=315 (https://www.amateurfunk-sulingen.de/forum/index.php?board=15;action=display;threadid=577;start=315)

Title: Re:option bytes 32H7
Post by: Co on 07. March 2019, 10:22:06

Hello all,

Ihave upgraded ST-LINK to V1.4.4 . So can read and set the option byte as required. No change. Can load bootloader and firmware , all verifies ok. After loading the bootloader the LCD flashed the backlight twice , every second. No red led. Looks like the BL is looping. Have checked several times for solder bridges, but all seems ok.

regards
Co

Title: Re:option bytes 32H7
Post by: Co on 07. March 2019, 14:41:40

Hi Thomas,

I checked with a scope and both clocks are running ok. Comparing to a 'running-ok' F7 board the signal produced by the H7 board 32 kc oscillator is much stronger. Can not explain but I gues probably of no importance.

Co

Title: Re:option bytes 32H7
Post by: DF8OE on 07. March 2019, 14:44:57

What happens if you press&hold BANDM and power on rig?

vy 73
Andreas

Title: Re:option bytes 32H7
Post by: Co on 07. March 2019, 14:55:46

Eureka!

Pressing Band+ and powering on produces a screen : OVI140 H7 Bootloader
followed by 6 lines of text

Title: Re:option bytes 32H7
Post by: DF8OE on 07. March 2019, 14:58:19

OK. Your problem is in flashing firmware. I propose to copy firmware (.bin-file) to an USB stick and try installing firmware that way. Something with STLink and flashing firmware goes wrong...

vy 73
Andreas

Title: Re:option bytes 32H7
Post by: Co on 07. March 2019, 15:10:21

I assume I have to provide 5v to IC8 out to power the usb plug. Still leaves me with a questionmark : Why is the LCD flashing when only the bootloader is loaded and no firmware at all. I cannot repeat this phenominum on the F7 board.

Title: Re:option bytes 32H7
Post by: Co on 07. March 2019, 15:12:40

The load address for the FW is still 0x8010000 ?

Title: Re:option bytes 32H7
Post by: SP9BSL on 07. March 2019, 15:15:50

not sure if mentioned here, but start adress of the firmware for H7 is different than for F7. Thus uploading the firmware with STLink for H7 must start from 0x08060000

edit: I didn't see your previous post, was writing in the same time you posted:)

Title: Re:option bytes 32H7
Post by: Co on 07. March 2019, 15:29:03

Many thanks Slawek ! That did the trick. The board is working fine.

Title: Re:option bytes 32H7
Post by: Co on 10. March 2019, 09:39:54

Hi,

UI board with H7 working fine now. Was not aware of the deviating load address for the FW for the H7. Tnx all for your help.

regards

Co

Title: Re:option bytes 32H7
Post by: DF8OE on 10. March 2019, 13:26:13

The reason is that flash pages on H7 do have different sizes...

vy 73
Andreas


Diskussions- und Newsboard des DARC-Ortsverbandes I40 | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.