Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ext] update to latest libopencm3 #1557

Merged
merged 1 commit into from
Mar 15, 2016
Merged

[ext] update to latest libopencm3 #1557

merged 1 commit into from
Mar 15, 2016

Conversation

flixr
Copy link
Member

@flixr flixr commented Mar 9, 2016

and update clock setup accordingly

@kevindehecker
Copy link
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
Copy link
Member

dewagter commented Mar 9, 2016

@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" notifications@github.com 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
Contributor

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

@flixr
Copy link
Member Author

flixr commented Mar 9, 2016

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

@kevindehecker
Copy link
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
Copy link
Member Author

flixr commented Mar 9, 2016

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

@kevindehecker
Copy link
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
Copy link
Member Author

flixr commented Mar 11, 2016

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
Copy link
Member Author

flixr commented Mar 12, 2016

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
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
Copy link
Member Author

flixr commented Mar 12, 2016

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
Contributor

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

@kevindehecker
Copy link
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
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
Copy link
Member Author

flixr commented Mar 12, 2016

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

@flixr
Copy link
Member Author

flixr commented Mar 12, 2016

@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
Contributor

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

@flixr
Copy link
Member Author

flixr commented Mar 12, 2016

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
Contributor

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

@flixr
Copy link
Member Author

flixr commented Mar 14, 2016

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

@gautierhattenberger
Copy link
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.

None yet

4 participants