Forums

STM32 CUBE project

Started by Ed Lee May 6, 2021
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.

On 5/6/21 1:07 PM, Ed Lee wrote:
> 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.
On Thursday, May 6, 2021 at 10:46:02 AM UTC-7, Richard Damon wrote:
> On 5/6/21 1:07 PM, Ed Lee wrote: > > 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.
I tried all PA0 to PA7, nothing work.
> To avoid it wiping out your code, don't put it in the sections of the > file marked AUTO-GENERATED, DO NOT EDIT.
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.
On Thursday, May 6, 2021 at 11:10:39 AM UTC-7, Ed Lee wrote:
> On Thursday, May 6, 2021 at 10:46:02 AM UTC-7, Richard Damon wrote: > > On 5/6/21 1:07 PM, Ed Lee wrote: > > > 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. > I tried all PA0 to PA7, nothing work. > > To avoid it wiping out your code, don't put it in the sections of the > > file marked AUTO-GENERATED, DO NOT EDIT. > 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.
On Thursday, May 6, 2021 at 1:20:11 PM UTC-7, Ed Lee wrote:
> On Thursday, May 6, 2021 at 11:10:39 AM UTC-7, Ed Lee wrote: > > On Thursday, May 6, 2021 at 10:46:02 AM UTC-7, Richard Damon wrote: > > > On 5/6/21 1:07 PM, Ed Lee wrote: > > > > 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. > > I tried all PA0 to PA7, nothing work. > > > To avoid it wiping out your code, don't put it in the sections of the > > > file marked AUTO-GENERATED, DO NOT EDIT. > > 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.
On 5/7/21 2:10 AM, Ed Lee wrote:
> 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.
You must disable the garbage collector. ;-) -- Reinhardt
On 5/7/2021 1:46 AM, Reinhardt Behm wrote:
> On 5/7/21 2:10 AM, Ed Lee wrote: >> 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. > > You must disable the garbage collector. ;-)
Tee-hee-hee
On Friday, May 7, 2021 at 1:46:04 AM UTC-7, Reinhardt Behm wrote:
> On 5/7/21 2:10 AM, Ed Lee wrote: > > 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. > You must disable the garbage collector. ;-)
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.
On 5/7/2021 9:47 AM, Ed Lee wrote:
> 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.
Are you sure? Have you debugged the ST USB stack?
> The server will be on a remote location, but the techs can watch the LED.
Cheaper to use techs than parts with competent SW?
> Well, my trash is better than ST's trash.
Only if you rewrite all the drivers...
On Saturday, May 8, 2021 at 5:29:02 PM UTC-7, Dave Nadler wrote:
> On 5/7/2021 9:47 AM, Ed Lee wrote: > > 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. > Are you sure? Have you debugged the ST USB stack?
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.
> > The server will be on a remote location, but the techs can watch the LED. > Cheaper to use techs than parts with competent SW?
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.
> > Well, my trash is better than ST's trash. > Only if you rewrite all the drivers...
It also complaints about many conflicts when enabling I/O pins, for which I know that they are not true.