cancel
Showing results for 
Search instead for 
Did you mean: 

How to use STM8S001J3 portb

Sang hyeon Jeong
Associate II
Posted on October 31, 2017 at 04:04

Hi

I am using 

STM8S001J3

controller

on my project and I'm have some problem about it,

5,6 pin GPIOB It doesn't work.

I don't know how to solve it.

Please help me..

// my 

source code

GPIO_DeInit(GPIOB);

GPIO_Init(GOIOB, GPIO_PIN_ALL, GPIO_MODE_OUT_OD_HIZ_SLOW)

while(1)

{

     GPIO_Write(GPIOB, 0x30);

}

I am using STVD and IAR for program development. Thanks in advance.

#stm8 #gpio
5 REPLIES 5
Szymon PANECKI
Senior III
Posted on October 31, 2017 at 09:19

Hello Sang hyeon Jeong,

Let me provide you a feedback regarding your question.

PB5 is true open drain pin. This means that this pin can only set logical low state, not high. High state can be achieved for example by adding external pull-up resistor. Description of PB5 you can find in STM8S001 datasheet:

0690X00000608f7QAA.png

PB6 is not available in this device or to be more accurate it is available as a pad inside the package, but it is not connected to any pin on the package. Description is again available in datasheet:

0690X00000608lyQAA.png

Best regards

Szymon

Posted on October 31, 2017 at 10:43

Instead of an external pull-up for PB5, one could use the internal pull-up of PA3 (see section 7.3 of AN5047).

Philipp

Posted on October 31, 2017 at 10:52

Very nice idea. Thanks for it Philipp.

Regards

Szymon

496032474
Associate
Posted on December 27, 2017 at 07:32

where could I download the firmware for STM8S001?

Posted on December 27, 2017 at 09:54

Hellozhang.bin,

I believe you mean example application by saying firmware. If yes, then you can refer toStandard peripheral library for STM8S, here is a

http://www.st.com/en/embedded-software/stsw-stm8html

. Example applications are under the path:

STM8S_StdPeriph_Lib\Project\STM8S_StdPeriph_Examples

You can easily reuse these applications for STM8S

Additionaly I developed few new, simple example applications for STM8S001: for GPIO, UART, ADC and TIM peripherals. Please find them attached.

Regards

Szymon

________________

Attachments :

STM8S001_STVD_examples.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hy7m&d=%2Fa%2F0X0000000b4q%2Ffj0jY1.3o273p4a4FBa8VoTJ1tmddg5jv2V7yHFzjJw&asPdf=false