2021-05-05 05:54 AM
Hello,
On a pcb on which there is the STM32F030K6T6, I am facing a strange issue.
First, the context is that I am using different timers, interruptions, DMA, UART, analog inputs and digital outputs (PWM, ON/OFF signals).
2 of the i/o's are concerned by the issue:
When I am configuring the PA0 as input, with no pulling, the PB3 output can't be drive and remain low even if I order to go to high level. Other functionnalities seem to work fine, the only issue is the PB3 output and this thing happens to only 2 of my 8 prototypes ! The 6 others works fine even with this configuration.
When I am configuring the PA0 as output, push-pull type, it all works perfectly, even for the 2 which weren't working.
That thing doesn't make sense to me at all !
Is there something I am missing with the PA0 configuration as input ? maybe related to other peripherals configuration, i/o drive, etc as something as I souldn't configure it this way because I am already using something, somewhere ?
Thank you in advance,
2021-05-05 06:17 AM
Simplify your program up to the point where it stops having this issue.
Or, conversely, start a new program, which handles only these two pins, and gradually add other features.
JW
2021-05-05 07:06 AM
Dear Waclawek.jan,
Thank you for your reply.
Sure, it would be a method to more deeply understand why and discover the root cause of issue. It would be long and fastidious to do this.
It has been already long to discover why the output on PB3 was not going at high level..
Moreover, it may not bring any further explanation.
As the observation made and mentionned in my previous post is not normal, I am affraid to be missing something that I shouldn't have done, that's why I am asking the question here.
2021-05-05 07:34 AM
Pins in alternate function mode on the STM32F0 are chosen per-peripheral and not per-pin. Possibly this is causing an issue, coupled with a hardware error. Or just a hardware error (solder bridge, missing connection, or similar).
My guess is if you only set PA0/PB3 in the given mode, everything works fine, so the problem would be elsewhere.
Just a guess since there isn't much info here.
> Sure, it would be a method to more deeply understand why and discover the root cause of issue. It would be long and fastidious to do this.
It has been already long to discover why the output on PB3 was not going at high level..
Moreover, it may not bring any further explanation.
Such is the nature of debugging. You get better/faster the more you do it, but avoiding it and grasping at straws is much less likely to bear fruit.
2021-05-05 08:03 AM
Hello TDK,
Thans for your reply.
Pins in alternate function mode on the STM32F0 are chosen per-peripheral and not per-pin.
Or just a hardware error (solder bridge, missing connection, or similar).
My guess is if you only set PA0/PB3 in the given mode, everything works fine, so the problem would be elsewhere.
Such is the nature of debugging. You get better/faster the more you do it, but avoiding it and grasping at straws is much less likely to bear fruit.
Just a guess since there isn't much info here.
2021-05-05 08:14 AM
2021-05-06 12:15 AM
I have checked visually with a high zoom the PCB and there is nothing surprizing.
2021-05-06 02:26 AM
I have also just made the tests driving output PB3 at high level with PA0 configured as input (and all others i/o configured as in my project) and it perfectly worked ( I have started over from a new project from Cube Mx, with HAL librairies instead of my initial code which is using LL libraries but I have no choice since LL library are not supported by CubeMx for STM32F0).
2021-05-06 03:24 AM
After research, I think you are talking about all others functions (from peripherals) than GPIO. But I don't see how it could be the issue. Could you highlight me the point ?
Thank you
2021-05-06 06:38 AM
> I have also just made the tests driving output PB3 at high level with PA0 configured as input (and all others i/o configured as in my project) and it perfectly worked
Gotta be something else in your code that is causing the issue then. Not sure I have much more info to provide.
Alternate function mode is when pins are used for things like UART, SPI and similar.