STM32 CUBE project

May 06, 2021 9 Replies

So, i created the ADC1 & PIOC13 blinker, bit it does me no good without knowing what the analog values are. But when i try to create an USB_CDC device, it complaints about:



ADC1: partly disable conflit with USB_FS_OTG: device mode only



Does it mean i can't use USB and ADC together?



By the way, how do i tell the IDE to keep it's hand off my codes? It keeps whipping out my codes when changing configurations.



The ADC likely has a LOT of possible pins. Some of them will conflict with other operations.

That sounds like if you want to use the ADC1 pin, you can't also use USB_FS_OTG. If you want that function, use a different ADC pin.

To avoid it wiping out your code, don't put it in the sections of the file marked AUTO-GENERATED, DO NOT EDIT.

I tried all PA0 to PA7, nothing work.

I put my codes in USER init section of main.c. Cube still whip them out. Fortunately, i have backup to put them back after final configuration.

Just out of curiosity, I tried the code on F469. It allows some ADC1 pins and FS_OTG. So, there seems to be some limitations with the F411.

F103 seems to work also. Only the F411 is crippled. Just ordered the F103 board, will try it in a few days.

You must disable the garbage collector. ;-)

Reinhardt

No, i just need to pay for a bigger garbage can. Paying 100 gallon, for my 48 gallon can.

I use TQFP 100 package to program the QFN 48 chip, to get around the constraints. Seems like a ST software bug, it should be the same chip inside.

Now i can read the analog signals, dump it to the server as USB CDC device, and blink the LED to make sure it's running. The server will be on a remote location, but the techs can watch the LED.

Well, my trash is better than ST's trash.

Are you sure? Have you debugged the ST USB stack?

Cheaper to use techs than parts with competent SW?

Only if you rewrite all the drivers...

i am reading the external analog pins PA1 to PA7, but only if i fake it as TQFP 100 or above, not QFN48. However, they should be the same chip inside. Also, it would not allow USB and full duplex USART1, so TX only.

They just need to make sure the micro is running, and call me if it's blinking red or not blinking at all. Normally, it should be blinking green.

It also complaints about many conflicts when enabling I/O pins, for which I know that they are not true.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required