STM32L4+ USB-CDC Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
Post Reply
phusho
Posts: 4
Joined: Sun Apr 17, 2011 4:53 pm
Has thanked: 2 times

STM32L4+ USB-CDC

Post by phusho »

Hi,
I am playing with STM32L4R5ZI nucleo 144 board. One thing that bug me out is that with ChibiOS 21.6.x USB is not working. I am using testhal/STM32/multi/USB_CDC example.
If I use 20.3.x stable - same example is working. I can not find any difference in the two projects. New features like dynamic clock are disabled, but boost is enabled ( which must not be a problem as CR5 register value for boost is same ), also clock configuration in two projects are same. What I can say is that with 21.6.x internal PULLUP is doing nothing (maybe hardware is not functioning correct). Any Ideas what to look at ?

edit: master is not working as well
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32L4+ USB-CDC

Post by Giovanni »

Hi,

Please use 21.11.0. Version 21.6.0 has been discontinued.

Of course please report if you have the same problem with 21.11.0.

Giovanni
phusho
Posts: 4
Joined: Sun Apr 17, 2011 4:53 pm
Has thanked: 2 times

Re: STM32L4+ USB-CDC

Post by phusho »

There is no 21.11.0 in GitHub, how to get it ?

edit: Found it
phusho
Posts: 4
Joined: Sun Apr 17, 2011 4:53 pm
Has thanked: 2 times

Re: STM32L4+ USB-CDC

Post by phusho »

Same problem with 21.11.0
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32L4+ USB-CDC

Post by Giovanni »

phusho wrote:Same problem with 21.11.0


Moving in bug reports, will look at this.

Giovanni
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32L4+ USB-CDC

Post by Giovanni »

Hi,

Fixed as bug #1207.

You just need to change your mcuconf.h file this way:

Code: Select all

#define STM32_PWR_CR2                       (PWR_CR2_PLS_LEV0 | PWR_CR2_IOSV | PWR_CR2_USV)


Giovanni
phusho
Posts: 4
Joined: Sun Apr 17, 2011 4:53 pm
Has thanked: 2 times

Re: STM32L4+ USB-CDC

Post by phusho »

Giovanni wrote:Hi,

Fixed as bug #1207.

You just need to change your mcuconf.h file this way:

Code: Select all

#define STM32_PWR_CR2                       (PWR_CR2_PLS_LEV0 | PWR_CR2_IOSV | PWR_CR2_USV)


Giovanni

Changes you made are working in commit I see that you have changed STM32_PLLSAI1N_VALUE to 72, It is working with previous settings also, according to configurator sheet you will have 48 MHz with 48 and STM32_PLLSAI1Q_VALUE=4. I have tested and it is working. Unless there are other complications.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32L4+ USB-CDC

Post by Giovanni »

Hi,

Those settings are equivalent, you can use the old or the new ones depending on other constraints if needed.

Giovanni
Post Reply