STM32F103C: really strange behavior
Moderators: RoccoMarco, lbednarz, tfAteba
STM32F103C: really strange behavior
Hi, I am facing a strange behavior of my stm32f103C custom board.
I will explain briefly.
PA11 pin is configured as normal input: #define VAL_GPIOACRH 0xB44B44B3 /* PA15...PA8 */
PA11 input pin is low on the board: I checked through scope.
PA11 is high in Chibios: palReadPad(GPIOA, 11);
PA11 is high in internal GPIOA register: in gdb the command "x/2bt 0x40010808", which should be port A input register, gives: 0x01011100 0x11011101
Am I missing something? What am I doing wrong?
I amusing Chibios 2.5.0
Thank you for your replies.
-g
I will explain briefly.
PA11 pin is configured as normal input: #define VAL_GPIOACRH 0xB44B44B3 /* PA15...PA8 */
PA11 input pin is low on the board: I checked through scope.
PA11 is high in Chibios: palReadPad(GPIOA, 11);
PA11 is high in internal GPIOA register: in gdb the command "x/2bt 0x40010808", which should be port A input register, gives: 0x01011100 0x11011101
Am I missing something? What am I doing wrong?
I amusing Chibios 2.5.0
Thank you for your replies.
-g
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: STM32F103C: really strange behavior
Does GPIOA CRH really contains 0xB44B44B3 at runtime? it could be a misconfiguration.
Giovanni
Giovanni
Re: STM32F103C: really strange behavior
Hi Giovanni, so i will do when i'll be back at work.
Question: how much can we rely upon gpio configuration made in board.h file?
-g
Ps. Automatic corrector of iPhone/iPad really sucks!
Question: how much can we rely upon gpio configuration made in board.h file?
-g
Ps. Automatic corrector of iPhone/iPad really sucks!
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: STM32F103C: really strange behavior
It is very reliable, I believe it is not a software problem but something in HW or project setup.
Giovanni
Giovanni
Re: STM32F103C: really strange behavior
I confirm GPIOA_CRH register contains 0xb44b44b3.
any ideas?
-g
any ideas?
-g
Re: STM32F103C: really strange behavior
If I attach the scope on the testpad, device seems to work... maybe I have to ship the board with included a scope?
Or maybe I should configure the input as pullup/down?
What do you think?
-g
Or maybe I should configure the input as pullup/down?
What do you think?
-g
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: STM32F103C: really strange behavior
Input pins have to be driven or they "float", a pull-up is required if you don't have anything driving the input.
Also make sure to pull-up unused pins, this is a common error and source of EMI problems.
Giovanni
Also make sure to pull-up unused pins, this is a common error and source of EMI problems.
Giovanni
Re: STM32F103C: really strange behavior
Well, PA11 is directly feeded by a voltage level translator. No pull up or pull down are required.
But, if I attach the scope probe, everything works fine. If I detach the scope, system stops working.
Do you have an explanation for this?
-g
But, if I attach the scope probe, everything works fine. If I detach the scope, system stops working.
Do you have an explanation for this?
-g
Re: STM32F103C: really strange behavior
I configured PA11 as input pulldown and everything works, now: so the Mohm pulldown of scope probe worked like a charm 
If interested in investigating more, and I am still interested in understanding this behavior, I can tell you PA11 was feeded by port B of TXS0108,
a voltage level translator of TI.
Thanks a lot.
bye
-g
If interested in investigating more, and I am still interested in understanding this behavior, I can tell you PA11 was feeded by port B of TXS0108,
a voltage level translator of TI.
Thanks a lot.
bye
-g