Its STM32F302R8T6, so I guess it does not have OTG.

Just realized one of the files I'm converting basically is
"usb_cdcacm/cdcacm.c" (from examples) with added stuff:


nvic_enable_irq(NVIC_OTG_FS_IRQ); and then:

void otg_fs_isr(void) { (this is interrupt handler, right?)
    usbd_poll(usbd_dev);
}

Can you please help me, how could this be done in F3?

Luis


On 16 July 2014 21:40, Chuck McManis <[email protected]> wrote:

> The code recently changed (well a couple of months ago) so that instead of
> rcc_peripheral_enable_clock( ...) its now simply
> rcc_periph_clock_enable(RCC_GPIOA) for example, But perhaps more
> importantly I don't believe the f3 has a USB OTG i/o port, I believe it is
> device only USB so there will be no OTG_FS in it. Do you have a part number
> for the chip you are targeting?
>
> --Chuck
>
>
>
> On Wed, Jul 16, 2014 at 12:16 PM, Luis Rodrigues <[email protected]>
> wrote:
>
>> Hi all,
>> I'm a complete noobie at programming MCUs, I'm trying to port some code
>> made for smt32f4 to a stm32f3.
>>
>> I have some code that:
>>     nvic_enable_irq(NVIC_OTG_FS_IRQ);
>>     rcc_peripheral_enable_clock(&RCC_AHB1ENR, RCC_AHB1ENR_IOPAEN);
>>     rcc_peripheral_enable_clock(&RCC_AHB2ENR, RCC_AHB2ENR_OTGFSEN);
>>
>>
>> None of these are defined for F3, can someone please point me in the
>> right direction?
>>
>> Best,
>> Luis
>>
>> PS:
>> From what I've seen in include files I guess RCC_AHB1ENR becomes
>> RCC_AHBENR but
>> but not really sure
>>
>>
>> ------------------------------------------------------------------------------
>> Want fast and easy access to all the code in your enterprise? Index and
>> search up to 200,000 lines of code with a free copy of Black Duck
>> Code Sight - the same software that powers the world's largest code
>> search on Ohloh, the Black Duck Open Hub! Try it now.
>> http://p.sf.net/sfu/bds
>> _______________________________________________
>> libopencm3-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/libopencm3-devel
>>
>>
>
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
libopencm3-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libopencm3-devel

Reply via email to