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

Ported the crc peripheral from pebble/qemu #22

Merged
merged 2 commits into from Oct 18, 2018

Conversation

Projects
None yet
2 participants
@baselsayeh

baselsayeh commented Sep 18, 2018

No description provided.

baselsayeh added some commits Sep 18, 2018

added clock and register configuration for the crc peripheral
note that the crc peripheral works even without enabling it's clock

@beckus beckus merged commit f9839c6 into beckus:stm32 Oct 18, 2018

@beckus

This comment has been minimized.

Owner

beckus commented Oct 18, 2018

Thank you!

@baselsayeh

This comment has been minimized.

baselsayeh commented Oct 31, 2018

@beckus
A quick question,
Is the vcpu interrupt works by qemu_set_irq, Right?

I'm trying to implement dma for stm32_qemu, and almost succeed but the vcpu interrupt wont work.
I did used "sysbus_connect_irq" in stm32.c and "sysbus_init_irq" in stm32_dma.c
as in the pebble qemu port but that didn't work for some reason.

And i created a dummy test peripheral for the interrupt testing,
initializing it with
DeviceState *test123 = qdev_create(NULL, "stm32_test123");
object_property_add_child(stm32_container, "tst123", OBJECT(test123), NULL);
QDEV_PROP_SET_PERIPH_T(test123, "periph", STM32_TEST123);
qdev_prop_set_ptr(test123, "stm32_rcc", rcc_dev);
stm32_init_periph(test123, STM32_TEST123, 0x16560000, NULL);
sysbus_connect_irq(SYS_BUS_DEVICE(test123), 0, pic[STM32_EXTI0_IRQ]);
but it didn't work

Edit: Solved it!
I was not setting the irq priority to a high value!

https://github.com/pebble/qemu/blob/master/hw/arm/stm32f2xx.c#L363

https://github.com/pebble/qemu/blob/master/hw/arm/stm32f2xx_dma.c#L364

https://github.com/pebble/qemu/blob/master/hw/arm/stm32f2xx_dma.c#L217

@beckus

This comment has been minimized.

Owner

beckus commented Dec 6, 2018

As always, sorry I didn't get back to you earlier. I'm glad you figured it out - I appreciate you updating the post with your solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment