cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F303CBT6 DAC and PA4/PA5

DRH
Associate III

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.

9 REPLIES 9
Issamos
Lead II

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
Associate III

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.

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
Guru

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
Associate III

Hi TDK,

 

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

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

This note in the RM would suggest it applies to all DAC channel pins:

TDK_0-1695661975992.png

 

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

Right, but there are others that said that GPIO functionality is still given.

1000006482.jpg

DRH
Associate III

It's confusing, because the name of the errata describes that it's for STM32F303x6/x8 only.  

There is another one for STM32F303xB/C named ES0204 Rev 11 and there is no information that PA4 and PA5 are not working as specified. But I'm afraid that I can confirm that they are not working. 

Does anybody know a workaround. I only need VCC at PA4 and don't like to cut the route and solder a wire for this revision of the PCBs.