Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[ext] update to latest libopencm3#1557

Merged
flixr merged 1 commit into
masterfrom
update_locm3
Mar 15, 2016
Merged

[ext] update to latest libopencm3#1557
flixr merged 1 commit into
masterfrom
update_locm3

Conversation

@flixr

@flixr flixr commented Mar 9, 2016

Copy link
Copy Markdown
Member

and update clock setup accordingly

@kevindehecker

Copy link
Copy Markdown
Contributor

This does not compile for me...

arch/stm32/mcu_arch.c:44:48: error: 'RCC_CLOCK_3V3_END' undeclared here (not in a function)
const struct rcc_clock_scale rcc_hse_24mhz_3v3[RCC_CLOCK_3V3_END] = {
^
arch/stm32/mcu_arch.c:46:5: error: field name not in record or union initializer
.pllm = 24,
^
arch/stm32/mcu_arch.c:46:5: error: (near initialization for 'rcc_hse_24mhz_3v3')
arch/stm32/mcu_arch.c:47:5: error: field name not in record or union initializer
.plln = 96,
^
arch/stm32/mcu_arch.c:47:5: error: (near initialization for 'rcc_hse_24mhz_3v3')
arch/stm32/mcu_arch.c:48:5: error: field name not in record or union initializer

......

@dewagter

dewagter commented Mar 9, 2016

Copy link
Copy Markdown
Member

@kevin: was this not our clock setup code for the 24MHz crystal? Probably
it must be re-copy pasted and changed with the new opencm define names.
On Mar 9, 2016 16:35, "kevindehecker" [email protected] wrote:

This does not compile for me...

arch/stm32/mcu_arch.c:44:48: error: 'RCC_CLOCK_3V3_END' undeclared here
(not in a function)
const struct rcc_clock_scale rcc_hse_24mhz_3v3[RCC_CLOCK_3V3_END] = {
^
arch/stm32/mcu_arch.c:46:5: error: field name not in record or union
initializer
.pllm = 24,
^
arch/stm32/mcu_arch.c:46:5: error: (near initialization for
'rcc_hse_24mhz_3v3')
arch/stm32/mcu_arch.c:47:5: error: field name not in record or union
initializer
.plln = 96,
^
arch/stm32/mcu_arch.c:47:5: error: (near initialization for
'rcc_hse_24mhz_3v3')
arch/stm32/mcu_arch.c:48:5: error: field name not in record or union
initializer

......


Reply to this email directly or view it on GitHub
#1557 (comment).

@kevindehecker

Copy link
Copy Markdown
Contributor

I tried it with a clean master on the Logo600 airframe. Should not have anything to do with PX4 config.

@flixr

flixr commented Mar 9, 2016

Copy link
Copy Markdown
Member Author

@kevindehecker then you didn't call toplevel make first, it needs to fetch the updated submodule and recompile the libopencm3 libs...

@kevindehecker

Copy link
Copy Markdown
Contributor

Nop, did that to. However, I first commited after the cherry-pick because of that submodule nonsense ( it reported uncommited changes for the submodule). Maybe that was something I was not supposed to do...

@flixr

flixr commented Mar 9, 2016

Copy link
Copy Markdown
Member Author

you probably changed the submodule back to the previous version or so...

@kevindehecker

Copy link
Copy Markdown
Contributor

Apparently I did... Managed to compile the AP for my Iris.

Next problem; after uploading the AP, ttyACM0 does not show up anymore (or any other new tty device for that matter)... Sys time led is going strong though, so the AP seems to run fine.

@flixr

flixr commented Mar 11, 2016

Copy link
Copy Markdown
Member Author

hm... so there must have been some changes in libopencm3 that make this silently not work anymore.
I can test this on my Lisa/MX on the weekend.

@flixr

flixr commented Mar 12, 2016

Copy link
Copy Markdown
Member Author

So transparent_usb telemetry still works fine on my LisaMX.

Other things are working fine though? Are you sure the clock setup is correct in your case?
Also is that on the F4 or the F1?

@kevindehecker

Copy link
Copy Markdown
Contributor

It's on the F4, so the clock config should be fairly standard. I'm however not using telemetry over usb though (and as such did not set transparant_usb), but using usb serial directly from a module. Which works with the current libopencm3, but apparently not with this newest version.

@flixr

flixr commented Mar 12, 2016

Copy link
Copy Markdown
Member Author

transparent_usb uses the same usb serial code, so it shouldn't really make a difference... (except maybe where/when you call send_message in your module?).
Also note that I tried it with the usb_ser_hw from this PR, so without the changes you made for the px4io flashing...
Maybe you could first confirm that transparent_usb is working for you, then hunt for the problem?

@kevindehecker

Copy link
Copy Markdown
Contributor

OK, also transparant_usb is not working. No /dev/ttyACM device appears.

@kevindehecker

Copy link
Copy Markdown
Contributor

Think I may have found something, the new libopencm contains another clock config (84MHz), which is not implemented in the pprz version of the 24 ext crystal function...

.ahb_frequency = 48000000,
.apb1_frequency = 12000000,
.apb2_frequency = 24000000,
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, there should be another 84MHz config here! That solves my problem.

and update clock setup accordingly
@flixr

flixr commented Mar 12, 2016

Copy link
Copy Markdown
Member Author

Rebased, added missing 84MHz entry and updated F1 24MHz setup accordingly as well...

@flixr

flixr commented Mar 12, 2016

Copy link
Copy Markdown
Member Author

@kevindehecker just to clarify: what is working for you now? You get a device again, but is the px4io flashing working now as well, or same problem as before the libopencm3 update?

@kevindehecker

Copy link
Copy Markdown
Contributor

Yes, the device works, but unfortunately the new libopencm3 does not solve my PX4 usb flashing problem :(.

@flixr

flixr commented Mar 12, 2016

Copy link
Copy Markdown
Member Author

Bummer... but I think it would be good to merge this anyway.
Maybe @podhrmic @gautierhattenberger can confirm stuff is still working on Apogee, Lia, etc..

@kevindehecker

Copy link
Copy Markdown
Contributor

Yes please merge. I will work on a clean usb issue Monday.

@flixr

flixr commented Mar 14, 2016

Copy link
Copy Markdown
Member Author

@gautierhattenberger any objections in merging this?
Maybe you could test on apogee as well first?

@gautierhattenberger

Copy link
Copy Markdown
Member

Seems to work on Apogee with and without ChibiOS mix.

flixr added a commit that referenced this pull request Mar 15, 2016
[ext] update to latest libopencm3
@flixr flixr merged commit 93b8741 into master Mar 15, 2016
@flixr flixr deleted the update_locm3 branch March 15, 2016 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants