cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Pin A11 on STM32U595VJ

SStor
Senior

Hello,

I've migrated an application from STM32L496VG to STM32U595VJ.
Pin A11 is used as capture input TIM1_CH4.
With U5 device the input on PA11 couldn't reach full level at 3.3V. I have the same behavior with 5 MCUs STM32U595VJT6 and PA11 is connected directly with an external comparator output.
Is there any special new function with this pin PA11 (USB stuff) that has to be switched off on U5 series first other than L4 series (e.g. in option bytes)?

 

Here the input level on PA11 (reach only half level 1.6V and doesn't trigger the capture input):

STM32U595VJT6_PA11_NIOSTM32U595VJT6_PA11_NIO

On PA10 (TIM1_CH3) input level is ok and also triggers capture input:

STM32U595VJT6_PA10_IOSTM32U595VJT6_PA10_IO

Thank you in advance for any ideas about this problem!

1 ACCEPTED SOLUTION

Accepted Solutions
SStor
Senior

Finally I've found a solution to configure and use PA11 (and probably also PA12) as normal GPIO (instead USB):

SET_BIT(PWR->SVMCR, PWR_SVMCR_USV);
SET_BIT(PWR->VOSR, PWR_VOSR_USBPWREN | PWR_VOSR_VDD11USBDIS);

It is important to set also the PWR_SVMCR_USV bit (this is not mentioned in reference manual unfortunately ☹️)!

View solution in original post

6 REPLIES 6
gbm
Lead II

Looks like port's power is not physically connected or not enabled in PWR->CRx.

NEL M.1
ST Employee

Hello @SStor ,

Please note that PA11 and PA12 provide OTG_HS additional functions. There are constraints to use PA11 and PA12 as standard GPIOs or alternate functions. Refer to 10.7.12 USB power management in low-power modes
(STM32U59x/5Ax/5Fx/5Gx only) in the RM0456 REV 5

Link : https://www.st.com/resource/en/reference_manual/rm0456-stm32u5-series-armbased-32bit-mcus-stmicroelectronics.pdf

 

Kind regards,

Nissrine.

 

 

 

Hello @NEL M.1,

thank you for your answer!

I've played with bits in VOSR register (value 0x0027C000), but with no success:

  CLEAR_BIT(PWR->VOSR, (PWR_VOSR_USBPWREN | PWR_VOSR_USBBOOSTEN));
  SET_BIT(PWR->VOSR, PWR_VOSR_VDD11USBDIS);

I've toggled only the bit PWR_CR1_FORCE_USBPWR from CR1 register in debug mode manually (set and reset), then it was ok and A11 works korrekt as GPIO-AF. But this works only with debugger and not in software unfortunately?!

I suppose there are further conditions for correct configuration.

Is there any documentation/example about the exact initialization procedure to use A11/A12 as GPIOs with alternate functions?

Otherwise there might be anything wrong with used MCU revision X...

 

Diane POMABIA
ST Employee

Hello @SStor 

Can you provide me with a schematic of his board? We're particularly interested in what's on the PA11 and PA12 pins.

Regards

Diane

Hello @Diane POMABIA,

PA11 is directly connected with comparator output pin 14 of MAX9144 (4 comp IC), nothing else.
PA12 is grounded and configured as analog input, because it's not used.

You can see the hardware connections in attached layout. There are 5 STM32U595 placed on one PCB in total (together in JTAG daisy chain). Same behavior with PA11 input on all devices.

With previous type STM32L496VG there were no problems with same periperal components and connections (only PB11 has to be replaced due to VCAP now).

I've attached also the CubeMX configuration file.

Any ideas are welcome!

SStor
Senior

Finally I've found a solution to configure and use PA11 (and probably also PA12) as normal GPIO (instead USB):

SET_BIT(PWR->SVMCR, PWR_SVMCR_USV);
SET_BIT(PWR->VOSR, PWR_VOSR_USBPWREN | PWR_VOSR_VDD11USBDIS);

It is important to set also the PWR_SVMCR_USV bit (this is not mentioned in reference manual unfortunately ☹️)!