Skip to main content
DRH
Associate III
September 25, 2023
Question

STM32F303CBT6 DAC and PA4/PA5

  • September 25, 2023
  • 2 replies
  • 6396 views

I read a lot about it for other STM32 MCUs but can't find any confirmation that it’s not possible to use PA4 and PA5 as GPIO output and DAC1 channel 1 and channel 2 internally for STM32F303CBT6. There's a hint in the errata of another STM32F303* using PA5 (ES0246 Rev 8, 2.3.1 on page 11/21) but for STM32F303CBT6 there is no limitation, yet. 

We have to use both DAC1 channels and have to use GPIO PA4 as a digital output as well. Today it looks like after enabling the DAC channels, the GPIOs are automatically configured as analog output and it's not possible to switch them anymore. 

The datasheet specified that it should be possible to use GPIO PA4 and PA5 in parallel to the DAC channels but at least for me it doesn't work today. 

Does somebody make the same experience? Is there any idea or workaround? I really need both DAC channels as comparator input but need PA4 as well. 

Thanks for any support or at least a confirmation that it doesn’t work as expected.

This topic has been closed for replies.

2 replies

Issamos
Lead III
September 25, 2023

Hello @DRH 

Since the DAC_OUT1 is mapped only to PA4 and DAC_OUT2 is mapped only to PA5 then is impossible to use the PA4 and PA5 for any other functions when using DAC channels 1 and 2.

yer.PNG

Best regards.

II

DRH
DRHAuthor
Associate III
September 25, 2023

Hi II,

Thanks for your response. To make sure what I like to do. I use the DACs only as internal comparator input so not necessary to map to a pin. 

The GPIO PA4 is necessary to switch external hardware.

Issamos
Lead III
September 25, 2023

Hello @DRH 

As you can see in the screenshot, you can even configure the OUT 1 in CubeMX when you use PA4  as an output or input mode or alternate function.

Best regards.

II

TDK
September 25, 2023

The (very poorly worded) errata applies to your chip, but it suggests only PA5 is affected.

TDK_0-1695659723433.png

"STM32F303xx silicon limitations" certainly applies to the STM32F303CBT6.

"If you feel a post has answered your question, please click ""Accept as Solution""."
DRH
DRHAuthor
Associate III
September 25, 2023

Hi TDK,

 

Thanks, but PA4 don't work as well, do it?

Issamos
Lead III
September 25, 2023

PA4 can't be used for other purpose when when the DAC1_CH1 is enabled and used internally. PA5 is affected by the errata. Then both of them can't be used.

TDK_0-1695659723433.png

Best regards.

II