PB4 doesn't work on STM8S003F3P
Hi everybody,
I'm working with STM8S003F3P6 on a custom board, using PB4 as an output. It simply does not work. It is always high. I know it is a true open drain pin, and I provided the pull-up resistor, but it still doesn't work.
Look at this image, it's very similar to my circuit: the layout is the same, but i'm using a 3.3KOhm resistor and instead of the PIC i'm using the STM8 of course (with a supply voltage of 3.3V). If you need I can try to post the schematic.
Also the code is very simple:
GPIO_DeInit(GPIOB);
GPIO_Init(GPIOB, GPIO_PIN_4, GPIO_MODE_OUT_OD_LOW_SLOW);
while(1){
GPIO_WriteLow(GPIOB, GPIO_PIN_4);
}
I used the debug tool to check the status of the PORTB_ODR register, and its value is 0x00.
Any kind of help?
Thanks,
Lorenzo
